Skip to content

Instantly share code, notes, and snippets.

View emlyn's full-sized avatar

Emlyn Corrin emlyn

View GitHub Profile
(ns defwrapper
(:require [clojure.string :as str]))
(set! *warn-on-reflection* true)
(defn class-methods [^Class class]
(seq (.getMethods class)))
(defn constructors [^Class klazz]
(.getDeclaredConstructors klazz))
@reborg
reborg / rich-already-answered-that.md
Last active May 8, 2024 14:20
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@gbaman
gbaman / HowToOTGFast.md
Last active May 14, 2024 10:26
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

anonymous
anonymous / Tubular Bells - Master Script to control functions
Created March 17, 2016 16:24
'Tubular Bells' - Sonic Pi code
with_fx :reverb do
use_synth :piano
play:E5, amp: 0.7, sustain: 1, release: 3
sleep 0.20
piano_intro
end
with_fx :reverb do
in_thread(name: :piano) do
loop do
@Redchards
Redchards / hello.cxx
Last active September 8, 2016 15:51
Unecessarly obfuscated "Hello World" code in C++. Compile with LLVM/clang, and now with g++ ! (woohooo!)
#include "hello.hxx"
using namespace Dante;
int main()
{
AlphaMan Benzaie;
Benzaie.KILLECVERYTINGBHLAAAAH();
}