Skip to content

Instantly share code, notes, and snippets.

🦎

Chris Rueber crueber

🦎
Block or report user

Report or block crueber

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@crueber
crueber / http-status-codes.md
Last active Jan 25, 2019
HTTP Status Codes
View http-status-codes.md

1xx Codes - Informational

  • 100 Continue
  • 101 Switching Protocols
  • 102 Processing (WebDAV; RFC 2518)
  • 103 Early Hints (RFC 8297)

2xx Codes - Successes

@crueber
crueber / tmux.md
Created Jan 30, 2018 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
@crueber
crueber / css_resources.md
Last active Feb 24, 2017 — forked from jookyboi/css_resources.md
Useful CSS Libs
View css_resources.md

Foundations

  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.
  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.

Libraries

  • Compass - Open source CSS Authoring Framework.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
@crueber
crueber / rails_resources.md
Last active Feb 24, 2017 — forked from jookyboi/rails_resources.md
(outdated) Useful Rails Gems
View rails_resources.md

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@crueber
crueber / javascript_resources.md
Last active Aug 29, 2015 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@crueber
crueber / ccValidation.coffee
Last active Aug 29, 2015
Credit Card Checksum (Luhn) validation in CoffeeScript w/ Angular Directive
View ccValidation.coffee
trim_the_fat = (str) -> str.replace(/\D+/g, '')
numerals_only = /[^0-9]+/
double_sum_array = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]
is_valid_credit_card = (card_number) ->
card_number = trim_the_fat(card_number)
return false if card_number.length < 13 or numerals_only.test(card_number)
len = card_number.length
sum = 0
@crueber
crueber / asset_helpers.coffee
Last active Aug 29, 2015
A Complete GulpJS Asset Pipeline.
View asset_helpers.coffee
# NodeJS Asset Helper.
fs = require 'fs'
asset_dir = './public/assets/'
pull_assets_manifest = ->
fs.readFile asset_dir+'manifest.json', (err, file) ->
koaris.locals.assets = JSON.parse(file)
console.log "Refreshing Asset Manifest"
pull_assets_manifest()
@crueber
crueber / regexes.coffee
Created Apr 14, 2015
Useful Regexps in CoffeeScript
View regexes.coffee
PRE_AND_POST_UNDERSCORES = /^_+|_+$/g
EMAIL = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i
URL = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/
# HTML Based
SINGLE_TAG = /^<(\w+)\s*\/?>(?:<\/\1>|)$/
HTML = /<|&#?\w+;/
TAG_NAME = /<([\w:]+)/;
XHTML_TAG = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
@crueber
crueber / abaValidation.coffee
Last active Nov 8, 2017
ABA Routing Number Validation
View abaValidation.coffee
aba_check_digit = (t) ->
7 * (t[0] + t[3] + t[6]) +
3 * (t[1] + t[4] + t[7]) +
9 * (t[2] + t[5])
aba_check_sum = (t) ->
3 * (t[0] + t[3] + t[6]) +
7 * (t[1] + t[4] + t[7]) +
1 * (t[2] + t[5] + t[8])
@crueber
crueber / express.coffee
Last active Aug 29, 2015
connect-assets production setup for heroku
View express.coffee
prodAssetHelpers = require("./middleware/prod_asset_helpers")
if app.get('env') == 'production'
app.use express.static(path.join(__dirname, "/../public"), maxAge: constant.one_week)
prodAssetHelpers(app, path.join(__dirname, "/../public"))
else
app.use express.static(path.join(__dirname, "/../public"), maxAge: constant.one_second)
app.use connectAssets(paths: [ "public/css", "public/js" ], helperContext: app.locals, build: false)
You can’t perform that action at this time.