这是indexloc提供的服务,不要输入任何密码
Skip to content

Instantly share code, notes, and snippets.

@jemc
jemc / gh-enable-all-inactivity-disabled-workflows.fish
Created October 20, 2023 15:14
Use GitHub CLI to enable all workflows that were disabled due to repository inactivity - either for all repos in a given org that you manage, or (by default) your personal repos.
function gh-enable-all-inactivity-disabled-workflows
set org $argv[1]
gh repo list $org | cut -f 1 | xargs -I REPO sh -c 'gh workflow list --all -R REPO | grep disabled_inactivity | cut -f 3 | xargs -I WORKFLOW sh -xc "gh workflow enable WORKFLOW -R REPO"'
end
import os
import struct
from pathlib import Path
from PIL import Image
import numpy as np
# TIM header constant
TIM_MAGIC = b'\x10\x00\x00\x00'
# Ensure output directory exists
import os
import struct
import time
from pathlib import Path
from PIL import Image
import numpy as np
# Constants
TIM_MAGIC = 0x10
BPP_MAP = {0: 4, 1: 8, 2: 16, 3: 24}
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@vielhuber
vielhuber / script.sh
Last active July 26, 2025 05:40
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@Foadsf
Foadsf / latex-windows-vscode-setup.md
Created May 11, 2025 13:18
Complete step-by-step guide for setting up LaTeX on Windows with MiKTeX, VS Code, and automatic formatting using latexindent

Complete LaTeX Setup Guide for Windows with VS Code

This guide will help you set up a complete LaTeX environment on Windows with MiKTeX, VS Code, and automatic formatting with latexindent.

Prerequisites

  • Windows 10/11
  • Package manager (Chocolatey, Winget, or Scoop)
  • VS Code (or install it during this process)

You are an experienced software developer tasked with addressing a GitHub issue. Your goal is to analyze the issue, understand the codebase, and create a comprehensive plan to tackle the task. Follow these steps carefully:

  1. First, review the GitHub issue using the gh issue view command.

<github_issue> #$ARGUMENTS </github_issue>

  1. Next, examine the relevant parts of the codebase.

Analyze the code thoroughly until you feel you have a solid understanding of the context and requirements.

@markasoftware
markasoftware / enterprise_token.rb
Last active July 26, 2025 05:33
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active July 26, 2025 05:32
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for non-video, non-activity quests! For stream/play quests use the desktop app!

Note

When doing stream quests, you need at least 1 other account in the vc!

How to use this script:

  1. Accept a quest under Discover -> Quests
@kishibe-rohan
kishibe-rohan / App.jsx
Created April 2, 2022 13:59
React + TailwindCSS Login/Signup Page
import Login from "./pages/Login";
function App() {
return (
<Login/>
);
}
export default App;