Skip to content

Instantly share code, notes, and snippets.

View boennemann's full-sized avatar

Stephan Bönnemann-Walenta boennemann

View GitHub Profile

When a beginner asks you "when do I use semi-colons?" would you rather say this?

// what people who say "use semicolons!!" say
class Foo {
  prop = {
  }; // yes
@mikeal
mikeal / gist:6685843
Last active December 23, 2015 19:58
Response to comments by Issac Roth of StrongLoop

This is rather out of date and we've all moved past it. Me and Issac are cool now.

pic

@cowboy
cowboy / grunt-subgrunt.js
Created October 2, 2012 13:31
Grunt 0.4.0a (devel) Run a subproject's grunt tasks.
/*
* grunt-subgrunt
* http://gruntjs.com/
*
* Copyright (c) 2012 "Cowboy" Ben Alman
* Licensed under the MIT license.
* https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
*/
'use strict';
width = 102 # width of rectangle
height = 40 # height of rectangle
pos_x = 3 # x coordinate for entire grid
pos_y = 3 # y coordinate for entire grid
y_margin = 3 # vertical space between rectangles
x_margin = 3 # horizontal space between rectangles
columns = 3 # number of columns
rows = 5 # number of rows
columns.times do |col| # number of columns
@rexmac
rexmac / gist:3189232
Created July 27, 2012 17:21 — forked from getify/gist:3185473
attempting to use jParser to extract dimensions of JPG image file
var fs = require("fs");
var jParser = require("jParser");
var eof = false;
fs.readFile("sample.jpg",function(err,data) {
if (!err) {
var view = new jDataView(data, undefined, undefined, false);
var parser = new jParser(view,{
// JPG
@jvdgoot
jvdgoot / gist:2427304
Created April 20, 2012 09:19
Allow text selection in Quick Look
# Allow text selection in Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true