Skip to content

Instantly share code, notes, and snippets.

View basham's full-sized avatar

Chris Basham basham

View GitHub Profile

Prerequisites and assumed conditions

  • Mac OS X 10.9.2
  • Clean install
  • Admin user (required to install Xcode cli dev tools, Virtualbox application)
  • Network connection

Installation

CLI tools Needed:

@dandean
dandean / link.sh
Last active August 29, 2015 14:04
Link a module to itself to get around relative require hell.
@ak47
ak47 / databases.rake
Created July 28, 2011 18:56
Monkey patch activerecord-3.0.9/lib/active_record/railties/databases.rake enables parallel_tests to work on my PG Jenkins CI
# #{Rails.root}/lib/tasks/databases.rake
=begin
Monkey Patch
activerecord-3.0.9/lib/active_record/railties/databases.rake
clears obstinate stale PG session to get parallel_tests working
also, PG user must be superuser to use these low level PG functions
=end
def drop_database(config)
case config['adapter']
when /mysql/
@gpbl
gpbl / reflux-master-detail.md
Last active November 3, 2015 13:19
Using Reflux stores and actions for a Master/Detail app with React

Reflux stores and actions in a Master/Detail app

Example and reasonings when using Reflux stores and actions for a Master/Detail app with React – with an eye to server-side rendering. Some concepts apply to reflux#166 and reflux#180.

Requirements

Must work with a router

This hypotetical app would use a router to display a list of items (e.g. at the url example.org/items, the master view) and a single item (e.g. example.org/items/:id, the detail view).

@Willmo36
Willmo36 / Rx.Observable.fromSuperagent.es6
Last active July 21, 2016 19:03
RxJS stream from SuperAgent request
let Rx = require("rx");
Rx.Observable.fromSuperagent = request => () => Rx.Observable.create(observer => {
request.end((err, res) => {
if (err) {
observer.onError(err)
} else {
observer.onNext(res);
}
observer.onCompleted();
@jonschlinkert
jonschlinkert / 1. handlebars-subexpression.html
Last active February 3, 2018 05:51
Very powerful combination! Four helpers are used here: `each`, `expand`, `markdown` and `inline`.
{{#each (expand 'content/*.md')}}
{{#markdown}}
{{inline .}}
{{/markdown}}
{{/each}}
@felixgirault
felixgirault / noUiSliderA11y.js
Last active May 18, 2018 22:34
Accessible noUiSlider
/**
* Adds an accessibility layer to the default noUiSlider.
*
* @see $.fn.noUiSlider()
*/
$.fn.noUiSliderA11y = function(options, rebuild) {
var slider = this;
if (!('noUiSlider' in slider)) {
throw new Error('noUiSlider is not loaded.');
@brayhoward
brayhoward / convert_aax_files.md
Last active May 8, 2021 21:20
Directions for converting Audible audiobook files, .aax, to .m4a files
@WebReflection
WebReflection / my-libraries-in-bytes.md
Last active September 24, 2021 22:03
My libraries in bytes

Toward better libraries

I am recently re-branding my libraries as µ (micro), refactoring these when necessary, dropping IE < 11 support, improving the logic where possible, or providing a better, more robust, or faster, API.

In few words, on the right there is the modern version of libraries I've used for the last ~5 years in production or for side projects, and I suggest anyone having one of the earlier dependencies, to have a look at their modern, micro, counterpart.

How to read these tables

All sizes are minified, brotli compressed, and representing these two files, when possible: