-
Download Cygwin.
-
Run
setup.exe and install the following packages in addition to the default ones:- make
- boost
- libncurses-devel
- pkg-config
- perl
-
Download and compile Protocol Buffers (make sure there are no spaces in the working directory when compiling Protocol Buffers,
makewill fail if there are):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Yoga mat for sale. Used once at lunch hour class in December 2009. Usage timeline as follows: | |
| 11:45a | |
| Register for hot yoga class. Infinite wisdom tells me to commit to 5 class package and purchase a yoga mat. I pay $89.74. Money well spent, I smugly confirm to myself. | |
| 11:55a | |
| Open door to yoga room. A gush of hot dry air rushes through and past me. It smells of breath, sweat and hot. Take spot on floor in back of room next to cute blonde. We will date. | |
| 11:57a | |
| I feel the need to be as near to naked as possible. This is a problem because of the hot blonde to my left and our pending courtship. She will not be pleased to learn that I need to lose 30 pounds before I propose to her. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var module = (function create( | |
| namespace, handler, module | |
| ) { | |
| // ------------------------------------ | |
| // (C) WebReflection - MitStyle License | |
| // ------------------------------------ | |
| // @dependency npm install node-proxy | |
| // ------------------------------------ | |
| // var sys = module.sys; | |
| // sys.print("it works!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| import java.lang.*; | |
| class Main { | |
| public static void main (String[] args) throws java.lang.Exception { | |
| int size = 65536; | |
| Map m; | |
| long starttime, endtime; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package us.t4y.scratch; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| /** | |
| * Adapted from Twitter's Snowflake | |
| * http://github.com/twitter/snowflake | |
| */ | |
| public class Snowflake { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.yammer.metrics.annotation.Timed; | |
| import javax.ws.rs.GET; | |
| import javax.ws.rs.Path; | |
| import javax.ws.rs.Produces; | |
| import javax.ws.rs.core.Response; | |
| @Path("/healthcheck") | |
| public interface HealthCheck | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| regedit /e "%userprofile%\desktop\putty-registry.reg" HKEY_CURRENT_USER\Software\Simontatham |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Data.Numbers.Primes | |
| second = 1 | |
| minute = 60*second | |
| hour = 60*minute | |
| day = 1444*minute | |
| month = 30*day | |
| year = 12*month | |
| daysPerXKCDYear = 30*12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static InetAddress parseIpAddress(String ip) throws IllegalArgumentException { | |
| StringTokenizer tok = new StringTokenizer(ip, "."); | |
| if (tok.countTokens() != 4) { | |
| throw new IllegalArgumentException("IP address must be in the format 'xxx.xxx.xxx.xxx'"); | |
| } | |
| byte[] data = new byte[4]; | |
| int i = 0; | |
| while (tok.hasMoreTokens()) { |