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 | |
| for dev in $(cat /proc/acpi/wakeup | grep '*enabled' | cut -d' ' -f1); do | |
| if [ "$dev" = "PWRB" ]; then | |
| continue | |
| fi | |
| echo $dev > /proc/acpi/wakeup | |
| done | |
| exit 0 |
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 | |
| path=https://example.webcam/streams/123/ | |
| file=${path}stream.m3u8 | |
| while true; do | |
| for s in `curl -s $file | tr -d '\015' | grep -v '#'`; do | |
| echo $s | |
| curl -s "$path$s" > $s | |
| done |
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 | |
| fail() { | |
| echo "$@" | |
| exit 1 | |
| } | |
| test -z "$1" && fail Image name argument missing | |
| CACHE_DIR="${HOME}/.cache/deb" |
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 | |
| set -ex | |
| # fail function to exit with error message | |
| fail() { | |
| echo "$@" 1>&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
| <?php | |
| function compress_int_set($arr) { | |
| if (count($arr) == 0) { | |
| return ''; | |
| } | |
| sort($arr); | |
| $prev = $arr[0]; |
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
| // ==UserScript== | |
| // @name flibusta.is качать с названием | |
| // @namespace Violentmonkey Scripts | |
| // @match *://flibusta.is/a/* | |
| // @match *://flibusta.is/s/* | |
| // @match *://flibusta.is/sequence/* | |
| // @grant GM_setClipboard | |
| // @grant GM_download | |
| // @version 1.4 | |
| // @author - |
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
| # For users with read-only or otherwise unusable HOME directory | |
| alias www='sudo -u www-data /bin/bash -c "mkdir -p /tmp/$(id -n -u)-home && cd /tmp/$(id -n -u)-home && (test -e realhome || ln -s $(getent passwd www-data|cut -d':' -f6) realhome) && HOME=/tmp/$(id -n -u)-home exec /bin/bash -l"' | |
| # For users with writable HOME | |
| alias uuu='cd $(getent passwd www-data|cut -d':' -f6) && sudo -u www-data -s /bin/bash' |
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
| #!/data/data/com.termux/files/usr/bin/python3 | |
| import json | |
| import os | |
| import subprocess | |
| import time | |
| import logging | |
| import signal | |
| # Configuration |
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 re | |
| import hashlib | |
| import base58 # pip install base58 | |
| import os | |
| import sys | |
| def hash256(data): | |
| """Perform SHA-256 hash twice.""" | |
| return hashlib.sha256(hashlib.sha256(data).digest()).digest() |