Skip to content

Instantly share code, notes, and snippets.

View limptwiglet's full-sized avatar
🎯
Focusing

Mark Gerrard limptwiglet

🎯
Focusing
View GitHub Profile
import { describe, it } from 'mocha';
import { expect } from 'chai';
import Nav from '../../src/components/Nav.html';
import { getByText } from 'dom-testing-library';
describe('first test', () => {
it('should be testable', () => {
let nav = new Nav({
target: document.body
});
$cols-count = 12
$cols-max-width = 960px
$ratio = 100 / 960
$cols-gutter = ($ratio * 28px)%
$cols-margin = ($ratio * 5px)%
$col-width = $ratio * (960 / 12)%
$cols-padding = 3%
.l-cols
content ""
set -g default-terminal "xterm-256color"
set -g base-index 1
set -g status-left-length 32
set -g status-right-length 150
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
@limptwiglet
limptwiglet / gist:7978304
Created December 15, 2013 21:19
Tmux conf
set -g default-command "reattach-to-user-namespace -l zsh"
set -g default-terminal "xterm-256color"
set -g base-index 1
set -g status-left-length 32
set -g status-right-length 150
set -g status-fg white
{
"name": "hole",
"version": "0.0.1",
"description": "My Test",
"main": "index.js",
"scripts": {
"start": "server.js"
},
"dependancies": {
},
var validateUnique = function(model, field){
return function(form, field, callback){
var model = db.model(model);
var q = {};
q[field] = form.data[field];
model.findOne(q, 'name', function(err, doc){
});
};
{
"dependencies": {
"flatiron": {
"version": "0.2.8",
"dependencies": {
"broadway": {
"version": "0.2.5",
"dependencies": {
"cliff": {
"version": "0.1.8",
var util = require('util');
function Foo () {
// Constructor function
}
function Bar () {
// Call foo's constructor
Foo.call(this, arguments);
@limptwiglet
limptwiglet / gist:3380236
Created August 17, 2012 16:07
Ember View builder
glob.sync(__dirname + '/public/js/templates/**/*.html').forEach(function (file) {
var path = file.split('/');
var fileName = path[path.length - 1];
var templateName = fileName.replace('.html', '');
var html = fs.readFileSync(file, 'utf8');
var dest = __dirname + '/public/js/.tmp/' + templateName + '.js';
html = html.replace(new RegExp('"', 'g'), '\\"');
html = html.replace(/[\r\n]/g, '');
@limptwiglet
limptwiglet / gist:3047493
Created July 4, 2012 13:57
Ember Router
Z.Router = Ember.Router.extend({
root: Ember.Route.extend({
showInventory: Ember.State.transitionTo('inventory'),
showSkills: Ember.State.transitionTo('skills'),
close: Ember.State.transitionTo('index'),
exit: function (router) {
console.log('exit', arguments);
},