Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mixin arrow_helper($arrowSize, $arrowColor, $margin, $side, $align) {
@if $side == "top" {
border-bottom-color: $arrowColor;
top: -2 * $arrowSize;
}
@if $side == "bottom" {
border-top-color: $arrowColor;
bottom: -2 * $arrowSize;
}
@if $side == "left" {
@builtbylane
builtbylane / 0_reuse_code.js
Created June 9, 2014 16:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@builtbylane
builtbylane / toolbox.scss
Created June 13, 2014 15:01
Lane's Sass Helpers
// cover e-v-e-r-y-t-i-n-g
@mixin coverer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
// center
/**
* Converts an image to
* a base64 string.
*
* If you want to use the
* outputFormat or quality param
* I strongly recommend you read the docs
* @ mozilla for `canvas.toDataURL()`
*
* @param {String} url
_.mixin({
serialize: function (obj) {
var urlParams = _.map(obj, function (val, key) {
var value = (_.isObject(val)) ? JSON.stringify(val) : String(val);
return String(key) + '=' + value;
});
return urlParams.join('&');
}
});
@builtbylane
builtbylane / gist:921b2df18b224ba27467
Last active August 29, 2015 14:08
watchifying multiple bundles with gulp
var gulp = require('gulp');
var filter = require('gulp-filter');
var source = require('vinyl-source-stream');
var gutil = require('gulp-util');
var path = require('path');
var colors = require('colors');
var createBundle = function(file) {
var method = (env.prebuild || env.stage || env.production) ? 'browserify' : 'watchify';
cd /usr/local/Library/Formula
brew remove node --force
brew versions node
git checkout 83988e4 /usr/local/Library/Formula/node.rb
brew install node
### Keybase proof
I hereby claim:
* I am builtbylane on github.
* I am lane (https://keybase.io/lane) on keybase.
* I have a public key whose fingerprint is 87D5 28FE E476 A4D8 B685 B622 6B8B D109 5F67 07A3
To claim this, I am signing this object:

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@builtbylane
builtbylane / angular-widow-remover-filter.js
Last active December 27, 2015 00:29
Angular widow remover filter.
/**
* Description:
* puts &nbsp between last two words to prevent single word danglies
* Usage:
* {{some_text | nowidows:3}}
* Options:
* - minWords (int) - optional (default is 3) word-count to apply this filter
* Notes:
* \u00A0 is used to create &nbsp to get around angular sanitizing
* see: http://stackoverflow.com/a/12431145/337192