Skip to content

Instantly share code, notes, and snippets.

View brandonb927's full-sized avatar

Brandon Brown brandonb927

View GitHub Profile
@brandonb927
brandonb927 / npm-ES2015-babel-react-build.json
Created December 17, 2015 06:29
npm scripts ES2015 + babel + react self-contained build
{
...
"devDependencies": {
"autoprefixer": "^6.1.2",
"babel-cli": "^6.3.17",
"babel-plugin-react-transform": "^2.0.0-beta1",
"babel-preset-es2015": "^6.3.13",
"babelify": "^7.2.0",
"bootstrap": "^3.3.6",
"browserify": "^12.0.1",
@brandonb927
brandonb927 / installed.md
Last active February 22, 2022 00:53
Installed Atom Packages

Sublime-Style-Column-Selection
Enable Sublime style 'Column Selection'. Just hold 'alt' while you select, or select using your middle mouse button. Also similar to Texmate's 'Multiple Carets', or BBEdit's 'Block Select'

activate-power-mode
Activate POWER MODE to write your code in style.

atom-alignment
A simple key-binding for aligning multi-line and multiple selections in Atom (Based on the sublime text plugin)

atom-beautify

@brandonb927
brandonb927 / picture.rb
Last active March 2, 2018 17:15
Jekyll picture tag support
module Jekyll
class RenderPictureElement < Liquid::Tag
def initialize(tag_name, markup, tokens)
super
@markup = markup
end
def render(context)
site = context.registers[:site]
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@brandonb927
brandonb927 / md.css
Last active August 29, 2015 14:19 — forked from pluma/md.css
body {max-width: 106ex; margin: 0 auto; padding: 1em 1ex; font-family: monospace; color: rgb(64,64,64)}
h1:before, h2:before, h3:before, h4:before, h5:before, h6:before {color: rgb(192,0,0)}
h1, h2, h3, h4, h5, h6 {font-weight: bold; color: black; font-size: 1.2em; margin: 2em 0 1em 0}
h1 {text-indent: -2ex; font-size: 2em}
h2 {text-indent: -3ex; font-size: 1.5em}
h3 {text-indent: -4ex; font-size: 1.2em}
h4 {text-indent: -5ex; font-size: 1em}
h5 {text-indent: -6ex; font-size: 1em}
h6 {text-indent: -7ex; font-size: 1em}
h1:before {content: '# '}
(function(window){
var EVENT_EXISTS = 'GlobalEvents: Event already exists.';
var eventIsRunning,
_eventStack,
_findByName,
stackEvent,
removeEvent,
eventListener,
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "src/js/*.js'",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@brandonb927
brandonb927 / dropbox
Last active February 22, 2022 01:25
Dropbox init.d script for Ubuntu 14.04 Server LTS - Dropbox has (recently) changed the CLI daemon from `dropbox` to `dropboxd`.
#!/bin/sh
# Usernames who will be using the Dropbox service
DROPBOX_USERS="username"
DAEMON=.dropbox-dist/dropboxd
start() {
echo "Starting dropbox..."
for dbuser in $DROPBOX_USERS; do
@brandonb927
brandonb927 / ErrorHandler.js
Last active February 22, 2022 01:26 — forked from mikevalstar/ErrorHandler.js
Modified again to use Handlebars template instead of Jade
/**
* Modified from the Connect project: https://github.com/senchalabs/connect/blob/master/lib/middleware/errorHandler.js
*
* Flexible error handler, providing (_optional_) stack traces and logging
* and error message responses for requests accepting text, html, or json.
*
* Options:
*
* - `showStack` respond with both the error message and stack trace. Defaults to `false`
* - `showMessage`, respond with the exception message only. Defaults to `false`
@brandonb927
brandonb927 / cars.html
Created August 1, 2014 19:02
Cars Challenge - little Angular project
<!doctype html>
<html ng-app>
<head>
<meta charset="utf-8">
<title></title>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.min.js"></script>
</head>
<body ng-controller="CarSelector">
<h3>Select A Dream Car</h3>