Skip to content

Instantly share code, notes, and snippets.

View JulianJorgensen's full-sized avatar
🎯
Focusing

Julian Jorgensen JulianJorgensen

🎯
Focusing
View GitHub Profile
alias pull="git fetch upstream && git pull upstream master"
alias commit="git add . && git commit -a"
# Sticky Nav
# ******************************************
if (detectPage() == "home")
$(window).scroll (e) ->
marqueeHeight = $(".marquee").height()
if ($(this).scrollTop() >= marqueeHeight)
$(".mainnav, .mobilenav").css
position: "fixed"
top: "0px"
$(".spacing-fix").css
@JulianJorgensen
JulianJorgensen / .bash_profile
Created October 3, 2013 21:56
sync-content summit
function sync-content
{
echo "WARNING: This will sync ALL components (i.e. copy) from $2 to $3 for $1."
read -p "Are you sure you want to continue? (y/n)" -n 1 choice
echo
if [ "$choice" == "y" ] || [ "$choice" == "Y" ]; then
# sync the content
echo "Syncing content from $2 to $3 for $1..."
curl \
-F":operation=copy" \
@JulianJorgensen
JulianJorgensen / .bash_profile
Created November 12, 2014 17:39
Terminal branch highlight
# git branch highlighting
function parse_git_branch
{
branch=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'`
if [ -n "$branch" ]; then
echo "${branch} "
fi
}
function proml
{
@JulianJorgensen
JulianJorgensen / inputs.less
Last active August 29, 2015 14:09
bootstrap gradient
// vertical gradient (using bootstraps mixin)
.example
{
#gradient > .vertical(@gray85, @gray90);
}
// horizontal gradient (using bootstraps mixin)
.example2
{
#gradient > .horizontal(@gray85, @gray90);
@JulianJorgensen
JulianJorgensen / _functions.scss
Created March 27, 2015 00:35
lower and upper bound sass functions
// RANGES
// We use these functions to define ranges for various things, like media queries.
@function lower-bound($range) {
@if length($range) <= 0 {
@return 0;
}
@return nth($range, 1);
}
@function upper-bound($range) {
@JulianJorgensen
JulianJorgensen / .bash_profile
Created April 30, 2015 17:44
Remove merged branches
function rmb {
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
if [ "$current_branch" != "master" ]; then
echo "WARNING: You are on branch $current_branch, NOT master."
fi
echo "Fetching merged branches..."
git remote prune origin
remote_branches=$(git branch -r --merged | grep -v '/master$' | grep -v "/$current_branch$")
local_branches=$(git branch --merged | grep -v 'master$' | grep -v "$current_branch$")
if [ -z "$remote_branches" ] && [ -z "$local_branches" ]; then
@JulianJorgensen
JulianJorgensen / .bash_profile
Created April 30, 2015 17:53
Git branch highlighting
# git branch highlighting
function parse_git_branch
{
branch=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'`
if [ -n "$branch" ]; then
echo "${branch} "
fi
}
function proml
{
@JulianJorgensen
JulianJorgensen / gist:a42edd31b3258c846240
Created February 28, 2016 19:16
Boxen installation error
--> Configuring. Prepare for a long wait and some weird output.
I might have to ask you for your password again too.
--> Preparing to auto-update...
--> Skipping auto-update, since this isn't a git checkout yet
====> Installing gem dependencies
Error: Syntax error at '::JulianJorgensen' at /opt/boxen/repo/modules/people/manifests/julianjorgensen.pp:1 on node julians-macbook-air.local
Error: Syntax error at '::JulianJorgensen' at /opt/boxen/repo/modules/people/manifests/julianjorgensen.pp:1 on node julians-macbook-air.local
fatal: Not a git repository (or any of the parent directories): .git
@JulianJorgensen
JulianJorgensen / untitled
Created March 24, 2016 20:57
permission error
(2015-archive) ~/sites/adobe-max-2015$ ssh-add ~/.ssh/id_rsa
Identity added: /Users/julianjorgensen/.ssh/id_rsa (/Users/julianjorgensen/.ssh/id_rsa)
(2015-archive) ~/sites/adobe-max-2015$ ssh -v deploybot
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /Users/julianjorgensen/.ssh/config
debug1: /Users/julianjorgensen/.ssh/config line 1: Applying options for deploybot
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to deploybot.coverallcrew.com [54.200.168.247] port 2242.
debug1: Connection established.