Skip to content

Instantly share code, notes, and snippets.

View bdsexton's full-sized avatar

Brian Sexton bdsexton

View GitHub Profile
@bdsexton
bdsexton / Default (OSX).sublime-keymap
Created April 4, 2014 23:27
New Sublime Text Layouts (One Left and Two Right & Two Left and One Right) via Keyboard
[
{
"keys": ["shift+alt+super+left"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
@bdsexton
bdsexton / Main.sublime-menu
Created April 4, 2014 23:27
New Sublime Text Layouts (One Left and Two Right & Two Left and One Right) via Menu
[
{
"caption": "View",
"mnemonic": "V",
"id": "view",
"children":
[
{
"caption": "Layout",
"mnemonic": "L",
javascript:(function(){/* Do stuff here. */}());void(0);
outline: 1px dotted rgba(255, 0, 255, 0.5);
outline-offset: -1px;
@bdsexton
bdsexton / .gitignore
Last active August 29, 2015 14:07
This is just a simple .gitignore file to ignore common clutter.
# OS X
.DS_Store
# Adobe Dreamweaver
_notes/
# Sublime Text
*.sublime-project
*.sublime-workspace
# JetBrains IDEs
.idea/
# CodeKit
@bdsexton
bdsexton / template.sublime-project
Created October 5, 2014 23:30
This is just a simple Sublime Text 2 project file template that excludes some common clutter.
{
"folders":
[
{
"path": "/path/to/project/root",
"file_exclude_patterns": [".gitignore", "*.sublime-*"],
"folder_exclude_patterns": [".idea"]
}
]
}
@bdsexton
bdsexton / angularjs-directive-module.js
Created November 27, 2014 10:13
An AngularJS Directive via Isolated Module JavaScript
(function() {
/*
An AngularJS Directive via Isolated Module JavaScript
This is just a simple example of an AngularJS module that defines a
directive within an immediately invoked function expression, which can
be stored in and loaded from a separate file for clear, lean code
organization and easy distribution.
@bdsexton
bdsexton / load.js
Created February 1, 2015 18:58
Non-Destructive load-Event Handler
window.addEventListener("load", function(event) {
console.log("Hello! Non-destructive load-event handlers are the best kind! Don't you agree?");
console.log("load event: %o", event);
});
@bdsexton
bdsexton / Move and Resize Current Application.scpt
Created May 4, 2012 04:34
Move and Resize Current Application via AppleScript
-- Adapted from http://www.ithug.com/2007/09/applescript-moving-and-resizing-windows/:
tell current application
activate
set the bounds of the first window to {0, 0, 1024, 768}
end tell
@bdsexton
bdsexton / Generate UUID.scpt
Created May 4, 2012 04:28
Generate UUID via AppleScript
do shell script "uuidgen"
set uuid to (get result)
display dialog "Have a UUID on the house:" with title "UUID Generator" default answer uuid buttons "OK" default button "OK"