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 | |
| # | |
| # security-scan.sh — Static malware/backdoor scan of the current directory. | |
| # | |
| # Runs Claude inside the `sbox` sandbox, non-interactively, to perform a | |
| # READ-ONLY security review of all code in the current working directory. | |
| # | |
| # Nothing in the directory is ever executed. Claude is restricted to read, | |
| # search and write tools (no Bash, no execution), so there is no way for it to | |
| # run, build, or install the code under review — the no-execution rule is |
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/bash | |
| # bubblewrap setup based on https://blog.senko.net/sandboxing-ai-agents-in-linux | |
| # when working on DokuWiki plugins, I want access to dokuwiki above | |
| case "$(basename "$0")" in | |
| sboxdw) bind_dir="$(realpath "$PWD/../../..")" ;; | |
| *) bind_dir="$PWD" ;; | |
| esac | |
| # environment variables to pass through |
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 | |
| # | |
| # Block all ranges from a given ASN via UFW. | |
| # Usage: | |
| # sudo ./block_asn.sh AS1234 ["optional comment"] | |
| # | |
| # Requires: ufw, curl | |
| # | |
| set -euo pipefail |
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
| { | |
| "openapi": "3.1.0", | |
| "info": { | |
| "title": "DokuWiki API", | |
| "description": "The DokuWiki API OpenAPI specification", | |
| "version": "12", | |
| "x-locale": "en-US" | |
| }, | |
| "servers": [ | |
| { |
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
| <?php | |
| /** | |
| * Rename all files affected by https://github.com/splitbrain/dokuwiki/issues/3698 | |
| * | |
| * Upload this file to your DokuWiki root. It should be placed right next to the doku.php file. Then run | |
| * call it in your browser at https://yourserver.com/yourwiki/turkishfix.php | |
| * | |
| * Delete the file once you're done | |
| */ | |
| if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__ . '/'); |
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
| <?php | |
| // composer require phpseclib/phpseclib | |
| require_once('vendor/autoload.php'); | |
| $tenant = 'cosmocode'; | |
| $policy = 'b2c_1_signupandsignin'; | |
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
| <?php | |
| /** | |
| * DokuWiki Plugin jscheck (Action Component) | |
| * | |
| * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html | |
| * @author Andreas Gohr <[email protected]> | |
| */ | |
| // must be run within Dokuwiki | |
| if(!defined('DOKU_INC')) die(); |
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/php | |
| <?php | |
| if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../') . '/'); | |
| define('NOSESSION', 1); | |
| require_once(DOKU_INC . 'inc/init.php'); | |
| class FixerCLI extends DokuCLI { | |
| protected $dir; |
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/php | |
| <?php | |
| /** | |
| * Very simple script to convert iOS xcode imageset directories to DIP buckets | |
| * for Android development | |
| */ | |
| if(!isset($argv[2])) { | |
| die("Usage: ios2and.php <ios image asset folder> <android res folder>\n"); | |
| } |
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
| import smbus | |
| from time import sleep | |
| # select the correct i2c bus for this revision of Raspberry Pi | |
| revision = ([l[12:-1] for l in open('/proc/cpuinfo','r').readlines() if l[:8]=="Revision"]+['0000'])[0] | |
| bus = smbus.SMBus(1 if int(revision, 16) >= 4 else 0) | |
| class TSL45315: | |
| VAL_COMMAND = 0x80 | |
| REG_CONTROL = 0x00 | VAL_COMMAND |
NewerOlder