Skip to content

Instantly share code, notes, and snippets.

@galaxy001
galaxy001 / git-pull-all
Created June 21, 2019 05:12 — forked from grimzy/git-pull-all
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@galaxy001
galaxy001 / gollum_baiduyun_v3.4.5.js
Created September 7, 2018 14:16 — forked from mcxiaoke/gollum_baiduyun_v3.4.5.js
Gollum for Baiduyun, Ver.3.4.5
/**
* 贪灵Gollum for Baiduyun, Ver.3.4.5
* 立即执行函数:百度云盘批量转存用户分享。
*
* 【特点】
* - 可保持或无视原分享者的目录结构。
* - 支持差分转存。
* - 自动分解转存,可突破单次转存总文件数5000的限制。
* - 可在分享主页下,进入某文件夹来转存其下级子文件夹。
* - 支持专辑转存。
@galaxy001
galaxy001 / dns2https.swoole.php
Created August 2, 2017 10:25
dns2https.swoole.php
<?php
/*
tcp dns client for google dns over https (https://dns.google.com)
ubuntu上使用:
在/etc/rc.local里加/usr/bin/php /home/<your_name>/dns2https.php
执行:
sysv-rc-conf unbound off
sysv-rc-conf dnscrypt-proxy off
@galaxy001
galaxy001 / how-clowwindy-design-Shadowsocks.md
Created February 17, 2017 19:23
clowwindy设计Shadowsocks的思路分析以及设计理念

clowwindy设计Shadowsocks的思路分析以及设计理念

鄙人不才,尝试站在原作者clowwindy的角度,来分析一下原版协议的设计思路和理念。 没参与过最初开发,不过设计了AEAD这个协议。读了一些资料,评论。

7:58 PM, 31 Aug 2015 作者发了这么一段话,我很好奇其中的指代内容,遂有本文。

眼睁睁看着一群人把一个东西搞错然后朝着错误的方向走了。不过懒得管了 =。=

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.google.Chrome</key>

Keybase proof

I hereby claim:

  • I am galaxy001 on github.
  • I am galaxy001 (https://keybase.io/galaxy001) on keybase.
  • I have a public key whose fingerprint is 3209 312F EC81 F062 CAD0 96FF 55BB D8CD 9969 AEA7

To claim this, I am signing this object:

@galaxy001
galaxy001 / parse_h265.py
Created April 19, 2016 14:39 — forked from figgis/parse_h265.py
H.265/HEVC bitstream parser
#!/usr/bin/env python
"""
- ae(v): context-adaptive arithmetic entropy-coded syntax element. The parsing process for this descriptor is
specified in clause 9.3.
- b(8): byte having any pattern of bit string (8 bits). The parsing process
for this descriptor is specified by the return value of the function
read_bits( 8 ).
- f(n): fixed-pattern bit string using n bits written (from left to right)
@galaxy001
galaxy001 / gist:203407b0d85e02d8d359
Created December 8, 2015 12:29 — forked from jvenator/gist:9672772a631c117da151
PDFtk Server Install Workaround for Mac OS X

Installing PDFtk Server edittion on your Mac

This workaround install is necessary because PDFtk was pulled from homebrew-cask due to issues with it aggressively overwriting file permissions that could impact other installed libraries. See this homebrew-cask issue.
The following steps worked on Mac OS X 10.10.1 with a standard brew installation for the PDFtk Mac OS X server libary version 2.02.
All Terminal commands separated by a full line space. Some commands wrap into multiple lines.

Download and extract the Mac OS X server install pacakge