Skip to content

Instantly share code, notes, and snippets.

Stef Lewandowski stefl

Block or report user

Report or block stefl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View designer.html
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
View Install Ruby WordNet on Mac OS X
(Untested - this is the gist of what you need to do)
Install Macports
Get the latest TCL/TK:
View uk-postcodes.rb
require 'rubygems'
require 'weary'
class Postie
def get(code)
(Weary.get "{code.gsub(' ', '')}.json").perform
postie =
View Add many users to a twitter list
usernames = "mrmactout
View A quick mashup for Royal Court
Here are the commands I used to create
(Assuming ruby, rubygems, heroku, git)
sudo gem install caboodle
caboodle create royalcourt
cd royalcourt
caboodle kit:add flickr
(input flickr username)
caboodle kit:add twitter
View Ruby rounding bug using floor on a float
If you do this:
You would expect 205.
Likewise with:
stefl / gist:798516
Created Jan 27, 2011
carbon coder video timecode inject
View gist:798516
<cnpsXML StartTimeCode="00:00:05;00"> <Markers>
<Marker_1 MarkerTime_27MHz.QWD="270000000" MarkerName="Marker1"/>
<Marker_2 MarkerTime_27MHz.QWD="540000000" MarkerName="Marker2"/>
<MyMarker MarkerTime_27MHz.QWD="810000000" MarkerName="MyMarker"/>
</Markers> </cnpsXML>
stefl / gist:812700
Created Feb 5, 2011
Json gem users take note...
View gist:812700
# Deal with the usual JSON gem idiocy. Guys, come on. I want to serialize an integer, surely this can't be that hard
class Fixnum
def to_json(options = nil)
stefl / gist:867165
Created Mar 12, 2011
Redirect trailing slashes in Sinatra
View gist:867165
get %r{(.+)/$} do |r| redirect r; end;
stefl / gist:888150
Created Mar 26, 2011
extract starting timecode from a video file using mediainfo
View gist:888150
mediainfo -f /files/timecode/ | grep '^Delay.*: [0-9][0-9]:' | awk '{split($0,a,": "); print a[2]}'
You can’t perform that action at this time.