Skip to content

Instantly share code, notes, and snippets.

View mustmodify's full-sized avatar

Johnathon E Wright mustmodify

View GitHub Profile
@mustmodify
mustmodify / fail_with_rbx_passenger_3
Created October 25, 2011 21:06
error causing 502 bad gateway with passenger 3 and RBX 2.0.0dev (1.8.7 ddd17fa2 yyyy-mm-dd JI) [x86_64-unknown-linux-gnu] via RVM
[ pid=2976 thr=139753072645888 file=ext/common/ApplicationPool/Pool.h:1162 time=2011-10-25 16:03:49.790 ]: Exception occurred while connecting to checked out process 3088: Cannot connect to Unix socket '/tmp/passenger.1.0.2972/generation-0/backends/ruby.sizO6NemgTXdYkm6VxOI2BX8kFz2n8bbDTgZnP46LaQT7BZtyvrZ3kXL': Connection refused (111)
[ pid=2976 thr=139753072645888 file=ext/common/ApplicationPool/Pool.h:685 time=2011-10-25 16:03:49.790 ]: Detaching process 3088
[ pid=2976 thr=139753072645888 file=ext/common/ApplicationPool/../Process.h:138 time=2011-10-25 16:03:49.790 ]: Application process 3088 (0xfb95c0): destroyed.
[ pid=2976 thr=139753072645888 file=ext/common/ApplicationPool/Pool.h:939 time=2011-10-25 16:03:49.790 ]: Spawning a process for /source/mustmodify/www because there are none for this app group
[ pid=2976 thr=139753072645888 file=ext/common/ApplicationPool/../SpawnManager.h:291 time=2011-10-25 16:03:49.790 ]: Spawning a new application process for /source/mustmodify/www...
[ pid=2976 thr=139753
@mustmodify
mustmodify / System Info
Created October 27, 2011 19:39
error when deploying via capistrano
jw@eagle:/source/saw/www$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
jw@eagle:/source/saw/www$ uname -a
Linux eagle 2.6.32-32-server #62-Ubuntu SMP Wed Apr 20 22:07:43 UTC 2011 x86_64 GNU/Linux
@mustmodify
mustmodify / html5.html
Created December 14, 2011 18:24
Attempts to get DocRaptor to render inline SVG images
<!DOCTYPE html>
<html>
<head>
<title>MathML and SVG in text/html</title>
</head>
<body>
<a href="https://developer.mozilla.org/en/Code_snippets/Embedding_SVG">Source</a>
<h1>SVG in text/html</h1>
<p><svg height=86 width=90 viewBox='5 9 90 86' style='float: left;'>
<path stroke=#F53F0C stroke-width=10 fill=#F5C60C stroke-linejoin=round d='M 10,90 L 90,90 L 50,14 Z'/>
@mustmodify
mustmodify / attempt 1..nrequi
Created January 21, 2012 16:26
attempt to get Nexmo gem to send SMS
jw@eagle:/projects/saw/www$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
jw@eagle:/projects/saw/www$ irb
1.9.3p0 :001 > require 'nexmo'
=> true
1.9.3p0 :002 > n = Nexmo::Client.new( ENV['NexmoKey'], ENV['NexmoSecret'] )
=> #<Nexmo::Client:0x0000000096be28 @secret="some_secret", @key="some_key", @headers={"Content-Type"=>"application/x-www-form-urlencoded"}, @http=#<Net::HTTP rest.nexmo.com:443 open=false>>
@mustmodify
mustmodify / gist:2036633
Created March 14, 2012 13:53
Pandora List
Unwritten
Sk8er Boi
They All Ask'd For You
Hugh Laurie
Simon & Garfunkle
Bon Jovi
Fiona Apple
Black Eyed Peas
Moves Like Jagger
Buddy Rich
@mustmodify
mustmodify / gist:2164351
Created March 22, 2012 20:54
cap deploy error for a 3.0.9 app
jw@eagle:/projects/some-client/lexicon$ bundle exec cap production deploy
* executing `production'
triggering start callbacks for `deploy'
* executing `multistage:ensure'
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote git@some-client.unfuddle.com:some-client/lexicon.git master"
command finished in 1695ms
@mustmodify
mustmodify / gist:2165056
Created March 22, 2012 22:19
rbx net-ssh rumble
bundle :060 > Net::SSH.start('physioagereporting.com', 'jw') do |ssh|
bundle :061 > ssh.exec 'whoami'
bundle :062?> end
TypeError: Tried to use non-reference value 0x1a as type Bignum (10)
from Zlib.inflateInit2 at /projects/eagle/rvm/rubies/rbx-head/lib/zlib.rb:557
from Zlib::Inflate#initialize at /projects/eagle/rvm/rubies/rbx-head/lib/zlib.rb:1422
from Net::SSH::Transport::State#decompressor at /source/experiments/rbx_cap/vendor/bundle/gems/net-ssh-2.3.0/lib/net/ssh/transport/state.rb:107
from Net::SSH::Transport::State#decompress at /source/experiments/rbx_cap/vendor/bundle/gems/net-ssh-2.3.0/lib/net/ssh/transport/state.rb:131
from Net::SSH::Transport::PacketStream(TCPSocket)#poll_next_packet at /source/experiments/rbx_cap/vendor/bundle/gems/net-ssh-2.3.0/lib/net/ssh/transport/packet_stream.rb:224
from Net::SSH::Transport::PacketStream(TCPSocket)#next_packet at /source/experiments/rbx_cap/vendor/bundle/gems/net-ssh-2.3.0/lib/net/ssh/transport/packet_stream.rb:86
@mustmodify
mustmodify / cancan.php
Created March 30, 2012 20:02
How to implement URP in PHP using a cancan-style interface
<?php
class User
{
public $admin;
public $roles = array();
function roles()
{
if (isset($this))
@mustmodify
mustmodify / gist:2431988
Created April 20, 2012 21:24
UNIX timestamp 1234567890
>> Time.at(1234567890).utc
=> Fri Feb 13 23:31:30 UTC 2009
@mustmodify
mustmodify / slider.css
Created April 24, 2012 18:44
Slider Components
tr.slider {
display: none;
}