Skip to content

Instantly share code, notes, and snippets.

View syntacticsugar's full-sized avatar
🎯
Focusing

RomyRomy syntacticsugar

🎯
Focusing
View GitHub Profile
!!! 5
/[if lt IE 7] <html lang="en" class="no-js ie6">
/[if IE 7 ] <html lang="en" class="no-js ie7">
/[if IE 8 ] <html lang="en" class="no-js ie8">
/[if IE 9 ] <html lang="en" class="no-js ie9">
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
%head
%meta{:charset => "utf-8"}/
/
Always force latest IE rendering engine (even in intranet) &amp; Chrome Frame
@lenard
lenard / bundles.sh
Created March 10, 2011 19:29 — forked from mads-hartmann/bundles.sh
install textmate bundles
#
# This script will install the following Textmate bundles
#
# Languages
# - c https://github.com/textmate/c.tmbundle
# - coffeescript https://github.com/jashkenas/coffee-script-tmbundle
# - context free https://github.com/textmate/context-free.tmbundle
# - erlang https://github.com/textmate/erlang.tmbundle
# - haskell https://github.com/textmate/haskell.tmbundle.git
# - html https://github.com/textmate/html.tmbundle
@fnhipster
fnhipster / html5.haml
Created April 9, 2011 01:19
HTML5 HAML Template
!!! 5
%html
%head
%title= "Your Website"
%meta{ :content => "", :name => "description" }
%meta{ :content => "", :name => "author" }
%meta{ :content => "3 days", :name => "revisit-after" }
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" }
@scottmessinger
scottmessinger / backbone-todos.js
Created June 19, 2011 00:09
Backbone.js todos vs knockout.js todos
We couldn’t find that file to show.
@deletosh
deletosh / _html5boilerplate.css.sass
Created December 3, 2011 22:19 — forked from richardvenneman/_html5boilerplate.css.sass
HTML5 Boilerplate HAML & SASS
/*
* HTML5 ✰ Boilerplate
*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*
* Detailed information about this CSS: h5bp.com/css
*
* ==|== normalize ==========================================================
@ryanb
ryanb / 0_the_explanation.md
Created December 22, 2011 06:23 — forked from jonsmock/0_the_explanation.txt
Oh the conditionals!

This example is not my real app, but it's modeled pretty closely to it.

My mom schedules a couple hundred employees at a local warehouse. In their system, a worker can earn "points" for being late or missing shifts. Here we have a sort of summary screen for my mom, who may need to follow up with new employees or discipline employees with concerning levels of points.

Questions that arise as I code something like this:

  • Which objects deserve presenters?
@ryanwitt
ryanwitt / huffman.py
Last active November 29, 2016 14:41
silly huffman coding example
__all__ = (
'frequency_histogram',
'endode_simple',
'decode_simple',
'huffman_tree',
'encode_character',
'encode_huffman',
'hist2dot',
'tree2dot',
)
@sent-hil
sent-hil / gist:3735640
Created September 17, 2012 05:00
Plan for HackerSchool Fall 2012
GOAL: Become a much, much better programmer:
Get better at Ruby and OOP in general,
Open black boxes and see what goes on underneath.
TIME: Oct 22 - Dec 20.
IDEAS (all open sourced):
* Learn how interpreters work.
Status: Finished Scheme interpreter in Ruby. Rewrite in Go?
@bil-bas
bil-bas / 00_overview.md
Created October 27, 2012 13:51
Ninety-Nine Haskell problems (Haskell)
anonymous
anonymous / rubymas.rb
Created January 4, 2013 02:03
12 days of Rubymas. Based on clojure implementation by @syntacticsugar
class Fixnum
def ordinal
%w[first second third fourth fifth sixth seventh eighth ninth tenth eleventh twelfth][self - 1]
end
# Use #to_word rather than #to_s, so it doesn't break any other printing of numbers.
def to_word
%w[one two three four five six seven eight nine ten eleven twelve][self - 1]
end
end