Skip to content

Instantly share code, notes, and snippets.

View orther's full-sized avatar
🏠
Working from home

Brandon Orther orther

🏠
Working from home
View GitHub Profile
@orther
orther / install-emacs-with-vfork-path-on-macos.sh
Created June 12, 2017 13:30
Easy install macOS Emacs 25.2 w/ vfork patch
brew tap d12frosted/emacs-plus
brew install emacs-plus --without-spacemacs-icon

Keybase proof

I hereby claim:

  • I am orther on github.
  • I am orther (https://keybase.io/orther) on keybase.
  • I have a public key whose fingerprint is 05B6 F0D5 4B06 DAE9 0880 B7CA 347A 9171 39C4 5127

To claim this, I am signing this object:

@orther
orther / example.js
Last active February 18, 2017 16:26
const contains = (coll) => (item) => coll.includes(item);
const intersection = (a, b) => a.filter(contains(b));
const uniq = (list) => [...new Set(list)];
const intersectionAll = ([head, ...tail]) => uniq(tail.reduce(intersection, head))
const all = [
[5, 10, 15, 20, 6],
[15, 88, 1, 5, 7, 6],
[1, 10, 15, 5, 20, 6],
[8, 10, 15, 5, 20, 6],
@orther
orther / index.js
Created January 27, 2017 17:34
A few simple examples of sorting with Ramda's sortBy function.
import R from 'ramda';
const items = [
{id: 1, name: 'Al', country: 'AA'},
{id: 2, name: 'Connie', country: 'BB'},
{id: 3, name: 'Doug', country: 'CC'},
{id: 4, name: 'Zen', country: 'BB'},
{id: 5, name: 'DatGGboi', country: 'AA'},
{id: 6, name: 'Connie', country: 'AA'},
];
@orther
orther / iterm2-fish-profile.json
Created December 31, 2016 09:39
iTerm2 Profile for fishshell and spacemacs
{
"Set Local Environment Vars" : true,
"Working Directory" : "\/Users\/brandon\/dev",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 0,
"Blue Component" : 0,
"Red Component" : 0
},
"Rows" : 25,
@orther
orther / README.md
Created June 14, 2016 15:43
Slack sidebar theme for clojurians.slack.com based on Clojure.org color scheme
@orther
orther / reduxMiddlewareAPI.js
Last active May 18, 2016 00:34
Mikko's example redux API middleware using whatwg-fetch
import 'whatwg-fetch';
function isRequest({ promise }) {
return promise && typeof promise === 'function';
}
function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
return response;
} else {
@orther
orther / get-top-two-nums.clj
Created October 22, 2015 14:40
Playing with getting top two numbers w/ O(n)
(require '[clojure.core.reducers :as r])
(defn top-two
[[big1 big2 :as acc] x]
(cond
(> x big1) [x big1]
(> x big2) [big1 x]
:else acc))
(defn top-two+
@orther
orther / gulpfile.js
Last active August 29, 2015 14:27 — forked from emilniklas/gulpfile.js
Gulpfile with LiveReload, Sass, and Browserify with Babelify (JSX harmony)
// ============================================================
// $ npm install --save-dev gulp-util node-notifier gulp vinyl-source-stream vinyl-buffer gulp-uglify gulp-sourcemaps gulp-livereload browserify watchify babelify gulp-sass gulp-autoprefixer gulp-rename
// ============================================================
function Workflow()
{
// Override workflow settings here
this.input.directory = 'src';
this.input.script = 'js/main.jsx';
this.input.style = 'css/main.scss';
@orther
orther / test_xlsx_reader.py
Created July 20, 2015 04:31
XlsxReader test
import pytest
from sow_web_codegen.reader.xlsx import XlsxReader
from sow_web_codegen.reader.xlsx import XlsxReaderInvalidFileFormatException
from tests import EXAMPLE_WORKSHEET_XLSX as example_worksheet
def gen_get_value_func(columns, row):
def get_column(column):