The url has changed: https://odan.github.io/2017/01/30/rest-restful-rest-like-api-resources.html
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/python2 | |
import binascii | |
import hashlib | |
drv='/dev/sdb' | |
mode='rb+' | |
# pwd default is 'admin' |
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
# enable color support of ls and also add handy aliases | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
#alias dir='dir --color=auto' | |
#alias vdir='vdir --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' |
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 | |
reset_iptables() { | |
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -P INPUT ACCEPT |
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 | |
# install bash | |
# todo how to make persistent bash? | |
tce-load -wi bash | |
# then to docker compose | |
DOCKER_COMPOSE_VERSION=1.22.0 | |
# Download docker-compose to the permanent storage |
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
{ | |
"VN-44": "An Giang", | |
"VN-43": "Bà Rịa–Vũng Tàu", | |
"VN-54": "Bắc Giang", | |
"VN-53": "Bắc Kạn", | |
"VN-55": "Bạc Liêu", | |
"VN-56": "Bắc Ninh", | |
"VN-50": "Bến Tre", | |
"VN-31": "Bình Định", | |
"VN-57": "Bình Dương", |
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
VPN_SERVER_IP= | |
ROUTER_IP= | |
ROUTER_DEV= | |
sudo ip route add $VPN_SERVER_IP via $ROUTER_IP via $ROUTER_DEV |
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
var a = [ | |
"bG9n", | |
"WW91IG11c3Qga25vdyB0aGUgZmxhZyBieSBub3ch", | |
"Y2xvc2U=", | |
"YmlnbnVtYmVyLmpz", | |
"Y29uZmln", | |
"cmVhZGxpbmU=", | |
"Y3JlYXRlSW50ZXJmYWNl", | |
"c3RkaW4=", | |
"c3Rkb3V0", |
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 -x | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
# if the box is Red hat based | |
# sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose |
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
sudo sed -ie 's/\([a-zA-Z0-9]*\.archive\.\)\{0,1\}\(archive\.\)\{0,1\}\(security\.\)\{0,1\}ubuntu\.com/opensource\.xtdv\.net/g' /etc/apt/sources.list |
OlderNewer