Skip to content

Instantly share code, notes, and snippets.

View sbeckeriv's full-sized avatar
🐢
Horray another status box

becker sbeckeriv

🐢
Horray another status box
  • Death By Escalator
  • Seattle
  • 02:49 (UTC -07:00)
View GitHub Profile
@sbeckeriv
sbeckeriv / gist:5735827
Created June 8, 2013 16:45
pdf converted to text vi shows like this STATE OF WASHINGTON<feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <fef f> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff> <feff>…
STATE OF WASHINGTON                                                                                                            Inspection Form No. 20090304
                                                                                                                               Inspection Date: 3/4/2009
DEPARTMENT OF LICENSING
Program: COS                                                                                                                   Inspector: Jackie Chambers
Profession: Salon/Shop
                                                                   A COPY OF THIS INS
class CertificateCache
MAXIMUM_ALLOWED_CERTIFICATES = 50 #Then clear
include Singleton
class CertificateStore
def initialize
@certificates = {}
end
def get_certificate(cert_url)
\"""/
| | WINNING
▄██████████████▄▐█▄▄▄▄█▌
████████████████▌▀▀██▀▀
████▄████████████▄▄█▌
▄▄▄▄▄██████████████▀
@sbeckeriv
sbeckeriv / add_olsen_timezones.rb
Created September 25, 2013 18:46
jstimezonedetect javascript has a few more timezones then rails. This should add them in.
#https://bitbucket.org/pellepim/jstimezonedetect/src/f9e3e30e1e1f53dd27cd0f73eb51a7e7caf7b378/jstz.js?at=default#cl-266
#missing timezones
missing_timezones = {"-600,1"=>"America/Adak", "-570,0"=>"Pacific/Marquesas", "-540,0"=>"Pacific/Gambier", "-540,1"=>"America/Anchorage", "-480,0"=>"Pacific/Pitcairn", "-360,1,s"=>"Pacific/Easter", "-240,0"=>"America/Santo_Domingo", "-120,0"=>"America/Noronha", "-120,1"=>"America/Noronha", "0,0"=>"UTC", "60,0"=>"Africa/Lagos", "60,1,s"=>"Africa/Windhoek", "120,1"=>"Asia/Beirut", "240,0"=>"Asia/Dubai", "360,1"=>"Asia/Omsk", "525,0"=>"Australia/Eucla", "525,1,s"=>"Australia/Eucla", "630,1,s"=>"Australia/Lord_Howe", "690,0"=>"Pacific/Norfolk", "720,0"=>"Pacific/Tarawa", "840,0"=>"Pacific/Kiritimati"}
missing_timezones.each{|key,value|
minutes, daylight, south = key.split(",")
ActiveSupport::TimeZone.create(value, minutes.to_i.minutes.seconds)
}
@sbeckeriv
sbeckeriv / .neovimrc
Created February 23, 2014 04:12
neovim vunder
set nocompatible
set runtimepath=~/.neovim/
filetype off
set rtp+=~/.neovim/bundle/vundle/
call vundle#rc('~/.neovim/bundle')
Bundle 'gmarik/vundle'
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'tpope/vim-fugitive'
set nocompatible
set runtimepath=~/.neovim-test/
if has('syntax') && !exists('g:syntax_on')
syntax enable
endif
Very sorry I am new to cmake. I am guessing from this page I need to set -prefix=$HOME
http://curiousreef.com/class/learning-vim-from-the-inside/lesson/3/assgn/1/
I checked out the code and built it. I am running this testrc file
https://gist.github.com/sbeckeriv/9166746
/Users/becker/trash/neovim/build/src/vim -u ~/.testrc ~/.testrc
Error detected while processing /Users/becker/.testrc:
line 4:
function label_awaiting_reply() {
var emailAddress = Session.getEffectiveUser().getEmail();
Logger.log(emailAddress);
var EMAIL_REGEX = /[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\.\-]+\.[a-z\.A-Z]+/g;
var label = GmailApp.createLabel("AwaitingReply");
var d = new Date();
d.setDate(d.getDate() - 7);
var dateString = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();
threads = GmailApp.search("in:Sent after:" + dateString);
for (var i = 0; i < threads.length; i++)
@sbeckeriv
sbeckeriv / gist:9c3ced686acf08e78d42
Last active August 29, 2015 14:06
Ruby ellipse
class String
def …(max_length = 30)
self.size > max_length ? self[0..max_length]+"…" : self
end
end
[
{
"nodeIndex": 0,
"nodeHash": 4076480290,
"state": 10,
"stateId": "Complete",
"isActivated": true,
"stepIndex": 0,