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
{
"data": {
"name": "Brandon",
"age": 32
}
}
(def ops
{"+" +
"-" -
"*" *
":" /})
;; calc request handler and proof the app's in clojure jerk
(defn calc [req]
(let [a (Integer. (get-in req [:route-params :a]))
b (Integer. (get-in req [:route-params :b]))
(ns webdev.core
(:require [ring.adapter.jetty :as jetty]
[ring.middleware.reload :refer [wrap-reload]]
[compojure.core :refer [defroutes GET]]
[compojure.route :refer [not-found]]
[ring.handler.dump :refer [handle-dump]]))
(defn about [req]
{:status 200
:body "My name is Brandon Orther. I am following along with LispCast's Intro to Web Development with Clojure."
@orther
orther / sitelink-soap-test.py
Created April 30, 2015 00:13
Basic test of SOAPpy connection to SiteLink's API (NOTE: I threw this together after soap2py failed on diffgram)
@orther
orther / instructions.md
Created May 1, 2015 16:54
How to backup entire GitHub Organization including repo, wiki and issues.
  1. Create access token for your github user with read rights to org.
  2. Install github-backup pip install github-backup
  3. github-backup -t --all -O -P --prefer-ssh
#!/bin/sh
export FIRST_LINE=0
export LAST_LINE=0
sleep 1
sed -i'' "$FIRST_LINE,$LAST_LINE s/^/#/" /root/Dropbox/PSA_All_Check
sleep 2
#!/bin/bash
#Comment Test
#Comment Test
#Comment Test
#Comment Test
#Comment Test
export FIRST_LINE=0
export LAST_LINE=0
@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):
@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 / 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+