Skip to content

Instantly share code, notes, and snippets.

View jethrokuan's full-sized avatar
💩

Jethro Kuan jethrokuan

💩
View GitHub Profile
@jethrokuan
jethrokuan / index.html.erb
Created July 22, 2012 16:29
Error: assertion failed: an Ember.CollectionView's content must implement Ember.Array. You passed Ol.SubjectsController
<script type="text/x-handlebars">
{{view Ol.ListSubjectsView}}
</script>
@jethrokuan
jethrokuan / Qs.clj
Created November 26, 2015 11:45
Clojure lazy QS
(defn sort-parts
"Lazy, tail-recursive, incremental quicksort. Works against
and creates partitions based on the pivot, defined as 'work'."
[work]
(lazy-seq
(loop [[part & parts] work]
(if-let [[pivot & xs] (seq part)]
(let [smaller? #(< % pivot)]
(recur (list*
(filter smaller? xs)
@jethrokuan
jethrokuan / sitemap.xml
Created December 20, 2013 08:26
Jekyll sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://jethrokuan.github.io/</loc>
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
{% for post in site.posts %}
<url>
@jethrokuan
jethrokuan / braid.md
Last active January 27, 2016 17:01
Feedback for Braid

Context

I say this as a new user to Braid, with little to no prior knowledge of how it works (other than watching the demo video).

First look

  • Very overwhelmed. Lots of boxes seen in some channels. Not sure where to begin.
  • Clicks #Fix-Me-Anyway, sees a ton of threads that I can't close/have no option to hide/have no tl;drs that can clue me in as to what's the thread about
  • How do I focus on one thread? Or am I not supposed to?
  • Latency hurts, even when its not about chatting. Changing channels should feel immediate, like in slack.
  • How do you refer people to threads that they may be interested in?
@jethrokuan
jethrokuan / serve.go
Created March 27, 2016 05:20
Simple Go Webserver
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
fmt.Println("Serving files in the current directory on port 3000")
(ns ttagenda.api
(:require [ttagenda.db :as db]
[ttagenda.util :refer :all]
[ttagenda.keytable :as kt]
[ttagenda.shouter :as s]
[ttagenda.print :as p]
[clojure.string :as st]
[ring.util.response :refer [response]]))
(def FAILURE_TEXT "We couldn't process your request at this time, please try again later")
@jethrokuan
jethrokuan / shim.clj
Created May 11, 2016 15:42
Shim for uberjar. Set :main to shim/-main, and only AOT shim.
(ns shim
(:gen-class))
(defn -main [& argv]
(require 'my.app.entrypoint)
(apply (resolve 'my.app.entrypoint/-main) argv))
@jethrokuan
jethrokuan / config.fish
Created August 3, 2016 12:47
snippet for fish < 2.3
for file in ~/.config/fish/conf.d/*.fish
source $file
end
@jethrokuan
jethrokuan / metropolis.css
Created August 15, 2016 02:21 — forked from vhodges/metropolis.css
A version of the Beamer theme Metropolis for reveal.js
/**
* A simple theme for reveal.js presentations, derived from serif.css
* It's in the spirit of the Metropolis theme for beamer https://github.com/matze/mtheme
*
* This theme is Copyright (C) 2016 Vince Hodges, http://sourdoughlabs.com - it is MIT licensed.
*/
@import url('https://fonts.googleapis.com/css?family=Fira+Sans');
.reveal a {

Keybase proof

I hereby claim:

  • I am jethrokuan on github.
  • I am jethroksy (https://keybase.io/jethroksy) on keybase.
  • I have a public key ASBZCMhhv_7BDI6w28eRM6y_z8u_0S6xKGOFG2cbq02Akgo

To claim this, I am signing this object: