Skip to content

Instantly share code, notes, and snippets.

View peabnuts123's full-sized avatar

Jeff peabnuts123

View GitHub Profile
@peabnuts123
peabnuts123 / .bashrc
Last active December 11, 2017 01:30
#TheBestBashPrompt #Objective
PS1="\[\e[30;43m\][\[\e[m\]\[\e[30;43m\]\T\[\e[m\]\[\e[30;43m\]]\[\e[m\]\[\e[30;42m\] \[\e[m\]\[\e[30;42m\]\u\[\e[m\]\[\e[30;42m\] \[\e[m\]\[\e[44m\]\w\[\e[m\]\[\e[41m\]\\$\[\e[m\] "
@peabnuts123
peabnuts123 / list-install-hooks
Last active August 8, 2017 02:14
Search `node_modules/` for any dependencies that have `preinstall`, `install` or `postinstall` hooks
#!/bin/bash
find node_modules/ -iname "package.json" -exec grep '"preinstall"\|"install"\|"postinstall"' {} \; -exec echo 'From: {}' \; -exec echo \;
@peabnuts123
peabnuts123 / register_standup_alias.sh
Last active July 11, 2017 21:54
Git Alias to show what you've done in the last day
git config --global alias.standup 'log --pretty="%ad %s" --since=yesterday --date="format:%m/%d %a %T%t" --author="Your Name"'
@peabnuts123
peabnuts123 / _Git Utility Scripts.md
Last active September 30, 2018 19:49
A small collection of tools for using a git workflow in collaboration with others.

Git Utility Scripts

This is a small collection of utility scripts i've written to aid in a git workflow, collaborating with others on a project. I would recommend putting them somewhere in $PATH so you can just call smart-rebase, etc. from CLI. Happy gitting 👍

@peabnuts123
peabnuts123 / .tmux.conf
Last active March 4, 2017 21:54
TMUX config (based on OSX)
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# remap prefix from ctrl+b to alt+z
unbind C-b
set-option -g prefix M-z
bind-key M-z send-prefix
# split panes using \ and -
bind \ split-window -h -c "#{pane_current_path}"
@peabnuts123
peabnuts123 / VSCode Extensions Manifest.md
Last active January 18, 2017 02:56
Since there is no way to sync extensions across computers for VSCode (yet), I am using this Gist to record which ones I have installed.

VSCode Extensions

A list of currently installed Visual Studio Code extensions, grouped by category.

NOTE: The latest addition to this list is Settings Sync which should hopefully supersede this list, it may never be updated again.

General

console.clear();
var seasons = [];
function createSeason(seasonNumber) {
seasons[seasonNumber] = seasons[seasonNumber] || [];
return seasons[seasonNumber];
}
@peabnuts123
peabnuts123 / Visual Studio CodeSnippet - JavaScript - ofunc
Last active January 10, 2017 22:12
Visual Studio CodeSnippet for JavaScript. Create a named function property on an object with various parameters
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Object Function Property</Title>
<Author>Jeff Andrews</Author>
<Description>Creates a named function on an object</Description>
@peabnuts123
peabnuts123 / Visual Studio CodeSnippet - JavaScript - ngcontroller
Last active January 10, 2017 22:15
Visual Studio CodeSnippet for JavaScript. AngularJS controller definition
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Angular Controller</Title>
<Author>Jeff Andrews</Author>
<Description>Creates an angular controller with reference to a module and adds a route</Description>
@peabnuts123
peabnuts123 / Visual Studio CodeSnippet - JavaScript - ngfactory
Last active January 10, 2017 22:16
Visual Studio CodeSnippet for JavaScript. AngularJS factory definition
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Angular Factory</Title>
<Author>Jeff Andrews</Author>
<Description>Creates an angular factory with reference to a module</Description>