Skip to content

Instantly share code, notes, and snippets.

View folkengine's full-sized avatar
😈
Living in interesting times.

Christoph folkengine

😈
Living in interesting times.
View GitHub Profile
@ldodds
ldodds / README.md
Last active July 5, 2024 20:11
How to make your own Xanadu demo

Twitter informed that a demo of Xanadu had launched, so I went to have a look. The demo only works in Firefox and it seems to be a cut down version of demos that I've seen Ted Nelson give in the past. But still: running code in the wild.

I met Ted Nelson once when we both spoke at an STM Innovations conference in 2006. I suspect he wouldn't have agreed with my much of my talk which looked at the web as a hypertext system and compared it with earlier approaches. My point of view was that we could bring those features back into the web by creating new services and by exploiting Javascript and web browsers to upgrade our experience of using the web. Evolution doesn't need to happen in a coordinated centralised way.

(When I say I met Ted Nelson, I meant that I shyly sat next to him at lunch while he expounded on various topics and fiddled with the tape recorder he was using to record all his conversations. So maybe, "met" isn't the right word (he won't

@Integralist
Integralist / Hash Keys to Symbols.rb
Last active September 2, 2020 08:50
Convert Ruby Hash keys into symbols
hash = { 'foo' => 'bar' }
# Version 1
hash = Hash[hash.map { |k, v| [k.to_sym, v] }]
# Version 2
hash = hash.reduce({}) do |memo, (k, v)|
memo.tap { |m| m[k.to_sym] = v }
end
@kristopherjohnson
kristopherjohnson / Makefile
Last active December 19, 2024 20:15
Makefile that uses Pandoc to generate HTML, PDF, DOCX, etc. from Markdown source files
# Makefile
#
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc
# <http://johnmacfarlane.net/pandoc/>
#
# Run "make" (or "make all") to convert to all other formats
#
# Run "make clean" to delete converted files
# Convert all files in this directory that have a .md suffix
@ecmendenhall
ecmendenhall / core.clj
Last active February 12, 2016 13:32
Prime factors two ways: Traditional unit tests and simple-check generative tests.
(ns primes.core)
(defn trial-division [n divisor factors]
(if (< n 2)
factors
(if (= 0 (mod n divisor))
(recur (/ n divisor) divisor (conj factors divisor))
(recur n (inc divisor) factors))))
(defn prime-factors [n]
@maciejwalkowiak
maciejwalkowiak / maven-shade-plugin configuration for Spring Shell
Created October 14, 2013 18:49
maven-shade-plugin configuration for creating execuable single jar Spring Shell based application
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@AndyBowes
AndyBowes / RomanNumeral.scala
Created July 4, 2012 16:07
Scala implementation of Roman Numeral conversion
class RomanNumeral {
def toRomanNumerals( number: Int) : String = {
toRomanNumerals( number, List( ("M", 1000),("CM", 900), ("D", 500), ("CD", 400), ("C", 100), ("XC", 90),
("L", 50), ("XL",40), ("X", 10), ("IX", 9), ("V", 5), ("IV", 4), ("I", 1) ))
}
private def toRomanNumerals( number: Int, digits: List[(String, Int)] ) : String = digits match {
case Nil => ""
case h :: t => h._1 * ( number / h._2 ) + toRomanNumerals( number % h._2, t )
}
@ry
ry / fib.js
Created March 12, 2012 00:17
a proper fibonacci server in node. it will light up all your cores.
var http = require('http')
var fork = require('child_process').fork;
function fib(n) {
if (n < 2) {
return 1;
} else {
return fib(n - 2) + fib(n - 1);
}
}
anonymous
anonymous / gist:1406238
Created November 29, 2011 20:09
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
@jasonrudolph
jasonrudolph / about.md
Last active May 2, 2025 12:20
Programming Achievements: How to Level Up as a Developer