Skip to content

Instantly share code, notes, and snippets.

View chenshaoju's full-sized avatar
🏠
Working from home

Chen Shaoju chenshaoju

🏠
Working from home
View GitHub Profile
@chenshaoju
chenshaoju / gist:8280737
Last active August 24, 2018 11:32
ffmpeg command line
ultrafast superfast veryfast faster fast medium slow slower veryslow placebo
<---fast/poor quality----------------------------------slow/good quality--->
Batch:
for %i in (G:\*.flv) do ffmpeg.exe -threads 4 -i %i -preset placebo -c:v libx264 -qp 25 -pix_fmt yuv420p -c:a libvo_aacenc -ac 2 -ar 22050 -b:a 64k "D:\TempData\3\%~ni.mp4"
JPG2AVI:
ffmpeg.exe -r 5/1 -i "D:\My Documents\Desktop\motion\Image%05d.jpg" -preset placebo -c:v libx264 -qp 1 -pix_fmt yuv420p "D:\My Documents\Desktop\Output_Lossless.mp4"
Sina:
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 ! -i lo -j REJECT --reject-with icmp-port-unreachable
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
@chenshaoju
chenshaoju / sysctl.conf
Last active September 7, 2023 06:31
sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additonal system variables
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 ! -i lo -j REJECT --reject-with icmp-port-unreachable
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
Jul 18 05:19:36 cluster sshd[4117]: debug1: PAM: setting PAM_RHOST to "58.215.29.2"
Jul 18 05:19:36 cluster sshd[4117]: debug1: PAM: setting PAM_TTY to "ssh"
Jul 18 05:19:36 cluster sshd[4117]: debug2: monitor_read: 50 used once, disabling now
Jul 18 05:19:36 cluster sshd[4117]: debug3: mm_request_receive entering
Jul 18 05:19:36 cluster sshd[4117]: debug3: monitor_read: checking request 3
Jul 18 05:19:36 cluster sshd[4117]: debug3: mm_answer_authserv: service=ssh-connection, style=, role=
Jul 18 05:19:36 cluster sshd[4117]: debug2: monitor_read: 3 used once, disabling now
Jul 18 05:19:36 cluster sshd[4117]: debug3: mm_request_receive entering
Jul 18 05:19:36 cluster sshd[4117]: debug3: monitor_read: checking request 21
Jul 18 05:19:36 cluster sshd[4117]: debug3: mm_answer_keyallowed entering

Keybase proof

I hereby claim:

  • I am chenshaoju on github.
  • I am chenshaoju (https://keybase.io/chenshaoju) on keybase.
  • I have a public key whose fingerprint is 05C1 1DE8 9B5A E51D 4F35 1331 D8E2 F636 43D3 B2CA

To claim this, I am signing this object:

function isMatchProxy(url, pattern) {
try {
return new RegExp(pattern.replace('.', '\\.')).test(url);
} catch (e) {
return false;
}
}
function FindProxyForURL(url, host) {
var Proxy = 'PROXY 127.0.0.1:10800';
# Shadowrocket: 2016-05-17 15:18:48
[General]
bypass-system = true
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,e.crashlynatics.com
bypass-tun = 0.0.0.0/8,1.0.0.0/9,1.160.0.0/11,1.192.0.0/11,10.0.0.0/8,14.0.0.0/11,14.96.0.0/11,14.128.0.0/11,14.192.0.0/11,27.0.0.0/10,27.96.0.0/11,27.128.0.0/9,36.0.0.0/10,36.96.0.0/11,36.128.0.0/9,39.0.0.0/11,39.64.0.0/10,39.128.0.0/10,42.0.0.0/8,43.224.0.0/11,45.64.0.0/10,47.64.0.0/10,49.0.0.0/9,49.128.0.0/11,49.192.0.0/10,54.192.0.0/11,54.191.0.0/16,58.0.0.0/9,58.128.0.0/11,58.192.0.0/10,59.32.0.0/11,59.64.0.0/10,59.128.0.0/9,60.0.0.0/10,60.160.0.0/11,60.192.0.0/10,61.0.0.0/10,61.64.0.0/11,61.128.0.0/10,61.224.0.0/11,100.64.0.0/10,101.0.0.0/9,101.128.0.0/11,101.192.0.0/10,103.0.0.0/10,103.192.0.0/10,106.0.0.0/9,106.224.0.0/11,110.0.0.0/7,112.0.0.0/9,112.128.0.0/11,112.192.0.0/10,113.0.0.0/9,113.128.0.0/11,113.192.0.0/10,114.0.0.0/9,114.128.0.0/11,114.192.0.0/10,115.0.0.0/8,116.0.0.0/8,117.0.0.0/9,117.128.0.0/10,118.0.0.0/11,118.64.0.0/10,118.128.0.
Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [D:\ShareFiles\052916-10500-01.dmp]
Mini Kernel Dump File: Only registers and stack trace are available
Symbol search path is: SRV*D:\symbols\*http://msdl.microsoft.com/download/symbols
Executable search path is:
#!/system/bin/sh
# Get current swap usage for all running processes
# Original author:Erik Ljungstrom 27/05/2011
# Edit: @chenshaoju
# Use '|sort -n -k 5' to sort
SUM=0
OVERALL=0
for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do
PID=`echo $DIR | cut -d / -f 3`
for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'`