Skip to content

Instantly share code, notes, and snippets.

View TheNicholasNick's full-sized avatar

Nicholas Nick TheNicholasNick

View GitHub Profile
Ext.data.Record.create([
{name: "id"}
,{name: "rev"}
,{name: "created_at"}
,{name: "referrer"}
,{name: "first_name"}
,{name: "last_name"}
,{name: "mobile"}
,{name: "daytime_phone"}
,{name: "state"}
sproutcore@zn-vm1 ~/head $ ll demo/
total 8
drwxr-xr-x 2 sproutcore sproutcore 4096 May 19 08:47 .
drwxr-xr-x 4 sproutcore sproutcore 4096 May 19 08:47 ..
sproutcore@zn-vm1 ~/head $ abbot/bin/sc-init demo --verbose
FATAL ~ invalid byte sequence in US-ASCII
FATAL ~ BACKTRACE:
/home/sproutcore/.rvm/gems/ruby-1.9.2-head/gems/erubis-2.6.5/lib/erubis/converter.rb:132:in `scan'
/home/sproutcore/.rvm/gems/ruby-1.9.2-head/gems/erubis-2.6.5/lib/erubis/converter.rb:132:in `convert_input'
/home/sproutcore/.rvm/gems/ruby-1.9.2-head/gems/erubis-2.6.5/lib/erubis/converter.rb:36:in `convert'
/home/sproutcore/.rvm/gems/ruby-1.9.2-head/gems/erubis-2.6.5/lib/erubis/engine.rb:30:in `initialize'
/home/sproutcore/head/abbot/lib/sproutcore/models/generator.rb:382:in `new'
/home/sproutcore/head/abbot/lib/sproutcore/models/generator.rb:382:in `copy_file'
(eval):12:in `block (3 levels) in define!'
require ::File.dirname(__FILE__) + '/config/boot.rb'
dump = lambda do |env|
[200, {}, env.inspect]
end
map "/dump" do
run dump
end
.block
.secondary-navigation
%ul.wat-cf
%li.first.active=link_to pat(:list), url(:accounts, :index)
%li=link_to pat(:new), url(:accounts, :new)
.content
%h2.title
=pat(:all)
=mt(:account)
.inner
access_control.roles_for :any do |role|
role.protect "/user"
role.allow "/user/login"
role.allow "/user/logout"
role.allow "/user/new"
role.allow "/user/create"
end
Below are ping times from my ADSL2+ connection in Metro Sydney to various VPS hosts I have in the US
(ignore the packet loss, that is just me doing ctrl+c because I forgot to add the -c flag...)
Virpus.com
x-vm1 ~ # ping 208.89.208.x
PING 208.89.208.x (208.89.208.x) 56(84) bytes of data.
64 bytes from 208.89.208.x: icmp_seq=1 ttl=49 time=222 ms
64 bytes from 208.89.208.x: icmp_seq=2 ttl=49 time=219 ms
64 bytes from 208.89.208.x: icmp_seq=3 ttl=49 time=221 ms
zn05 www # tracepath 117.121.242.22
1: 111.118.160.28.reverse.crucialx.net (111.118.160.28) 0.150ms pmtu 1500
1: 203.98.84.254.reverse.crucialx.net (203.98.84.254) 1.058ms
1: 203.98.84.254.reverse.crucialx.net (203.98.84.254) 0.876ms
2: 111.118.161.14.reverse.crucialx.net (111.118.161.14) 1.002ms asymm 1
3: 203.98.88.35 (203.98.88.35) 15.235ms
4: 203.98.85.197 (203.98.85.197) 11.770ms asymm 3
5: Gi14-3-414.gw2.syd1.asianetcom.net (203.192.136.205) 1.761ms asymm 3
6: gi14-3.gw2.syd1.asianetcom.net (202.147.40.193) 2.870ms asymm 4
7: Pacific-Internet.gw2.syd1.asianetcom.net (203.192.166.150) 2.591ms asymm 5
slice01 ~ # tracepath 117.121.242.22
1: 137.96.78.204.in-addr.arpa (208.78.96.137) 0.123ms pmtu 1500
1: 208.78.96.1 (208.78.96.1) 0.288ms
1: 208.78.96.1 (208.78.96.1) 0.242ms
2: host123.datotel.com (208.75.82.123) 0.736ms
3: stl-c1-g1-15.datotel.com (208.82.151.29) 0.691ms
4: stl-e2-g0-2.datotel.com (208.82.151.13) 0.552ms
5: ge-6-20.car2.StLouis1.Level3.net (4.53.162.9) 0.705ms
6: ae-11-11.car1.StLouis1.Level3.net (4.69.132.185) 0.778ms
7: ae-4-4.ebr1.Denver1.Level3.net (4.69.132.182) 19.201ms
<?php
function parse2(&$handle, &$game_array){
global $total_games; // I dislike this more and more
while(!feof($handle)){
$text = fgets($handle);
// do we want to deal with this line of text?
if(preg_match("/creating game|shutting down|started loading|Game.*is over/", $text)){
// yes we do, get the timestamp
$date = substr($text, 1, 24);