Skip to content

Instantly share code, notes, and snippets.

View jakiestfu's full-sized avatar
🌺

Jacob Kelley jakiestfu

🌺
View GitHub Profile
{
"presets": [ "es2015-rollup" ],
"plugins": ["transform-class-properties"]
}
git fetch
git checkout -b tmp-branch
git branch -D master
git branch -D release
git checkout -b master origin/master
git checkout -b release origin/release
git checkout release
git branch -D tmp-branch
#!/bin/bash
# This is a comment
@jakiestfu
jakiestfu / aliases.sh
Last active July 30, 2019 19:51
Useful Git Aliases
# Git Destroy
# Deletes a branch locally and on the origin
# git destroy <branch>
git config --global alias.destroy '!g() { git branch -D $1 && git push origin $1 --delete; }; g'
# Git Circle CI
# Opens the projects builds in Circle
# git cci
git config --global alias.cci '!g() { branch=`git rev-parse --abbrev-ref HEAD`; top_level=`git rev-parse --show-toplevel`; repo=`basename $top_level`; url="https://circleci.com/gh/MakerStudios/$repo/tree/$branch"; open $url; }; g'
@jakiestfu
jakiestfu / README.md
Last active August 29, 2015 14:15
A super useful function for creating elements
var div = _e('div');

var btn = _e('input', {
  type: 'button',
  value: 'Click Me',
  on: {
    click: function(e) { alert('Hello'); }
  }
});
@jakiestfu
jakiestfu / spacing.css
Last active August 29, 2015 14:08
Creates a bunch of helpful padding/margin classes
.margin { margin: 10px; }
.no-margin { margin: 0 !important; }
.m-top { margin-top: 5px !important; }
.m-top-more { margin-top: 10px !important; }
.m-right { margin-right: 5px !important; }
.m-right-more { margin-right: 10px !important; }
.m-bottom { margin-bottom: 5px !important; }
.m-bottom-more { margin-bottom: 10px !important; }
.m-left { margin-left: 5px !important; }
.m-left-more { margin-left: 10px !important; }
@jakiestfu
jakiestfu / ko.else.js
Created October 17, 2014 14:50
An attempt to create an "else" binding with Knockout. Only supports linear statements, no depth.
(function(){
var bindingKey = 'else',
stack = [],
_if = ko.bindingHandlers.if,
_init = _if.init
_update = _if.update;
ko.bindingHandlers[bindingKey] =
{
@jakiestfu
jakiestfu / git_rdiff.sh
Last active January 4, 2024 20:42
git rdiff
git config --global alias.rdiff '!g() { origin=$(git config --get remote.origin.url | sed "s/git@/https:\/\//g" | sed "s/.com:/.com\//g"); url=${origin/.git/\/commit\/$(git rev-parse HEAD)}; open $url; }; g'
@jakiestfu
jakiestfu / ko-else.js
Created May 28, 2014 05:42
This is an almost working "else" binding for Knockout.js. It monkey patches the "if" binding and keeps a stack of the last returned values from the bindings. Every "else" binding is actually an if binding with the negated value of the last if bindings return set in a preprocessor. Currently doesn't work with multiple bindings. DOH!
(function(){
var bindingKey = 'else',
stack = [],
_if = ko.bindingHandlers.if,
_init = _if.init
_update = _if.update;
ko.bindingHandlers[bindingKey] =
{
@jakiestfu
jakiestfu / rdiff.sh
Last active August 29, 2015 13:57
Git Remote Diff: Open the latest commit diff in GitHub
git config --global alias.rdiff '!g() { origin=`git config --get remote.origin.url`; origin=${origin/git@github.com:/https://github.com/}; url=${origin/.git/\/commit\/`git rev-parse HEAD`}; open $url; }; g'