Skip to content

Instantly share code, notes, and snippets.

@snowdream
snowdream / gist:d6a31d4b40858ed47e79
Created January 13, 2016 07:06
dos2unix整个目录
find . -type f -exec dos2unix {} \;
@snowdream
snowdream / genymotionwithplay.txt
Created January 6, 2016 08:48 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@snowdream
snowdream / snowdream.keystore
Created November 22, 2014 04:33
snowdream.keystore
feed feed 0000 0002 0000 0001 0000 0001
0009 736e 6f77 6472 6561 6d00 0001 49d5
c4c6 8100 0005 0130 8204 fd30 0e06 0a2b
0601 0401 2a02 1101 0105 0004 8204 e9c3
8d33 d8f9 a90a 5a58 2310 1f7a afd2 81f5
b5b0 ae94 e82b 7242 a9b3 5226 5e20 4910
d671 9ae8 4e32 0acf a9a7 cfa7 ba8b 5188
d0c1 fbdc 8655 22d9 35bf 418e 5c26 8b7f
4223 ea31 32be eaf2 02fa b67c 9af7 5bb9
b15b 649f 244d 60de f7b1 0671 5ff1 8dba
@snowdream
snowdream / using-ssh-over-the-https-port
Created August 8, 2014 17:06
Enabling SSH connections over HTTPS
If you are able to SSH into `[email protected]` over port 443, you can override your SSH settings to force any connection to github.com to run though that server and port.
To set this in your ssh config, edit the file at `~/.ssh/config`, and add this section:
Host github.com
Hostname ssh.github.com
Port 443
You can test that this works by connecting once more to github.com:
Host github.com
User [email protected]
Port 443
Hostname ssh.github.com
identityfile ~/.ssh/id_rsa
@snowdream
snowdream / rss.opml
Created April 8, 2014 02:07
rss.opml
<?xml version="1.0" encoding="UTF-8" ?>
<opml version="1.0">
<head>
<title>杨辉 subscriptions in Digg Reader</title>
</head>
<body>
<outline title="生活资讯" text="生活资讯">
<outline text="海淘" title="海淘" type="rss" xmlUrl="http://www.newsmth.net/nForum/rss/board-HaiTao" htmlUrl="http://www.newsmth.net/nForum/board/HaiTao" />
</outline>
<outline title="系统运维" text="系统运维">
public class ParentChildTest{
public static void main(String[] args){
Parent parent = new Parent();
parent.onDraw();
@snowdream
snowdream / iptables
Last active August 29, 2015 13:56
iptables-snowdream
# Generated by iptables-save v1.4.7 on Fri Feb 21 14:08:18 2014
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p tcp -m tcp --dport 5901:5902 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
@snowdream
snowdream / iptables-oschina
Created February 28, 2014 01:46
OSChina 服务器上的 iptables 配置
# Generated by iptables-save v1.3.5 on Mon Jan 11 14:01:33 2010
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [69433329:72212483414]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -i eth1 -j ACCEPT
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
interface Computable<K,V>{
V compute(final K arg);
}