Skip to content

Instantly share code, notes, and snippets.

Doug Brown sdougbrown

View GitHub Profile
View emoji.scss
@font-face {
unicode-range : U+1F431-U+1F63A;
}
.c-emoji:before {
font-style: normal;
}
$emojiList:
"arrow-up" "⬆️",
@sdougbrown
sdougbrown / is.js
Created Oct 26, 2016
Boolean gettersetter w/ pre-bound callbacks
View is.js
function is(bool) {
function gs() {
if (arguments.length) {
bool = arguments[0];
}
return !!bool;
};
gs.setTrue = () => gs(true);
gs.setFalse = () => gs(false);
@sdougbrown
sdougbrown / is.js
Created Oct 26, 2016
Boolean gettersetter w/ pre-bound callbacks
View is.js
function is(bool) {
function gs() {
if (arguments.length) {
bool = arguments[0];
}
return !!bool;
};
gs.setTrue = () => gs(true);
gs.setFalse = () => gs(false);
View nerdtree_colors.vim
" Open NERD tree
map <C-g> :NERDTreeToggle<CR>
" NERDTress File highlighting
function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
endfunction
" purple
@sdougbrown
sdougbrown / tools.media.scss
Last active Jul 25, 2016
Media Query Mixin (BlazeCSS)
View tools.media.scss
// Media Queries
// Usage: @include media(size){ [styles here] }
$screen-limit-xsmall: 20em !default;
$screen-limit-small: 30em !default;
$screen-limit-medium: 48em !default;
$screen-limit-large: 64em !default;
$screen-limit-xlarge: 78em !default;
$screen-limit-super: 116em !default;
View window.path.change.js
(function () {
var CHECK_INTERVAL = 100;
var CURRENT_PATH = window.location.pathname;
var PREVIOUS_PATH = "";
function checkPath () {
if (CURRENT_PATH !== window.location.pathname) {
PREVIOUS_PATH = CURRENT_PATH;
CURRENT_PATH = window.location.pathname;
@sdougbrown
sdougbrown / toggler.js
Created Jul 5, 2016
Toggling jQuery Plugin
View toggler.js
// Toggler
//
// A generic toggling plugin.
// This plugin assumes that a parent element ($el)
// will contain both a 'toggler' and a 'togglee'
//
// The 'toggler' is the item that is clicked,
// while the 'togglee' may be a navigation menu
// or some other element that changes when another
// element toggles it.
@sdougbrown
sdougbrown / sticky.js
Last active Jul 5, 2016
Sticky Elements By Waypoint (jQuery, requestAnimationFrame) -- scrolljack without jacking scroll
View sticky.js
// Sticky
//
// A sticky element that determines its state by another
// element's position in the document.
(function ($, requestAnimationFrame) {
var pluginName = 'sticky';
var pluginDefaults = {
waypoint: '.js-waypoint',
includeWaypointHeight: false,
@sdougbrown
sdougbrown / bower.json
Created Jun 28, 2016
SCSS Skelly Boilerplate
View bower.json
{
"dependencies": {
"skelly": "git://github.com/sdougbrown/skelly-scss.git"
}
}
You can’t perform that action at this time.