Skip to content

Instantly share code, notes, and snippets.

View rcoder's full-sized avatar

Lennon Day-Reynolds rcoder

View GitHub Profile
@rcoder
rcoder / zthosts.nu
Created February 18, 2024 17:30
General `/etc/hosts` file for ZeroTier Central networks
const API_BASE = "https://api.zerotier.com/api/v1"
let token = $env.ZT_TOKEN
let headers = {
Authorization: $"token ($token)"
}
def apiGet [path: string] {
http get --headers $headers $"($API_BASE)/($path)"
⋊> ~ python3 12:16:25
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> cal2j = lambda x: x*4.184 # calories -> joules
>>> oz2ml = lambda v: v*20.574 # ounces -> milliliters
>>> vol = oz2ml(2) # 2 oz. serving
>>> cold = 4.5 # 4.5C, or ~40F
>>> warm = 40 # 40C, or ~105F
>>> heat = warm - cold

Keybase proof

I hereby claim:

  • I am rcoder on github.
  • I am rcoder (https://keybase.io/rcoder) on keybase.
  • I have a public key ASA9ZpmgZP7J_qM3MV8gzy0Dx3oL-bcaqUCTlXEaYuU6dAo

To claim this, I am signing this object:

package com.urbanairship.unicorn.cowboy
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
import org.apache.spark.rdd.RDD
import java.util.Date
object Job {
val conf = new SparkConf().setAppName("HowdyCowboy")
require 'java'
Dir['target/dependency/*.jar'].each {|jar| require jar }
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.memcached.protocol.text.Memcached
import com.twitter.finagle.memcached.java.Client
import com.twitter.finagle.memcached.java.ClientBase
import java.net.InetSocketAddress
import java.nio.charset.Charset
@rcoder
rcoder / rabbit.md
Last active December 15, 2015 14:29
My rabbit mole recipe (as best I can remember it)

Poblano mole rabbit

Ingredients

  • 2 fresh rabbits
  • 1 cup lard
  • 2 oz. Mexican chocolate
  • 3 jalapeño peppers
@rcoder
rcoder / escher.rb
Created December 14, 2012 00:03 — forked from lecram/escher.py
=begin
Single-file K/V database and query script.
This one also does compression (because disk I/O and efficiency and
"best practices" and shut up, that's why).
Inspired by (and hopefully more ridiculous than) https://gist.github.com/4280027
=end
USAGE = <<END
@rcoder
rcoder / gist:4041408
Created November 8, 2012 20:34
JRuby 1.7.0 error when requiring "twitter-text" library
>> $KCODE = "UTF8"
=> "UTF8"
>> require 'twitter-text'
Exception `Gem::LoadError' at java/lang/Thread.java:1567 - Could not find builder (~> 2.1.2) amongst [BlueCloth-1.0.1, Platform-0.4.0, SyslogLogger-1.4.0, ab_decider-0.0.3, actionmailer-2.3.11.2, actionpack-2.3.11.2, activerecord-2.3.11.2, activerecord-jdbc-adapter-1.2.2.1, activerecord-jdbcmysql-adapter-1.2.2.1, activerecord-lazy-adapter-0.0.1, activeresource-2.3.11.2, activesupport-2.3.11.2, adlog_thrift-2.0.0, adserver_client-0.0.14, adserver_thrift-0.0.24, awesome_print-1.0.2, blankslate-2.1.2.4, bouncy-castle-java-1.5.0146.1, brakeman-1.8.2, brakeman-1.6.1, brakeman_tools-0.0.12, brakeman_tools-0.0.9, bundler-1.2.1, camertron-rkelly-1.0.4, campfire-0.1.2, capistrano-2.9.0, capistrano-ext-1.2.1, cgi_multipart_eof_fix-2.5.0, chronic-0.6.7, cm-0.0.7, columnize-0.3.6, configgy-0.6, configuration-1.1.0, daemons-1.1.9, decider-0.2.13, deploy_monitor-0.0.1, diff-lcs-1.1.3, diff-lcs-1.1.2, erubis-2.7.0, escape-0.0.4, eventmachine-1.0.0, execjs-1.2.13, expert
%self total self wait child calls name
35.88 49.01 26.36 0.00 22.66 193239 *Array#map
24.79 18.21 18.21 0.00 0.00 34121100 Fixnum#abs
@rcoder
rcoder / route7.txt
Created July 14, 2012 07:10
current #icfpc status
:-1 :-1 :-1 :-1 #:-1 #:-1 #:-1 #:-1 #:-1 #:-1 #:-1 :48 :35 :18 :-1 :-1 :-1 :-1 :-1
:-1 :-1 :-1 :-1 #:-1 #:-1 :15 :34 :49 :62 :72 #:-1 :48 :35 :18 :-1 :-1 :-1 :-1
:-1 :-1 :-1 :-1 :-1 #:-1 #:-1 :48 :63 :73 :81 #:-1 #:-1 :48 :35 :18 :-1 :-1 :-1
:-1 :-1 :-1 :-1 :18 :33 #:-1 #:-1 :71 *:00 *:00 :80 #:-1 #:-1 :48 :35 :18 :-1 :-1
:-1 :-1 :-1 :18 :35 :50 :60 #:-1 #:-1 .:88 .:94 :90 .:81 #:-1 #:-1 :48 :35 :18 :-1
:-1 :-1 :18 :35 :50 :61 #:-1 #:-1 .:88 :95 :98 :95 :90 :81 #:-1 #:-1 :48 :35 :18
:-1 :18 :35 :50 :61 #:-1 #:-1 :88 :95 :97 L:99 R:97 :95 :90 :81 #:-1 #:-1 :48 :35
:-1 :-1 :18 :33 #:-1 #:-1 :71 :82 :88 #:-1 :96 #:-1 :88 :82 :73 :60 #:-1 #:-1 :16
:-1 :-1 :-1 #:-1 #:-1 #:-1 #:-1 #:-1 #:-1 :87 :94 :88 #:-1 #:-1 #:-1 #:-1 #:-1 #:-1 #:-1