This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"postinstall": "find node_modules/ -name '*.info' -type f -delete" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Overview links for the main navigation | |
$('.menu-primary .menu-block-wrapper > ul.menu > li > a').each(function() { | |
var $overview = $(this).clone(); | |
var overviewDestinationSelector = ".dropdown-column:first-child ul.menu"; | |
var $overviewDestination = $(this).closest('li').find(overviewDestinationSelector); | |
$overview.text('Overview').prependTo($overviewDestination).wrap('<li class="menu__overview-link js-processed"></li>'); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Classes that represent max widths at the largest size of the grid | |
* Can be used in situations where you have a single non-full size column in a row | |
*/ | |
@for $i from 1 through $total-columns { | |
.grid-max-#{$i} { | |
max-width: ($row-width - $column-gutter) * (grid-calc($i, $total-columns) / 100%); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Sexy bash prompt by twolfson | |
# https://github.com/twolfson/sexy-bash-prompt | |
# Forked from gf3, https://gist.github.com/gf3/306785 | |
# Determine what type of terminal we are using for `tput` | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color | |
elif [[ $TERM != dumb ]] && infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Automatically adds branch name and branch description to every commit message. | |
# Unless we are on the master or develop branch. | |
# | |
NAME=$(git branch | grep '*' | sed 's/* //') | |
DESCRIPTION=$(git config branch."$NAME".description) | |
TEXT=$(cat "$1" | sed '/^#.*/d') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
var input = document.createElement("input"); | |
if(('placeholder' in input) == false) { | |
$('[placeholder]') | |
.each(function(){ | |
var i = $(this); | |
if(i.val() == '' || i.val() == i.attr('placeholder')) { | |
if(this.type=='password') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#aliiases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
set bs=2 | |
syntax on | |
filetype on | |
au BufNewFile,BufRead *.module set filetype=php | |
au BufNewFile,BufRead *.inc set filetype=php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1="[\u@\h:\w ] $ " | |
alias "ls=ls --color=auto" |