Skip to content

Instantly share code, notes, and snippets.

View lilactown's full-sized avatar
🌊
Do not follow in the footsteps of the sages. Seek what they sought.

Will Acton lilactown

🌊
Do not follow in the footsteps of the sages. Seek what they sought.
View GitHub Profile
@lilactown
lilactown / gist:5454111
Created April 24, 2013 17:55
Python script which downloads a file from a URL to a given file name, then checks to see if a certain phrase is contained in it.
#! /usr/bin/env python
# Description:
# Downloads a file from a URL to a given file name, then checks to see if a certain phrase is
# contained in it.
#
#Instructions:
# Running the script is easy: 'python puppet.py <URL> <FILE>' will download data from <URL> over
# HTTP and save it locally to <FILE>. It will then search for the default phrase 'position = support-intern',
# and if it does not find it, append the phrase to the end of the file and then check again.
#
@lilactown
lilactown / gist:5621675
Created May 21, 2013 17:38
Support engineering intern application script
#! /usr/bin/env python
# Description:
# Downloads a file from a URL to a given file name, then checks to see if a certain phrase is
# contained in it.
#
#Instructions:
# Running the script is easy: 'python puppet.py <URL> <FILE>' will download data from <URL> over
# HTTP and save it locally to <FILE>. It will then search for the default phrase 'position = salesengineering-intern',
# and if it does not find it, append the phrase to the end of the file and then check again.
#
@lilactown
lilactown / gist:5686076
Last active December 17, 2015 22:59
Support Resume
Will Acton
1912 SW 6th Ave. #1222, Portland, OR 97201 ˆ (503) 939-8737 ˆ actonw.work@gmail.com
Self-Summary
I am a senior at Portland State University about to graduate with a B.S. in Mathematics. I also spend my
free time programming and training/coaching martial arts. I am hard working and clever. My most valuable
attribute is my ability to pick up and learn new skills in a new environment at a fast pace, on the go. I have
lots of patience and excellent interpersonal communication skills.
Experience
@lilactown
lilactown / denodeify.js
Last active August 29, 2015 14:23
ES6 denodeify
const denodeify = (fn) =>
function (...args) {
// bind our node function to the current context with arguments
const boundFn = fn.bind(this, ...args);
return new Promise((resolve, reject) => {
// call our bound node-style function
// typical node-style is `callback (err, result)`
// but we can account for more arguments
// by using a spread
@lilactown
lilactown / updateghost.sh
Last active February 4, 2016 20:31
Putting this here so I'm not downloading and running an uncontrolled script as root all the time.
#!/bin/bash
# Written by Andy Boutte and David Balderston of howtoinstallghost.com, ghostforbeginners.com and allaboutghost.com
# updateghost.sh will update your current ghost install to the latest version without you losing any content
if [ -f config.js ]
then
echo `whoami`
# Make temporary directory and download latest Ghost.
mkdir temp
cd temp

Keybase proof

I hereby claim:

  • I am lokeh on github.
  • I am lilactown (https://keybase.io/lilactown) on keybase.
  • I have a public key ASCapdmYRqCZdN5lH20UYAK97qiesOSuzTC7P68aBL04Xwo

To claim this, I am signing this object:

@lilactown
lilactown / erl-get
Last active February 28, 2017 03:49
A script to download an Erlang program from Gist/Hastebin and open a REPL with it compiled and loaded
#!/bin/bash
##########################
# Description:
# Downloads an Erlang program from a Gist or Hastebin, then opens an Erlang shell with it
# compiled and loaded.
#
# Installation:
# Download and install this script in /usr/local/bin
#
@lilactown
lilactown / promise.cljc
Created May 16, 2017 17:11
A simple macro to aid with dealing with promise chains in ClojureScript
(ns lilactown.promise)
;; This is a simple macro to aid with dealing with promise chains
;; in ClojureScript. Often external JS libraries (such as request-promise
;; or other async libs) return a promise object, so we write code like:
;;
;; (-> promise-value
;; (.then do-something)
;; (.then #(do-something-else %))
;; (.then (fn [val] (and-again val)))
type Reduced<Value> = { value: Value, completed: boolean };
type Reducer<Accumulator, Input> = (whatever: Accumulator, input: Input) => Accumulator | Reduced<Accumulator>;
type Transducer<Input, Output> =
<Accumulator>(reducer: Reducer<Accumulator, Output>) => Reducer<Accumulator, Input>;
// utils
function reduced<Value>(value: any, completed: boolean): Reduced<Value> {
return { value, completed };
}
@lilactown
lilactown / user.clj
Created August 10, 2017 16:22
Figwheel + nREPL + CIDER boilerplate
;; Something similar to this goes in project.clj:
;;
;; :profiles {:dev {:dependencies [[com.cemerick/piggieback "0.2.2"]
;; [figwheel-sidecar "0.5.10"]]
;; :source-paths ["ui_src" "dev"]}}
(ns user
(:require [figwheel-sidecar.repl-api :as ra]))
(defn fig-start [] (do