Skip to content

Instantly share code, notes, and snippets.

View FredrikAugust's full-sized avatar
🦦
Otters enjoy spending time in water.

Fredrik A. Madsen-Malmo FredrikAugust

🦦
Otters enjoy spending time in water.
View GitHub Profile
@FredrikAugust
FredrikAugust / denmark-contour.R
Created July 14, 2015 03:20
render denmark as a contour in R
f <- function(m) t(m)[,nrow(m):1]
denmark <- f(f(as.matrix(read.csv('denmark.csv'))))
contour(denmark)
<html>
<head>
<meta http-equiv='refresh' content='5'/>
<title>ESP8266 Demo</title>
<style>
body {
background-color: #cccccc;
font-family: Arial, Helvetica, Sans-Serif;
color: #000088;
}
@FredrikAugust
FredrikAugust / classes.py
Last active September 23, 2015 22:36
Moon-adder for Solex
'''This is a simple script to create moon objects to use with
PietDaGamer's space-game.
This is the class file
'''
__author__ = 'Fredrik A. Madsen-Malmo'
class Moon:
"""Format:
@FredrikAugust
FredrikAugust / input.txt
Created November 4, 2015 10:05
Red Squiggle
accomodate
acknowlegement
arguemint
comitmment
deductabel
depindant
existanse
forworde
herrass
inadvartent
@FredrikAugust
FredrikAugust / README.md
Last active May 12, 2019 01:21
Simple evolutionary algorithm written in Common Lisp that works its way towards a provided sentence.

Hello-algo

To use the program:

  • Install common lisp
  • Make sure it's installed by typing 'clisp'
  • Exec command "clisp path/to/file.lisp population string"
  • Tweak population to find what works best for you
@FredrikAugust
FredrikAugust / human-benchmark-verbal-memory.js
Last active March 8, 2016 21:31
cheat for the verbal memory test on human benchmarking
// Human Benchmarking - Verbal Memory Test cheat
// Written by Fredrik A. Madsen-Malmo
//
// For educational purposes only. Duh
// Error when trying to access jQuery outside the top-level scope
var words = [];
var j = $;
var last;
@FredrikAugust
FredrikAugust / human-benchmarking-number-memory-test.js
Created March 8, 2016 21:29
cheat for the number memory test on human benchmarking
// Human Benchmarking - Number Memory Test cheat
// Written by Fredrik A. Madsen-Malmo
//
// For educational purposes only. Duh
// Error when trying to access jQuery outside top-level scope
var j = $;
var current_number;
// Assign in if for more DRY-ness
#!/usr/bin/ruby
# This is a port of my previous hello-algo program,
# which was written in Common Lisp
#
# Written by Fredrik A. Madsen-Malmo
# init all global variables
# doesn't look as good if you include \t and \n in CHARS
@FredrikAugust
FredrikAugust / read_aloud.rb
Last active March 13, 2016 19:39
Weechat read mentions and privmsgs
#!/usr/bin/ruby
# set username here!
NICK = "" # irc nick
IP = "" # computer on which to exec espeak
USER = "" # user on said computer
# this is all wizardry
# don't touch
@FredrikAugust
FredrikAugust / color_thing_gui.rb
Last active April 13, 2016 08:09
Color thing w/ GUI
#!/home/greg/.rvm/rubies/default/bin/ruby
require 'shoes'
class String
def convert_base(from, to)
to_i(from).to_s(to)
end
end