Skip to content

Instantly share code, notes, and snippets.

View j67678's full-sized avatar

j67678

View GitHub Profile
@j67678
j67678 / stacktrace
Created February 26, 2017 01:28
After restore app from Nandroid Backup Manager
02-26 09:10:48.693 2000 2000 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {net.ohrz.coldlauncher/net.ohrz.coldlauncher.Launcher}: java.lang.RuntimeException: Collision while binding workspace item: ShortcutInfo(title=网易云音乐 isFrozen=false appName={com.netease.cloudmusic/com.netease.cloudmusic.activity.LoadingActivity} intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.netease.cloudmusic/.activity.LoadingActivity (has extras) } id=266 targetComponent=ComponentInfo{com.netease.cloudmusic/com.netease.cloudmusic.activity.LoadingActivity} appInfo=null type=0 container=-100 screen=3 cellX=2 cellY=2 spanX=1 spanY=1 dropPos=null icon=android.graphics.Bitmap@50a4ca customIcon=false user=UserHandle{0}). Collides with ShortcutInfo(title=超级授权 isFrozen=false appName={eu.chainfire.supersu/eu.chainfire.supersu.MainActivity-Material} intent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=eu.
@j67678
j67678 / local_manifests.xml
Created February 25, 2017 06:26
cm13 sultan
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!--Patcher (run "./patcher/patcher.sh" before each compilation)-->
<project path="patcher" name="sultanxda/patcher" revision="stable/cm-13.0-oneplus3" />
<!--Repositories to replace-->
<remove-project name="CyanogenMod/android_hardware_qcom_bt" />
<remove-project name="CyanogenMod/android_hardware_qcom_audio" />
<remove-project name="CyanogenMod/android_hardware_qcom_display" />
@j67678
j67678 / .vimrc
Created October 26, 2016 02:08
.vimrc
set ts=4 sw=4
set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1
set enc=utf8
set fencs=utf8,gbk,gb2312,gb18030
@j67678
j67678 / setup_mosh_centos.sh
Created July 5, 2016 07:49 — forked from tancnle/setup_mosh_centos.sh
Setup mosh on Centos 6.x
#!/bin/sh
# Update latest epel
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm
# Download and build mosh
sudo yum -y install rpm-build rpmdevtools protobuf-compiler protobuf-devel libutempter-devel zlib-devel ncurses-devel openssh-clients perl-IO-Tty openssl-devel gcc gcc-c++
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
@j67678
j67678 / install.sh
Last active May 26, 2016 10:52
CentOS 7 squid
setenforce 0
ulimit -n 1048576
echo "* soft nofile 1048576" >> /etc/security/limits.conf
echo "* hard nofile 1048576" >> /etc/security/limits.conf
echo "alias net-pf-10 off" >> /etc/modprobe.d/dist.conf
echo "alias ipv6 off" >> /etc/modprobe.d/dist.conf
killall sendmail
systemctl stop postfix
systemctl disable postfix
yum -y install squid wget
@j67678
j67678 / wan-up
Created April 5, 2016 10:10 — forked from systembell/wan-up
Selective VPN routing in Tomato
# This code goes in the WAN UP section of the Tomato GUI.
#
# To list the current rules on the router, issue the command:
# iptables -t mangle -L PREROUTING
#
# Flush/reset all the rules to default by issuing the command:
# iptables -t mangle -F PREROUTING
#
#
# First it is necessary to disable Reverse Path Filtering on all
-----BEGIN CERTIFICATE-----
MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
@j67678
j67678 / .htaccess
Last active March 24, 2016 03:01
PAC Server
RewriteEngine on
RewriteRule ^/?pac/(.*)$ pac.php?proxy=$1 [L]
RewriteRule ^/?pac2/(.*)$ pac2.php?proxy=$1 [L]