Skip to content

Instantly share code, notes, and snippets.

nguyenl95

Block or report user

Report or block nguyenl95

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nguyenl95
nguyenl95 / configure.sh
Created Aug 16, 2019
config elasticsearch
View configure.sh
#!/usr/bin/env bash
# Production settings for Elasticsearch in Ubuntu 16.04
set -eux
CURRENT_USER=$(whoami)
CURRENT_DIR=$(dirname $0)
cd ${CURRENT_DIR}
@nguyenl95
nguyenl95 / change_sources_list.sh
Last active Aug 16, 2019
linux quick and dirty scripts
View change_sources_list.sh
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
View gist:883254526a12fe5de6aa0010b1f38e9c
var a = [
"bG9n",
"WW91IG11c3Qga25vdyB0aGUgZmxhZyBieSBub3ch",
"Y2xvc2U=",
"YmlnbnVtYmVyLmpz",
"Y29uZmln",
"cmVhZGxpbmU=",
"Y3JlYXRlSW50ZXJmYWNl",
"c3RkaW4=",
"c3Rkb3V0",
View add_pritunl_server_route.sh
VPN_SERVER_IP=
ROUTER_IP=
ROUTER_DEV=
sudo ip route add $VPN_SERVER_IP via $ROUTER_IP via $ROUTER_DEV
@nguyenl95
nguyenl95 / vn.json
Last active Oct 16, 2018
iso 3166-2
View vn.json
{
"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",
@nguyenl95
nguyenl95 / install-docker-compose.sh
Last active Oct 17, 2018 — forked from ohze/install-docker-compose.sh
Install docker-compose in boot2docker 1.7.0+
View install-docker-compose.sh
#!/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
@nguyenl95
nguyenl95 / reset.sh
Last active Aug 22, 2018
multiple ppp usb on linux
View reset.sh
#!/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
@nguyenl95
nguyenl95 / .bash_aliases
Last active Jun 7, 2018
personal snippets for ubuntu 16.04
View .bash_aliases
# 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'
View format-vsusb.py
#!/usr/bin/python2
import binascii
import hashlib
drv='/dev/sdb'
mode='rb+'
# pwd default is 'admin'
You can’t perform that action at this time.