Skip to content

Instantly share code, notes, and snippets.

View n8io's full-sized avatar
💭
‾\_(ツ)_/‾

Nate Clark n8io

💭
‾\_(ツ)_/‾
View GitHub Profile
@n8io
n8io / .bash_profile
Last active August 29, 2015 14:17
Enhanced termial
#PROMPT STUFF
GREEN=$(tput setaf 2);
YELLOW=$(tput setaf 3);
WHITE=$(tput setaf 7)
function git_branch {
# Shows the current branch if in a git repository
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \(\1\)/';
}
@n8io
n8io / iframe-tomfoolery.html
Last active August 29, 2015 14:12
Provides a way to hide elements before the page is visible if in an iFrame.
<html>
<head>
</head>
<body>
<!-- The first element in the body -->
<script>
function inIframe() {
try {
return window.self !== window.top;
} catch (e) {
@n8io
n8io / .bashrc
Last active January 8, 2018 22:28
A .bashrc file configuration for local dev.
clear
# Grunt aliases
alias g="grunt"
alias gr="grunt"
alias gw="grunt watcher"
alias gwb="grunt watcher | node_modules/.bin/bunyan" # Runs grunt watcher with pretty formatted bunyan output
alias gcb="grunt concurrent | ./node_modules/.bin/bunyan" # Runs grunt concurrent task (usually nodemon and watch tasks bundled)
echo "Grunt aliases loaded."
# Nodemon aliases