Original source:
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('dart:io'); | |
| #import('dart:uri'); | |
| #import('dart:json'); | |
| // Dart Hackathon TLV 2012 | |
| // | |
| // A simple example to fetch JSON and parse it on the server side | |
| // This is a good start for a crawler and/or any other web service | |
| // we wish to create using dart on the server side. | |
| // |
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
| /** | |
| * Like, basically PERFECT scrollbars | |
| */ | |
| /* | |
| It's pure CSS. | |
| Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars... | |
| this has no fade-out effect. | |
| In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting. |
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
| require 'net/http' | |
| require 'colorize' | |
| # find all available three-letter .io domains | |
| alph = ('a'..'z') | |
| # generate all three-character strings | |
| threes = alph.map { |a| alph.map { |b| alph.map { |c| "#{a}#{b}#{c}" } } }.flatten | |
| def io_available?(tld) | |
| url = URI.parse("http://www.nic.io/cgi-bin/whois?query=#{tld}.io") |
Wes Winham [email protected]
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
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
| #!/bin/bash | |
| echo "Network speed testing..." | |
| cachefly=$( wget -O /dev/null http://cachefly.cachefly.net/100mb.test 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
| echo "Download speed from CacheFly: $cachefly " | |
| linodeatl=$( wget -O /dev/null http://atlanta1.linode.com/100MB-atlanta.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
| echo "Download speed from Linode, Atlanta GA: $linodeatl " | |
| linodedltx=$( wget -O /dev/null http://dallas1.linode.com/100MB-dallas.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) | |
| echo "Download speed from Linode, Dallas, TX: $linodedltx " | |
| linodejp=$( wget -O /dev/null http://tokyo1.linode.com/100MB-tokyo.bin 2>&1 | awk '/\/dev\/null/ {if ($4=="-") speed=$2 $3; else speed=$3 $4;} END {gsub(/\(|\)/,"",speed); print speed}' ) |
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
| #!/bin/sh | |
| # | |
| # init.d script for single or multiple unicorn installations. Expects at least one .conf | |
| # file in /etc/unicorn | |
| # | |
| # Modified by [email protected] http://github.com/jaygooby | |
| # based on http://gist.github.com/308216 by http://github.com/mguterl | |
| # | |
| ## A sample /etc/unicorn/my_app.conf | |
| ## |
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
| http { | |
| proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
| proxy_temp_path /var/tmp; | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; | |
| keepalive_timeout 65; | |
| gzip on; | |
| gzip_comp_level 6; |
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
| // To make the benchmark results predictable, we replace Math.random | |
| // with a 100% deterministic alternative. | |
| Math.random = (function() { | |
| var seed = 49734321; | |
| return function() { | |
| // Robert Jenkins' 32 bit integer hash function. | |
| seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff; | |
| seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff; | |
| seed = ((seed + 0x165667b1) + (seed << 5)) & 0xffffffff; | |
| seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff; |
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
| #!/usr/bin/env python | |
| #-*- coding:utf-8 -*- | |
| import sys | |
| import StringIO | |
| import requests | |
| import PIL.Image | |
| import tesserwrap |