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 add-apt-repository ppa:alessandro-strada/google-drive-ocamlfuse-beta | |
sudo apt-get update | |
sudo apt-get install google-drive-ocamlfuse | |
google-drive-ocamlfuse |
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
ssh-keygen | |
cd ~/.ssh | |
cat id_rsa.pub >> authorized_keys | |
chmod 600 authorized_keys | |
chmod 700 ~/.ssh | |
service sshd restart |
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
client := &http.Client{} | |
req, err := http.NewRequest("POST", "http://example.com",string.NewReader(postData)) | |
req.Header.Add("User-Agent", "myClient") | |
resp, err := client.Do(req) | |
defer resp.Body.Close() |
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
cd ~ | |
git clone https://github.com/inconshreveable/ngrok.git | |
export GOPATH=~/ngrok/ | |
cd ngrok | |
$NGROK_DOMAIN = “fake.com” | |
openssl genrsa -out rootCA.key 2048 | |
openssl req -x509 -new -nodes -key rootCA.key -subj "/CN=$NGROK_DOMAIN" -days 5000 -out rootCA.pem | |
openssl genrsa -out server.key 2048 | |
openssl req -new -key server.key -subj "/CN=$NGROK_DOMAIN" -out server.csr | |
openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 5000 |
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 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/2/Debian_8.0/ /' >> /etc/apt/sources.list.d/fish.list | |
apt-get update | |
wget -qO - http://download.opensuse.org/repositories/shells:fish:release:2/Debian_8.0/Release.key | apt-key add - | |
apt-get update | |
apt-get install -y fish |
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 python | |
# coding:utf-8 | |
# Author qingniao | |
import pyfiglet as pyfiglet | |
def banner(char): | |
"""char draw | |
:param char: | |
:return:char draw |
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
from optparse import OptionParser, OptionGroup, OptionError | |
try: | |
from setting import IS_WIN | |
except ImportError as e: | |
errmsg = e.message.split('named')[0] | |
print errmsg | |
exit() | |
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 bash | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin | |
export PATH | |
#=================================================================# | |
# System Required: CentOS 6,7, Debian, Ubuntu # | |
# Description: One click Install ShadowsocksR Server # | |
# Author: Teddysun <i@teddysun.com> # | |
# Thanks: @breakwa11 <https://twitter.com/breakwa11> # | |
# Intro: https://shadowsocks.be/9.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
version: '3' | |
services: | |
miniflux: | |
image: miniflux/miniflux:latest | |
ports: | |
- "80:8080" | |
depends_on: | |
- db | |
environment: | |
- DATABASE_URL=postgres://miniflux:secret@db/miniflux?sslmode=disable |
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
# Get latest version from https://bitbucket.org/iBotPeaches/apktool/downloads | |
export apktool_version=2.3.1 | |
sudo -E sh -c 'wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_$apktool_version.jar -O /usr/local/bin/apktool.jar' | |
sudo chmod +r /usr/local/bin/apktool.jar | |
sudo sh -c 'wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool -O /usr/local/bin/apktool' | |
sudo chmod +x /usr/local/bin/apktool | |
# To use: | |
# apktool d TelephonyProvider.apk -o TelephonyProvider |