Skip to content

Instantly share code, notes, and snippets.

View peabnuts123's full-sized avatar

Jeff peabnuts123

View GitHub Profile
@peabnuts123
peabnuts123 / vscode_eclipse_keybindings.json
Last active January 18, 2017 02:57
peabnuts123 (mostly eclipse-inspired) Visual Studio Code bindings. NOTE: This may never be updated again as I have switched to using Settings Sync: https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
[
// Vanilla bindings
{
"key": "ctrl+o",
"command": "workbench.action.gotoSymbol"
},
{
"key": "ctrl+[",
"command": "workbench.action.navigateBack"
},
@peabnuts123
peabnuts123 / Visual Studio CodeSnippet - HTML - js
Last active January 10, 2017 22:20
Visual Studio CodeSnippet for JavaScript. <script> tag with type specified as "text/javascript"
<?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>JS script tag</Title>
<Author>Jeff Andrews</Author>
<Description>Inserts HTML script tag of type text/javascript</Description>
@peabnuts123
peabnuts123 / Visual Studio CodeSnippet - JavaScript - it
Last active January 10, 2017 22:19
Visual Studio CodeSnippet for JavaScript. Jasmine test declaration
<?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>Jasmine Test</Title>
<Author>Jeff Andrews</Author>
<Description>Creates an 'it' block with a name, and basic comments</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>
@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 - 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>
console.clear();
var seasons = [];
function createSeason(seasonNumber) {
seasons[seasonNumber] = seasons[seasonNumber] || [];
return seasons[seasonNumber];
}
@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

@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 / _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 👍