- GitHub Staff
- https://reb.gg
- @robherley
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
const fs = require('fs'); | |
const readInt8 = () => | |
new Promise((resolve, reject) => { | |
fs.readFile('input.txt', 'utf8', (err, data) => { | |
let newData = data | |
.split(/\n/g) | |
.map(e => new Int8Array(e.match(/./g).map(e => parseInt(e)))); | |
err ? reject(err) : resolve(newData); | |
}); |
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
const MOD = 1000000007; | |
const samSubstr = balls => | |
[...balls].reduceRight( | |
(prev, digit, i) => { | |
return [ | |
(prev[0] * 10 + 1) % MOD, | |
(prev[1] + ~~digit * prev[0] * (i + 1)) % MOD | |
]; | |
}, | |
[1, 0] |
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
set number | |
set relativenumber | |
set smartindent | |
set showcmd | |
set expandtab | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 |
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
4981785 4 -rw-rw-r-- 1 rob rob 2 Apr 19 18:46 ./smol_boye.txt | |
4981785 4 -rw-rw-r-- 1 rob rob 4 Apr 19 18:46 ./one_block.txt | |
4981785 4 -rw-rw-r-- 1 rob rob 15 Apr 19 18:46 ./top_level_file.txt | |
4981784 4 -rw-rw-r-- 1 rob rob 17 Apr 19 18:45 ./a/b/c/d/d_child.txt | |
4981783 4 -rw-rw-r-- 1 rob rob 5 Apr 19 18:45 ./a/b/b_child.txt | |
4981782 4 -rw-rw-r-- 1 rob rob 19 Apr 19 18:44 ./xyz/dank_meme.png |
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
./ | |
./a | |
./a/b | |
./a/b/c | |
./a/b/c/d | |
./a/b/c/d/e | |
./xyz |
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
/** | |
* Simple Example Communications over Bluetooth using HC-05 Module | |
* | |
* Here's an example of the wiring diagram: https://goo.gl/qctNCN | |
* | |
* Desktop (thru Arduino IDE) | |
* - Connect to HC-05 in bluetooth settings | |
* - Change Port in Tools -> Port to /dev/...HC-05 (NOT the Arduino Port) | |
* - Open the Serial Monitor (make sure baud rate is 9600) | |
* - Now you can send the single char commands through there |
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
# PATH | |
path+=( | |
$HOME/bin | |
/usr/local/bin | |
$HOME/go/bin | |
/usr/local/opt/go/libexec/bin | |
/usr/local/opt/qt/bin | |
/usr/local/mysql/bin | |
/usr/local/opt/python@2/libexec/bin:/usr/local/opt/python@2/bin | |
) |
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
set number | |
set relativenumber | |
set smartindent | |
set showcmd | |
set expandtab | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 |
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/bash | |
echo "Howdy, what folder do you want to serve assets from?" | |
echo -n ">" | |
read foldrdir | |
echo "Okay, I'll read from $foldrdir. What do you want to name the container?" | |
echo -n ">" | |
read container |
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
const { execSync } = require('child_process'); | |
const modes = ['ECB', 'CBC', 'OFB', 'PCBC']; | |
const stuff = [ | |
{ | |
type: 'DES', | |
sizes: ['56'], | |
modes | |
}, | |
{ |
OlderNewer