Skip to content

Instantly share code, notes, and snippets.

Avatar
💩

Jethro Kuan jethrokuan

💩
View GitHub Profile
@jethrokuan
jethrokuan / index.html.erb
Created Jul 22, 2012
Error: assertion failed: an Ember.CollectionView's content must implement Ember.Array. You passed Ol.SubjectsController
View index.html.erb
<script type="text/x-handlebars">
{{view Ol.ListSubjectsView}}
</script>
@jethrokuan
jethrokuan / sitemap.xml
Created Dec 20, 2013
Jekyll sitemap.xml
View 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 / Qs.clj
Created Nov 26, 2015
Clojure lazy QS
View Qs.clj
(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 / braid.md
Last active Jan 27, 2016
Feedback for Braid
View braid.md

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 Mar 27, 2016
Simple Go Webserver
View serve.go
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
fmt.Println("Serving files in the current directory on port 3000")
View api.clj
(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
Shim for uberjar. Set :main to shim/-main, and only AOT shim.
View shim.clj
(ns shim
(:gen-class))
(defn -main [& argv]
(require 'my.app.entrypoint)
(apply (resolve 'my.app.entrypoint/-main) argv))
@jethrokuan
jethrokuan / config.fish
Created Aug 3, 2016
snippet for fish < 2.3
View config.fish
for file in ~/.config/fish/conf.d/*.fish
source $file
end
@jethrokuan
jethrokuan / metropolis.css
Created Aug 15, 2016 — forked from vhodges/metropolis.css
A version of the Beamer theme Metropolis for reveal.js
View metropolis.css
/**
* 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 {
View keybase.md

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: