Skip to content

Instantly share code, notes, and snippets.

View chopmo's full-sized avatar

Jacob Tjoernholm chopmo

View GitHub Profile
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
goto-char(nil)
(progn (while (cider-stacktrace-next-cause)) (goto-char (next-single-property-change (point) (quote flags))))
(if compile-error-p (goto-char (next-single-property-change (point) (quote compile-error))) (progn (while (cider-stacktrace-next-cause)) (goto-char (next-single-property-change (point) (quote flags)))))
(save-current-buffer (set-buffer cider-error-buffer) (goto-char (point-min)) (if compile-error-p (goto-char (next-single-property-change (point) (quote compile-error))) (progn (while (cider-stacktrace-next-cause)) (goto-char (next-single-property-change (point) (quote flags))))))
(progn (select-window (car save-selected-window--state) (quote norecord)) (save-current-buffer (set-buffer cider-error-buffer) (goto-char (point-min)) (if compile-error-p (goto-char (next-single-property-change (point) (quote compile-error))) (progn (while (cider-stacktrace-next-cause)) (goto-char (next-single-property-change (
(ns Player
(:gen-class))
(defn -main [& args]
(while true
(let [mountains (doall (repeatedly 8 read))
max-height (apply max mountains)
highest-mountain (.indexOf mountains max-height)]
(println highest-mountain))))
(ns Player
(:require [clojure.set :as s])
(:gen-class))
(defn node-filter [nodes]
(fn [link]
(not-empty
(s/intersection
(set link)
(set nodes)))))
(ns playground.core
(:require [clojure.pprint :refer [pprint]]
[clojure.test :refer :all]
[clojure.set :as s]
[clj-time.core :as time]))
;; Just for testing
(def sessions-start (time/date-time 2010 1 1 10 00))
(defn download-sessions
[t]
(if (time/after? t sessions-start)
git co boostrap3
git co -b boostrap3-new
git reset master
(for each group of stuff:)
git add app/assets/images
git ci -m "BS3 images"
### Keybase proof
I hereby claim:
* I am chopmo on github.
* I am chopmo (https://keybase.io/chopmo) on keybase.
* I have a public key whose fingerprint is D006 31BE 4B26 5741 5E37 1CF1 40A7 46BC 9A57 E49C
To claim this, I am signing this object:
def foo
if bar
x = 1
else
x = 2
end
puts x
end
@chopmo
chopmo / gist:6699132
Created September 25, 2013 12:49
Terrible idea of the week
module OmniMap
def method_missing(name, *args)
self.map { |e| e.send(name, *args) }.extend(OmniMap)
end
end
strings = ["**cleaning**",
"UP a 'few'",
" messy",
"stri..ngs "]
@chopmo
chopmo / gist:5003679
Created February 21, 2013 10:10
Remove obsolete local and remore git branches - zsh version of http://rob.by/2013/remove-merged-branches-from-git
function rmb {
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
if [ "$current_branch" != "master" ]; then
echo "WARNING: You are on branch $current_branch, NOT master."
fi
echo "Fetching merged branches..."
git remote prune origin
remote_branches=$(git branch -r --merged | grep -v '/master$' | grep -v "/$current_branch$")
local_branches=$(git branch --merged | grep -v 'master$' | grep -v "$current_branch$")
if [ -z "$remote_branches" ] && [ -z "$local_branches" ]; then
@chopmo
chopmo / extinguisher.rb
Last active December 12, 2015 00:39 — forked from webjay/extinguisher.rb
# Usage
# curl -s https://raw.github.com/gist/4685351 | CF_DOMAIN=your_domain CF_ROOM="Your room" CF_TOKEN=your_api_token ruby
require 'rubygems'
require 'tinder'
class CampfireUploadCleaner
CF_DOMAIN = ENV["CF_DOMAIN"]
CF_ROOM = ENV["CF_ROOM"]