apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
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 kscript | |
import java.io.File | |
// usage - one argument a .kt file (Scala file that was only renamed) | |
// or a directory | |
try { | |
main(args) | |
} catch (e: Exception) { | |
e.printStackTrace() |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
/* //device/apps/common/assets/res/any/dimens.xml | |
** | |
** Copyright 2006, The Android Open Source Project | |
** | |
** Licensed under the Apache License, Version 2.0 (the "License"); | |
** you may not use this file except in compliance with the License. | |
** You may obtain a copy of the License at | |
** |
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
def make_markdown_table(array): | |
""" Input: Python list with rows of table as lists | |
First element as header. | |
Output: String to put into a .md file | |
Ex Input: | |
[["Name", "Age", "Height"], | |
["Jake", 20, 5'10], | |
["Mary", 21, 5'7]] |
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
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") |
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
#proxy | |
alias openTProxy="export http_proxy='http://127.0.0.1:8123/' \ | |
export https_proxy='http://127.0.0.1:8123/' \ | |
export ftp_proxy='http://127.0.0.1:8123/' \ | |
export no_proxy='localhost,127.0.0.1,localaddress,.localdomain.com' \ | |
export HTTP_PROXY='http://127.0.0.1:8123/' \ | |
export HTTPS_PROXY='http://127.0.0.1:8123/' \ | |
export FTP_PROXY='http://127.0.0.1:8123/' \ | |
export NO_PROXY='localhost,127.0.0.1,localaddress,.localdomain.com' \ | |
polipo socksParentProxy=127.0.0.1:1080" |
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 | |
DOWNLOAD_DIR="${HOME}/MiniDLNA" | |
CONFIG_DIR="${HOME}/.aria2" | |
RPC_TOKEN="changeIt" | |
RPC_PORT="6800" | |
change_apt_source(){ | |
if [ -f /etc/apt/sources.list ]; then | |
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak |
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 | |
LOCAL_DB="" | |
REMOTE_DB="" | |
LOCAL_USER="root" | |
LOCAL_PASS="" | |
REMOTE_USER="root" | |
REMOTE_PASS='' |
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
import os | |
import os.path | |
import xml.etree.ElementTree as ET | |
tree = ET.parse('AndroidLintUnusedResources.xml') | |
root = tree.getroot() | |
def deleteFile(): | |
today = datetime.datetime.today() | |
return xmlrpclib.DateTime(today) |