Skip to content

Instantly share code, notes, and snippets.

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

snowdream snowdream

🏠
Working from home
View GitHub Profile
@snowdream
snowdream / gradle.properties
Created February 21, 2014 02:07
gradle.properties located in gradle user home.
# gradle.properties located in gradle user home.
# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
@snowdream
snowdream / hosts
Created February 23, 2014 01:14
hosts
/*
* Copyright (C) 2014 Snowdream Mobile <yanghui1986527@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
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);
}
@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
@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
public class ParentChildTest{
public static void main(String[] args){
Parent parent = new Parent();
parent.onDraw();
@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="系统运维">
Host github.com
User xxxx@gmail.com
Port 443
Hostname ssh.github.com
identityfile ~/.ssh/id_rsa
@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 `git@ssh.github.com` 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:
@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