Skip to content

Instantly share code, notes, and snippets.

@hhutch
hhutch / fetch-repos.sh
Created September 10, 2012 04:01
find file changes in all forks of a github repo
curl -i https://api.github.com/repos/scrooloose/nerdtree/forks |grep -e "git_url" |awk '{gsub(/,/,"");split($2,a,"/"); system("mkdir "a[4]"; cd "a[4]"; git clone " $2);}'
@hhutch
hhutch / README.txt
Created November 11, 2011 17:00
Clojurescript + NodeJS + Commander CLI + Core.Match
;; You do have Clojurescript, right?
;; First Install NodeJS
;; Then install npm (node package manager)
;; Then install Commander.js https://github.com/visionmedia/commander.js
$ cljsc src/cljs-demo/pizza.cljs '{:optimizations :simple :pretty-print true :target :nodejs}' > pizza.js
$ ./pizza.js --help
Usage: pizza.js [options]
Options:
F#C#ScalaClojurePythonRubyHaskellSQLOCamlCommon LispErlangSmalltalkSchemeEcmascript 5Perl 5
mapSelectmapmapmapcollectmapSelectmapmapcarmapcollect:mapmapmap
filterWherefilterfilterfilterselectfilterWherefilterremove-if-notfilterselect:filterfiltergrep
foldAggregatefoldLeftreducereduceinjectfoldl

How to make a pedestal + ss component w/ lein

this loosely follows pedestal component tutorial

http://pedestal.io/guides/pedestal-with-component

create base project

lein new pedestal-service tnbsst

add ss component to project.clj

all pedestal deps already scaffoled, using jetty for this demo

Note

This is my dot-file, therefore it’s prone to have broken-ness in it. I’m trying to clean it up and make sure it’s sane.

Things currently not the way i’d like

  • escreen is nice, but i have to init it each time and set it up to use it… i’d like a working revive+ config, but I haven’t gotten it working correctly yet. see my twittering section for an example of how i use excreen
$ time echo '{:foo :bar}' |./bin/clack :foo
:bar
echo '{:foo :bar}' 0.00s user 0.00s system 0% cpu 0.002 total
./bin/clack :foo 2.54s user 0.19s system 104% cpu 2.619 total
@hhutch
hhutch / bash-throbber.sh
Last active December 14, 2015 19:38 — forked from anonymous/bash-throbber.sh
Throbber using UTF8 clock
#!/usr/bin/env bash
C="0" # count
while [ $C -lt 30 ]
do
case "$(($C % 11))" in
0) char="\xF0\x9F\x95\x90"
;;
1) char="\xF0\x9F\x95\x91"
;;
@hhutch
hhutch / echo.java
Created June 26, 2012 17:52
Attempted transliteration of vert.x echo server in Java to Clojure
package org.vertx.java.examples.echo;
import org.vertx.java.core.Handler;
import org.vertx.java.core.net.NetSocket;
import org.vertx.java.core.streams.Pump;
import org.vertx.java.deploy.Verticle;
public class EchoServer extends Verticle {
public void start() {
@hhutch
hhutch / gist:2893517
Created June 8, 2012 04:09
Clojure Slides - JVM Languages - Philly Coders - June 6, 2012
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>Clojure</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2012-06-07 23:17:36 EDT"/>