Skip to content

Instantly share code, notes, and snippets.

Jeremy Stuckey jstuckey

  • Maryland, USA
Block or report user

Report or block jstuckey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jstuckey
jstuckey / Bash Prompt with Git and Emoji
Last active May 15, 2019
Bash Prompt with Git and Emoji - Add to ~/.bash_profile
View Bash Prompt with Git and Emoji
git_branch='`git rev-parse --abbrev-ref HEAD 2> /dev/null | sed s/^/\ \|\ /`'
emojis=(🐶 🐺 🐱 🐭 🐹 🐰 🐸 🐯 🐨 🐻 🐷 🐮 🐵 🐼 🐧 🐍 🐢 🐙 🐠 🐳 🐬 🐥)
emoji='`echo ${emojis[$RANDOM % 22]}`'
PS1="\[\033[0;36m\]\T | \W$git_branch | $emoji > \[\e[0m\]"
@jstuckey
jstuckey / gist:9c0e5f7f46a6922e01a5
Last active Aug 29, 2015
Zlib Module - Demo for Node.dc
View gist:9c0e5f7f46a6922e01a5
// Zlib - Node wrapper around the zlib compression library
var zlib = require('zlib');
var gzip = zlib.createGzip();
var gunzip = zlib.createGunzip();
var fs = require('fs');
var inStream1 = fs.createReadStream('input.txt');
var outStream1 = fs.createWriteStream('tmp/output.txt.gz');
// Compress input.txt using gzip
@jstuckey
jstuckey / .bash_profile additions
Last active May 15, 2019
.bash_profile additions
View .bash_profile additions
PS1="\[\033[0;36m\]\u | \T | \W > \[\e[0m\]"
echo -e "\033[0;31m\n --------------------"
echo -e "\033[0;31m - \033[0;36mWelcome, Jeremy! \033[0;31m-"
echo -e "\033[0;31m --------------------\n"
@jstuckey
jstuckey / palindrome.rb
Created Feb 20, 2014
Check if word is a palindrome
View palindrome.rb
def is_palindrome(string_to_check)
if string_to_check.length == 0
return false
end
the_start = 0
the_end = string_to_check.length - 1
@jstuckey
jstuckey / DefaultKeyBinding.dict
Last active Dec 26, 2015
Make Home and End keys for Mac behave like they do on Windows: Home goes to the beginning of the line, and End goes to the end of the line. Place this file in ~/Library/KeyBindings/DefaultKeyBinding.dict
View DefaultKeyBinding.dict
{
"\UF729" = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
"\UF72B" = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
"^\UF729" = "moveToBeginningOfDocument:";
"^\UF72B" = "moveToEndOfDocument:";
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:";
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:";
}
@jstuckey
jstuckey / git-st
Created Aug 15, 2013
Custom "git status" command to display additional information. Place in /user/bin and then type "git st" while in a git repo.
View git-st
#!/bin/bash#!/bin/bash
echo
echo "User Name: $(git config user.name)"
echo "Email: $(git config user.email)"
echo
git status . -sb
echo
@jstuckey
jstuckey / gitconfig
Last active May 15, 2019
My ~/.gitconfig file. Sets svn style shortcuts, turns on color, sets the default editor, sets user.
View gitconfig
[alias]
st = status . -sb
ci = commit
co = checkout
br = branch
cb = rev-parse --abbrev-ref HEAD
conflicts = diff --name-only --diff-filter=U
recent = "!git for-each-ref --sort=-committerdate refs/heads/ | sed s/.*refs\\\\/heads\\\\/// | head"
[color]
ui = 1
You can’t perform that action at this time.