Skip to content

Instantly share code, notes, and snippets.

View mrmemes-eth's full-sized avatar
⚗️
creating

Stephen Caudill mrmemes-eth

⚗️
creating
View GitHub Profile
(ns hackerfews.core
2 (:require [net.cgrand.enlive-html :as html]))
3
4 (def url (java.net.URI. "http://news.ycombinator.com/"))
5
6 (defn titles
7 [docx] (flatten (map :content (html/select docx [:td.title :a]))))
8
9 (defn numbers-in-nodes
10 [docx selector] (let [x (flatten (map :content (html/select docx selector)))]
@mrmemes-eth
mrmemes-eth / convert
Created May 17, 2014 22:18
Parse the CSV output from MTGO v3 client and rewrite it in a format that's compatible with the Decked Builder collection converter here: http://www.mtgo-stats.com/convert_coll/em
#! /usr/bin/env ruby
# This ruby script parses the CSV output from MTGO v3 client and rewrites it in
# a format that's compatible with the Decked Builder collection converter here:
#
# http://www.mtgo-stats.com/convert_coll/em
#
# If you're not sure how to export a CSV from the v3 client, see the
# instructions here:
#
@mrmemes-eth
mrmemes-eth / error
Created June 24, 2014 20:31
Error inside vim when opening a test file with a running nrepl
Error detected while processing function <SNR>47_path..<SNR>47_connect:
line 10:
E117: Unknown function: fireplace#register_port_file
E15: Invalid expression: empty(portfile) ? {} : fireplace#register_port_file(portfile, b:leiningen_root)
Error detected while processing FileType Auto commands for "clojure":
E714: List required
Error detected while processing function <SNR>47_projectionist_detect..<SNR>47_path
..<SNR>47_connect:
line 10:
E117: Unknown function: fireplace#register_port_file

Tested with Mac OSX Mavericks on a late 2011 MBP

My testing approach has been to erase a partition and install fresh Mavericks onto it. Run the scripts, tweak and then tear down and reinstall on the partition.

Some general thoughts:

  • if bork doesn't stop for errors, it should probably aggregate them and output post-flight
  • output can be very noisy if running scripts comingled (maybe I shouldn't be doing that though)
  • confused about what ok destination does in conjunction with ok symlink
  • at least on my system, it doesn't set where the symlink should end up and I've
(defvar me-packages
'(cider clojure-mode)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")
(defvar me-excluded-packages '()
"List of packages to exclude.")
(defun me/init-package-me ()
"Staging ground for my configurations for other layers"
@mrmemes-eth
mrmemes-eth / delete-dataclips.sh
Created October 15, 2020 14:19
Programatically export and/or delete Heroku dataclips
#!/usr/bin/env bash
# there were a handful of clips that I didn't want to delete versus hundreds that I did,
# so I just removed the UUIDs of the clips I wanted to keep from uuids.txt by hand
cat uuids.txt | while read uuid
do
curl \
-H "authorization: Bearer $(heroku auth:token)" \
-H "content-type: application/json" \

Keybase proof

I hereby claim:

  • I am mrmemes-eth on github.
  • I am voxdolo (https://keybase.io/voxdolo) on keybase.
  • I have a public key whose fingerprint is 7026 C29F 4CAC 793C 418E D5C4 1E99 9E4B B9CA 1402

To claim this, I am signing this object: