Skip to content

Instantly share code, notes, and snippets.

{"type":"MultiLineString","coordinates":[[[13.358133,52.476019],[13.364982,52.47319]],[[13.364982,52.47319],[13.367145,52.474312],[13.369873,52.474765],[13.374165,52.475386],[13.37657,52.476489],[13.37866,52.479516]],[[13.353179,52.479835],[13.352775,52.479808],[13.358133,52.476019]]]}
require 'socket'
require 'minitest/autorun'
describe '0x8c' do
it 'works' do
pid = Process.fork do
C=[];require 'gserver';Class.new(GServer){def serve(i)h=p;C<<i;i.each_line{|l|C.map{|c|c<<(h||=l.strip)+'>'+l}};end}.new($$,'*').start.join #"
#!/usr/bin/env ruby
#
# Calls a running emacs server to visit a file, and optionally move
# point to a line number when included after a colon, e.g. like the
# one from a ruby stacktrace:
#
# emacs-find-file foo/bar.rb:123
abort "Usage: emacs-find-file <file>" unless ARGV[0]
@til
til / gist:2602276
Created May 5, 2012 13:09
Simple script to diagnose network problems of local computer
#!/usr/bin/env ruby
#
# Simple script to diagnose network problems of the local computer:
# runs a couple of checks and aborts on first failure. This should
# help to find the cause of the problem quicker.
def headline(name)
puts
puts "--- #{name} ".ljust(80, '-')
end
#!/bin/sh
spork rspec &
spork cucumber &
tail -n 0 -f log/test.log
wait
Started GET "/refinery" for xxxx at 2011-02-09 17:24:59 +0100
Processing by Admin::DashboardController#index as HTML
Parameters: {"locale"=>:en}
Role Load (0.3ms) SELECT "roles".* FROM "roles" WHERE ("roles"."title" = 'Refinery') LIMIT 1
User Load (0.5ms) SELECT * FROM "users" INNER JOIN "roles_users" ON "users".id = "roles_users".user_id WHERE ("roles_users".role_id = 1 )
Completed in 3ms
Psych::SyntaxError (couldn't parse YAML at line 18 column 33):
$ pgrep -fl 4002
8022 unicorn_rails master -c config/unicorn.rb -E production -p 4002 -D
8024 unicorn_rails master -c config/unicorn.rb -E production -p 4002 -D
26734 unicorn_rails worker[0] -c config/unicorn.rb -E production -p 4002 -D
26736 unicorn_rails worker[0] -c config/unicorn.rb -E production -p 4002 -D
26737 unicorn_rails worker[2] -c config/unicorn.rb -E production -p 4002 -D
26739 unicorn_rails worker[0] -c config/unicorn.rb -E production -p 4002 -D
26740 unicorn_rails worker[2] -c config/unicorn.rb -E production -p 4002 -D
26741 unicorn_rails worker[2] -c config/unicorn.rb -E production -p 4002 -D
26742 unicorn_rails worker[1] -c config/unicorn.rb -E production -p 4002 -D
require 'rubygems'
require 'soap/wsdlDriver'
host = "developer-api.affili.net"
factory = SOAP::WSDLDriverFactory.new("https://#{host}/V2.0/Logon.svc?wsdl")
driver = factory.create_rpc_driver
driver.generate_explicit_type = true
driver.wiredump_dev = STDOUT
~/ptwitter/my2cents/trunk $ ant debug
Buildfile: build.xml does not exist!
Build failed
Debugger entered--Lisp error: (file-error "Cannot open load file" "gist")
require(gist)
eval((require (quote gist)))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)