This file contains 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/sh | |
set -e | |
sudo yum install docker | |
# start docker | |
sudo systemctl enable --now docker | |
# add ec2-user to docker group |
This file contains 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 php | |
<?php | |
$federalRates = [ | |
[49020, 15], | |
[49020, 20.5], | |
[53939, 26], | |
[64533, 29], | |
[216511, 33] | |
]; |
This file contains 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/sh | |
set -e | |
script_name="$(basename "${0}")" | |
usage="${script_name}: force retries executing a custom command until it exits successfully. | |
Usage: | |
${script_name} COMMAND ARG1 ARG2 ... | |
Example: | |
${script_name} curl -C - --retry 5 -L -O {URL}" |
This file contains 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 node | |
const jsrp = require('jsrp'); | |
const client = new jsrp.client(); | |
const readline = require("readline"); | |
const identity = process.argv[2]; | |
const password = process.argv[3]; | |
const rl = readline.createInterface({ |
This file contains 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/sh | |
default_args="-C - --retry 5" | |
script_name="$(basename "${0}")" | |
usage="${script_name} force retries executing curl until it exits successfully. | |
Passed arguments are passed to curl. By default, we additionally pass these args: | |
${default_args} | |
To execute a curl program, you should include the URL and other options, | |
if necessary. Example: | |
${script_name} -L -O {URL}" |
This file contains 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 swap(&$o, $a, $b) { | |
$x = $o[$a]; | |
$o[$a] = $o[$b]; | |
$o[$b] = $x; | |
} | |
$letters = 'abcdefghijklmnopqrstuvwxyz'; | |
$lettersUp = strtoupper($letters); | |
$digits = '0123456789'; |