Skip to content

Instantly share code, notes, and snippets.

View nummi's full-sized avatar
😺
Working from home

Jerry Nummi nummi

😺
Working from home
View GitHub Profile
while (YES)
{
//
// Lock focus and take all the dragged and mouse up events until we
// receive a mouse up.
//
NSEvent *newEvent = [window
nextEventMatchingMask:(NSLeftMouseDraggedMask | NSLeftMouseUpMask)];
if ([newEvent type] == NSLeftMouseUp)
self.updateCount = function(count) {
var $todoCount = $('#todo-stats .todo-count');
if (count === 0) {
$todoCount.html('');
} else {
var todoStat = '<span class="number">' + count + '</span> ';
if (count > 1) {
todoStat += '<span class="word">items left.</span>';
var test = ''
, beep = ''
, boop = ''
, meep = 'some super long operation goes here and maybe goes off screen'
;
@nummi
nummi / ios-test.css
Created October 19, 2011 19:10 — forked from tonywok/ios-test.css
iOS Media Queries
// iOS Media Queries
// Goal: capture styles for iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2
//
// Author: Tony Schneider (@tonywok)
// Please tell me where I fail. :)
// iPhone v(4,4S) portrait
// test: black text (overwritten by v* portrait) with blue background
@media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
a {
<style>
* { margin: 0; padding: 0; }
body { padding: 20px; }
ul {
width : 200px;
list-style : none;
}
ul li a {
@nummi
nummi / nav.html
Created December 6, 2011 14:15
Navigation
<style>
* { margin: 0; padding: 0; }
body { padding: 20px; }
ul {
width : 200px;
list-style : none;
}
ul li a {
@nummi
nummi / isoTransform.js
Created February 29, 2012 15:16 — forked from tdreyno/isoTransform.js
Isotope CSS3 jQuery cssHooks
// ========================= getStyleProperty by kangax ===============================
// http://perfectionkills.com/feature-testing-css-properties/
var getStyleProperty = (function(){
var prefixes = ['Moz', 'Webkit', 'Khtml', 'O', 'Ms'];
var _cache = { };
function getStyleProperty(propName, element) {
@nummi
nummi / hack.sh
Created March 31, 2012 18:11 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@nummi
nummi / config.ru
Created April 9, 2012 19:20
Serve static files with Ruby and Rack
require 'rubygems'
require 'rack/rewrite'
use Rack::Rewrite do
rewrite '/', '/index.html'
end
use Rack::Static, :urls => ['/'], :root => "public"
run Rack::Directory.new('public')
@nummi
nummi / gist:2781736
Created May 24, 2012 14:03 — forked from panayi/gist:2781592
Ember.js: Animating view with JQ.Animation mixin
JQ.Animate = Ember.Mixin.create({
cssProperties: ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage', 'backgroundPosition',
'backgroundRepeat', 'border', 'borderBottom', 'borderBottomColor', 'borderBottomStyle', 'borderBottomWidth',
'borderColor', 'borderLeft', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRight', 'borderRightColor',
'borderRightStyle', 'borderRightWidth', 'borderStyle', 'borderTop', 'borderTopColor', 'borderTopStyle', 'borderTopWidth',
'borderWidth', 'clear', 'clip', 'color', 'cursor', 'display', 'filter', 'font', 'fontFamily', 'fontSize',
'fontVariant', 'fontWeight', 'height', 'left', 'letterSpacing', 'lineHeight', 'listStyle', 'listStyleImage',
'listStylePosition', 'listStyleType', 'margin', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop', 'overflow',
'padding', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'pageBreakAfter', 'pageBreakBefore',
'position', 'styleFloat', 'textAlign', 'textDecoration'