Skip to content

Instantly share code, notes, and snippets.

@MichaelMartinez
MichaelMartinez / dabblet.css
Created February 6, 2012 06:11
playing with holes
/**
* playing with holes
*/
background:
radial-gradient(green 5%, transparent 17%) 0 0,
radial-gradient(green 5%, transparent 16%) 8px 8px,
radial-gradient(rgba(255,255,255,.4) 5%, transparent 20%) 0 1px,
radial-gradient(rgba(255,255,255,.4) 5%, transparent 20%) 8px 9px;
@MichaelMartinez
MichaelMartinez / dabblet.css
Created February 6, 2012 06:14
Green Print
/**
* Green Print
*/
background-color:#5db200;
background-image: linear-gradient(white 2px, transparent 2px),
linear-gradient(0, white 1px, transparent 2px),
linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),
linear-gradient(0, rgba(255,255,255,.3) 1px, transparent 1px);
@MichaelMartinez
MichaelMartinez / Makefile
Created February 21, 2012 19:09 — forked from pamelafox/Makefile
Phonegap/App Engine Makefile
# Javascript/CSS Compressor Makefile - By Benjamin "balupton" Lupton (MIT Licenced)
MAKEFLAGS = --no-print-directory --always-make
MAKE = make $(MAKEFLAGS)
BUILDDIR = ./.build
# Tools and such
CLOSUREURL = http://closure-compiler.googlecode.com/files/compiler-latest.zip
CLOSUREDIR = $(BUILDDIR)/closure

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@MichaelMartinez
MichaelMartinez / gist:1990812
Created March 7, 2012 03:46
Addy's Helpful tools
Dillinger.io
==========
http://dillinger.io - An excellent markdown editor in the browser which can connect with both Dropbox and GitHub. I personally use it for everything from drafting slides to articles when Mou (http://mouapp.com/) isn't available. We're working on bringing GitHub markdown and Gist support to it soon.
HTML5 Please API
===============
http://api.html5please.com - (Released this week) An API and set of widgets for detecting modern browser features required by your page/app/demo and suggesting compatible alternatives to your users if yours doesn't meet requirements. We're hoping to convince some Chrome experiments to adopt this shortly.
HTML5 Please
===============
@MichaelMartinez
MichaelMartinez / Coffeescript
Created March 7, 2012 04:59
Coffee-Script with Jasmine Output
describe "StringCalc", ->
describe "constructor", ->
beforeEach ->
@mystrCalc = new StrCalc '1'
it 'extracts first number', ->
(expect @mystrCalc.add).toEqual(1)
@MichaelMartinez
MichaelMartinez / gist:2014544
Created March 11, 2012 02:00
CoffeeScript StrCalc Kata - Jasmine Spec's
describe "StringCalc", ->
describe "constructor with null", ->
beforeEach ->
@mystrCalc = new StrCalc()
it 'replaces null with 0', ->
(expect @mystrCalc.firstNum).toEqual 0
describe "constructor with zero ", ->
beforeEach ->
@MichaelMartinez
MichaelMartinez / gist:2014548
Created March 11, 2012 02:04
CoffeeScript StrCalc Kata Implementation
window.StrCalc = class StrCalc
constructor: (myStr = 0) ->
if myStr is '0' or myStr is 0
@firstNum = 0
else
@parseMyNum myStr
parseMyNum: (myStr) ->
pattern = /(\d)+.*?(\d*)/gm
@MichaelMartinez
MichaelMartinez / Coffeescript1
Created March 13, 2012 04:46
Coffee-Script Constructor
describe "constructor w/object", ->
beforeEach ->
@newUser = new User()
it "should instantiate new user", ->
(expect @newUser.firstName).toEqual 'Michael'
npm init creates a package json for you
npm install --save adds that module + version to the package.json
first init, then install --save
if you want to use the one that youv'e already installed globally, and you are not on windows, you can do `npm link modulename`
`npm ls --global`
any npm command can be done in global mode with -g|--global
can you remove the link if you no longer want it?
yeah. npm rm modulename
just like uninstalling