Instructions how to install Debian using debootstrap. Below instructions were verified to work with debootstrapping Debian 11.
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
| --- Create a flat list of all files in a directory | |
| -- @param directory - The directory to scan (default value = './') | |
| -- @param recursive - Whether or not to scan subdirectories recursively (default value = true) | |
| -- @param extensions - List of extensions to collect, if blank all will be collected | |
| function scandir(directory, recursive, extensions) | |
| directory = directory or '' | |
| recursive = recursive or false | |
| -- if string.sub(directory, -1) ~= '/' then directory = directory .. '/' end | |
| if recursive then command = command .. 'R' end | |
| local currentDirectory = directory |
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
| Port: 1080 | |
| 1. Create a file /YOUR PATH/gitproxy.sh with content: | |
| #!/bin/sh | |
| nc -X 5 -x 127.0.0.1:1080 "$@" | |
| 2. Edit your ~/.gitconfig | |
| # For git:// |
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
| #include <stdio.h> | |
| #include <iostream> | |
| #include <thread> | |
| #include <list> | |
| #include <sapi/embed/php_embed.h> | |
| int main(int argc, char* argv[]) { | |
| int threadCount = 5; |
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 | |
| URL="http://a0.awsstatic.com/pricing/1/ec2/ri-v2/linux-unix-shared.min.js" | |
| (echo 'function callback(data) { console.log(JSON.stringify(data)); }'; curl -s "$URL") |\ | |
| node |\ | |
| jq -r '.config.regions[] | | |
| select(.region == "us-east-1") | | |
| .instanceTypes[] | | |
| [ |
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
| { | |
| "name": "swichers/passthru_with_errors", | |
| "description": "An enhanced passthru() command that includes error capturing.", | |
| "license": "Apache-2.0", | |
| "authors": [ { "name": "Steven Wichers", "role": "Developer" } ], | |
| "require": { | |
| "php": ">=5.3.0" | |
| }, | |
| "autoload": { | |
| "files": ["passthru_with_errors.php"] |
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 | |
| /** | |
| * Fake mail sending: log content to file | |
| * | |
| * Instructions: | |
| * 1. Save as /usr/sbin/sendmail | |
| * 2. Make it executable | |
| */ |
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
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 watch() { | |
| global $argv; | |
| $watch_dir = $argv[1]; | |
| $handle = inotify_init(); | |
| $watch_descriptor = inotify_add_watch($handle, $watch_dir, IN_MODIFY|IN_ATTRIB); | |
| while (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 | |
| include __DIR__ . '/threads.php'; | |
| $commands = array(); | |
| for ( $i=0; $i<10; $i++ ) { | |
| $commands[] = "bash -c 'sleep `shuf -i 1-5 -n 1`; echo $i'"; | |
| } |