Skip to content

Instantly share code, notes, and snippets.

View drguildo's full-sized avatar

Simon Morgan drguildo

View GitHub Profile
(defn factorial [n]
(loop [n n
acc 1N]
(if (= n 0)
acc
(recur (dec n) (* acc n)))))
@drguildo
drguildo / gist:8151017
Created December 27, 2013 18:48
Raspberry Pi /proc/cpuinfo
pi@raspberrypi ~ $ cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : swp half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
@drguildo
drguildo / Game Keys.txt
Last active December 20, 2015 19:56
Spare Game Keys
100% Orange Juice
12 Labours of Hercules
12 Labours of Hercules II: The Cretan Bull
3 Stars of Destiny
3089 -- Futuristic Action RPG
7 Grand Steps: What Ancients Begat
7th Legion
8-Bit Adventures: The Forgotten Journey Remastered Edition
A New Beginning - Final Cut
A Story About My Uncle
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide for those without the patience to wait for whistleblowers
--[ 1 ]-- Introduction
@drguildo
drguildo / gist:e46ccd87e5b9237b9e72
Created August 21, 2014 17:05
"lein repl" Exception
Exception in thread "nREPL-worker-0" java.lang.NoSuchMethodError: clojure.tools.nrepl.StdOutBuffer.length()I
at clojure.tools.nrepl.middleware.session$session_out$fn__7630.doInvoke(session.clj:43)
at clojure.lang.RestFn.invoke(RestFn.java:460)
at clojure.tools.nrepl.middleware.session.proxy$java.io.Writer$ff19274a.write(Unknown Source)
at java.io.PrintWriter.write(Unknown Source)
at java.io.PrintWriter.write(Unknown Source)
at clojure.core$fn__5471.invoke(core_print.clj:191)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
at clojure.core$pr_on.invoke(core.clj:3392)
at clojure.core$pr.invoke(core.clj:3404)
@drguildo
drguildo / gist:f98d3e44270a541a9d45
Last active August 29, 2015 14:06
Useful Eclipse Shortcuts
Shortcut Description
Ctrl + 3 Opens a filterable list of all available actions.
Ctrl + D Delete the current line.
Ctrl + L Go to line.
Ctrl + O Gives an outline of the code allowing quick navigation between definitions.
Ctrl + / Toggles commenting of the selected region or the current line.
Ctrl + F11 Runs the current code.
Ctrl + Shift + F Format the selected code or the current file.
@drguildo
drguildo / c_unlockedheroes.xml
Last active February 25, 2024 11:46
Ghost Recon Unlocks
<UnlockedHeroes>
<Hero>c_buzz_gordon.atr</Hero>
<Hero>c_henry_ramirez.atr</Hero>
<Hero>c_jack_stone.atr</Hero>
<Hero>c_klaus_henkel.atr</Hero>
<Hero>c_susan_grey.atr</Hero>
<Hero>c_will_jacobs.atr</Hero>
</UnlockedHeroes>
@drguildo
drguildo / gist:8c429c8557b373826dd5
Created September 20, 2014 12:28
Fletcher's checksum in Kotlin
package com.drguildo.stdlib.algorithms
fun fletcher16(data: ByteArray): Int {
var sum1 = 0
var sum2 = 0
for (d in data) {
sum1 = (sum1 + d) % 255
sum2 = (sum2 + sum1) % 255
}

Keybase proof

I hereby claim:

  • I am drguildo on github.
  • I am drguildo (https://keybase.io/drguildo) on keybase.
  • I have a public key whose fingerprint is 8ACF 5D22 C3CE 5B92 7288 51A2 A848 A3BA D352 170C

To claim this, I am signing this object: