This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Extract any archive by extension — figures out the right tool. | |
| # Example: extract project.tar.gz | |
| # extract release.zip | |
| # extract bundle.7z | |
| set -euo pipefail | |
| if [ $# -ne 1 ]; then | |
| echo "usage: extract <archive>" >&2 | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Kill whatever process is listening on a TCP port. | |
| # Example: killport 3000 | |
| set -euo pipefail | |
| if [ $# -ne 1 ]; then | |
| echo "usage: killport <port>" >&2 | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| exit 1 | |
| fi | |
| FILE_PATH="$1" | |
| EXTENSION="${FILE_PATH##*.}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # ============================================================================= | |
| # PolinRider Malware Detector — macOS Dev Laptop Edition | |
| # Based on threat intelligence from: https://github.com/OpenSourceMalware/PolinRider | |
| # | |
| # DPRK / Lazarus "PolinRider" campaign — supply-chain attack via compromised | |
| # npm packages / VS Code extensions that inject obfuscated JS payloads into | |
| # common JS config files, then silently amend and force-push commits to GitHub. | |
| # | |
| # What this script checks: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # PolinRider Runtime IOC Scanner (process + network only) | |
| # Extracted from detect_polinrider.sh — process rules kept in sync with scan_processes there. | |
| # | |
| # Usage: | |
| # chmod +x detect_polinrider_process_ioc.sh | |
| # ./detect_polinrider_process_ioc.sh | |
| # ./detect_polinrider_process_ioc.sh --verbose | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TEMPORARY: Sample 10% of combos for testing — remove after validation | |
| const sampledCombos = combos.filter( | |
| () => Math.random() < 0.1 | |
| ) | |
| this.logger.info('Sampled combos for testing', { | |
| totalCombos: combos.length, | |
| sampledCombos: sampledCombos.length, | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def power_set(my_list): | |
| if len(my_list) == 0: | |
| return [[]] | |
| power_set_without_first = power_set(my_list[1:]) | |
| with_first = [ [my_list[0]] + rest for rest in power_set_without_first ] | |
| return with_first + power_set_without_first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Here's how to squash and cleanly rebase against upstream branch: | |
| # 1. Soft reset to the merge-base (keeps your changes staged) | |
| git reset --soft $(git merge-base main HEAD) | |
| # 2. Commit everything as one squashed commit | |
| git commit -m "Your squashed commit message" | |
| # 3. Rebase onto current main | |
| git rebase main # resolve merge conflicts once |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List conflicted files | |
| git status --short | grep "^UU\|^AA\|^DD" | |
| # Compare full versions (not just conflict markers) | |
| git show HEAD:<file> | |
| git show MERGE_HEAD:<file> | |
| git diff HEAD MERGE_HEAD -- <file> | |
| # Understand history | |
| git log --oneline -20 -- <file> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "workbench.startupEditor": "newUntitledFile", | |
| "window.zoomLevel": 1, | |
| "git.enableSmartCommit": true, | |
| "git.autofetch": true, | |
| "extensions.ignoreRecommendations": false, | |
| "extensions.recommendations": [ | |
| "akamud.vscode-theme-onelight", | |
| "aliariff.vscode-erb-beautify", | |
| "andrewcourtice.theme-aurora", |
NewerOlder