Skip to content

Instantly share code, notes, and snippets.

View joshrotenberg's full-sized avatar
💀

josh rotenberg joshrotenberg

💀
View GitHub Profile
@compressed
compressed / playground.rs
Created February 1, 2016 15:08 — forked from anonymous/playground.rs
rust: map + filter_map + Result examples
use std::collections::HashMap;
fn main() {
// println!("{:?}", go(&[1, 2, 3]));
// println!("{:?}", go(&[1, 3, 4, 5, 6]));
println!("go_while {:?}", go_while(&[1, 3, -4, 4, 5, 6]));
println!("go_filter_map {:?}", go_filter_map(&[1, 3, 4, -4, 5, 6]));
let mut hm = HashMap::new();
@reiz
reiz / gist:d67512deee814705134e
Created May 5, 2015 09:29
Vagrantfile for a Java dev. environment with Oracle Java 8 and Eclipse.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
module-template: ! 'module MODULE_NAME where
'
extensions: {}
environment: default
cabal-file: project.cabal
version: 1
ghc-args: []
excluded-modules: []
@john2x
john2x / 00_destructuring.md
Last active April 23, 2024 13:18
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@fjavieralba
fjavieralba / KafkaLocal.java
Last active March 23, 2021 09:57
Embedding Kafka+Zookeeper for testing purposes. Tested with Apache Kafka 0.8
import java.io.IOException;
import java.util.Properties;
import kafka.server.KafkaConfig;
import kafka.server.KafkaServerStartable;
public class KafkaLocal {
public KafkaServerStartable kafka;
public ZooKeeperLocal zookeeper;
@imjasonh
imjasonh / README.md
Last active October 28, 2021 06:26
Simple reusable Set minilibrary for Go. Doesn't have any type checking (lolgenerics), just using interface{}. Something like this has come in handy enough times in the past, even without generics/typing, that I think it's worth jotting down.

GoDoc

@gmccreight
gmccreight / master.vim
Last active September 23, 2023 08:41
A script that gives you a playground for mastering vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)