Skip to content

Instantly share code, notes, and snippets.

View justin808's full-sized avatar
💭
Hiring!

Justin Gordon justin808

💭
Hiring!
View GitHub Profile
@justin808
justin808 / Gemfile
Created November 12, 2015 22:11
Octopress 3 Gemfile
source "https://rubygems.org"
gem "octopress", "~>3"
gem "jekyll", "<3"
group :jekyll_plugins do
gem "octopress-asset-pipeline"
end
@justin808
justin808 / bundle-global.js
Created July 17, 2015 08:15
Simplest Hello World Webpack output with global export
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
@justin808
justin808 / bundle.js
Created July 17, 2015 08:12
Simplest Hello World Webpack output
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
@justin808
justin808 / .tmux.conf
Created July 6, 2015 23:55
.tmux.conf
set-option -g default-shell /bin/zsh
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
# http://brentvatne.github.com/tmux-copy-paste/
# this next command takes the current buffer and puts it on the OS clipboard
#bind Y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
#
# I don't understand why the next would be useful
# bind P run "tmux paste-buffer"
bind y copy-mode
@justin808
justin808 / railsonmaui-rails.zsh
Last active August 29, 2015 14:20
Rails Zsh Scripts
# Kill stuff
pgr() {
for x in rake spring rails ruby-debug phantomjs zeus passenger guard resque "node server.js"; do
pgrep -fl $x;
done
}
pgk() {
for x in rake spring rails ruby-debug phantomjs zeus passenger guard resque "node server.js"; do
@justin808
justin808 / railsonmaui-code-style.xml
Last active August 29, 2015 14:18
RailsOnMaui code style for JetBrains RubyMine and Webstorm
<code_scheme name="RailsOnMaui Code Style">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
@justin808
justin808 / .eslintrc
Last active August 29, 2015 14:17
.eslintrc based on airbnb javascript style guidelines
# ESLint documentation can be found at http://eslint.org/docs/
# find . -path ./node_modules -prune -o -name "*.js" -o -name "*.jsx" -exec eslint {} \;
parser: "babel-eslint"
plugins: ["react"]
ecmaFeatures:
jsx: true
env:
browser: true
node: true
amd: false
@justin808
justin808 / Inspection_RailsOnMaui_Default.xml
Last active August 29, 2015 14:17
RailsOnMaui Code Inspection Default for RubyMine & Webstorm
<?xml version="1.0" encoding="UTF-8"?>
<inspections version="1.0">
<option name="myName" value="Inspection RailsOnMaui Default" />
<option name="myLocal" value="true" />
<inspection_tool class="Annotator" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AssignmentToForLoopParameterJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="BreakStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="BreakStatementWithLabelJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="ChainedEqualityJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="CheckDtdRefs" enabled="false" level="ERROR" enabled_by_default="false" />
@justin808
justin808 / utility.zsh
Created November 15, 2014 20:13
Some utility functions that my other zsh gists use
# Generic Utilities
using_port() {
ps -p $(lsof -i:$1 -Fp | cut -c 2-)
}
most_used() {
history | awk '{a[$4]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head -20
}
@justin808
justin808 / assets.rake
Created September 16, 2014 19:29
Create rails-bundle.js file by using webpack. More details here: https://github.com/justin808/react-webpack-rails-tutorial.
# lib/tasks/assets.rake
# The webpack task must run before assets:environment task.
# Otherwise Sprockets cannot find the files that webpack produces.
Rake::Task['assets:precompile']
.clear_prerequisites
.enhance(['assets:compile_environment'])
namespace :assets do
# In this task, set prerequisites for the assets:precompile task
task :compile_environment => :webpack do