Skip to content

Instantly share code, notes, and snippets.

View mose's full-sized avatar

Mose mose

View GitHub Profile
@mose
mose / command.js
Last active August 29, 2015 13:56
A snippet for backtick chrome extension
javascript:window.prompt("Copy to clipboard: Ctrl+C, Enter", document.URL.replace(/sid=[0-9a-f]*&?/,''));return false;
@mose
mose / web.go
Created September 12, 2013 07:52
just a tutorial followup
package main
import (
//"fmt"
"net/http"
"io/ioutil"
"html/template"
"regexp"
"errors"
"log"
@mose
mose / mail interceptor
Last active December 21, 2015 08:28
mail interceptor in rails
# lib/mailinterceptor.rb
class MailInterceptor
def self.delivering_email(message)
message.to = "dev@example.com"
message.subject = "[#{message.to}] " + message.subject
end
end
# config/initializers/setup_mail.rb
@mose
mose / sauce.rb
Created May 10, 2013 09:13
saucelabs rspec trick
if ENV['sauce']
module Job
extend self
def id
@__jobid || 'undefined'
end
def id=(j)
@__jobid ||= j
end
@mose
mose / index.html
Created April 17, 2013 18:46
A CodePen by Mose. Face box-shadows
<div id="face">
<div class="eye left"></div>
<div class="eye right"></div>
<div class="nose"></div>
<div class="mouth"></div>
</div>
@mose
mose / numeral2number.py
Created March 19, 2013 01:48
Some playing around with python
import re
subnums = [ ('cd',4*'c'),
('xl',4*'x'),
('iv',4*'i'),
('d',5*'c'),
('l',5*'x'),
('v',5*'i'),
('cm',9*'c'),
('xc',9*'x'),