Skip to content

Instantly share code, notes, and snippets.

View poberwong's full-sized avatar
🎯
Focusing

PoberWong poberwong

🎯
Focusing
View GitHub Profile
@jingmian
jingmian / ShadowSocks.sh
Last active January 9, 2023 05:27
Ubuntu下安装ShadowSocks客户端
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-setuptools m2crypto
pip install shadowsocks
如果是ubuntu16.04 直接 (16.04 里可以直接用apt 而不用 apt-get 这是一项改进)
sudo apt install shadowsocks
nohup sslocal -c /opt/trainee/shadowsocks.json &
@poberwong
poberwong / promiseTest.js
Last active January 16, 2018 07:16
use promise instead of callback
async function checkImage (file, pixels, onSuccess, onFailed) {
const {width, height} = pixels
return new Promise((resolve, reject) => {
try {
const img = await readImageFromFile(file)
if (img.width !== WIDTH || img.height !== HEIGHT) {
alert(`图标文件必须 ${pixels} 像素`)
} else {
resolve(img)
@VincentSit
VincentSit / update_gfwlist.sh
Last active October 14, 2024 09:52
Automatically update the PAC for ShadowsocksX. Only tested on OS X. (Deprecated)
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
@ph0b
ph0b / build.gradle
Last active February 12, 2023 07:45
sample build.gradle for generating split APKs per ABI
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e