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
let a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
const unflatten = (arrayToUnflatten, unflattenLength) => { | |
return Promise.all(new Array(Math.ceil(arrayToUnflatten.length / unflattenLength)).fill('').map((_, index) => new Promise(resolve => { | |
resolve(arrayToUnflatten.slice(index * unflattenLength, index * unflattenLength + unflattenLength)) | |
}))) | |
} | |
unflatten(a, 2).then(result => console.log(result)) |
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 | |
sudo yum update -y | |
sudo yum install tmux gcc wget htop epel-release fail2ban -y | |
wget -O vpnserver.tar.gz http://jp.softether-download.com/files/softether/v4.22-9634-beta-2016.11.27-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.22-9634-beta-2016.11.27-linux-x64-64bit.tar.gz | |
tar -zxvf vpnserver.tar.gz | |
cd vpnserver/ | |
# printf '1\n1\n1\n' | ./.install.sh |
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/sh | |
sudo yum install -y python-pip libsodium-devel python-devel | |
sudo pip install --upgrade pip | |
sudo pip install magic-wormhole |
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/sh | |
sudo yum install -y yum-utils device-mapper-persistent-data lvm2 net-tools | |
sudo yum-config-manager --add-repo -y https://download.docker.com/linux/centos/docker-ce.repo | |
sudo yum install -y docker-ce | |
sudo systemctl start docker | |
sudo usermod -aG docker $USER | |
sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
echo "alias dc=docker-compose" >> ~/.bashrc |
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
// repositions the gunmodel to mimic CSS more closely. | |
viewmodel_presetpos "0" | |
viewmodel_fov "68" | |
viewmodel_offset_x "2.5" | |
viewmodel_offset_y "1" | |
viewmodel_offset_z "-1.500000" | |
// removes the shifting of the arm when crouching down. |
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
unbindall | |
bind "1" "slot1" | |
bind "2" "slot2" | |
bind "3" "slot3" | |
bind "4" "slot4" | |
bind "5" "slot5" | |
bind "9" "slot9" | |
bind "a" "+moveleft" | |
bind "b" "buymenu" | |
bind "c" "slot6" |
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
// yarn add binary-cookies bplist-parser | |
/* | |
To get the Steamguard file, you don't necessarily need to be jailbroken, but | |
if you're jailbroken: head to | |
/private/var/mobile/Containers/Data/Application/6BE5C937-51C0-4365-811D-F2717BAD1213/Documents | |
and you can get them. I'm not sure the UUID is same on all devices, but this is the actual path | |
on my device (iOS 12) | |
If you're non-jailbroken, you need to get an unencrypted backup using iTunes, |
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
const querystring = require('querystring') | |
let args = process.argv.slice(2) | |
if (!args[0]) { | |
console.error("Usage: node index.js [subscribe_list_base64_encoded]") | |
process.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
cp /etc/docker/daemon.json /etc/docker/daemon.json.old | |
echo '{"iptables": false}' > /etc/docker/daemon.json | |
firewall-cmd --permanent --direct --add-rule ipv4 nat POSTROUTING 0 -o eth0 -j MASQUERADE # this enables containers access outside internet | |
firewall-cmd --reload |
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
const encode = s => Buffer.from(s).toString('base64') | |
const decode = s => Buffer.from(s, 'base64').toString() |