Skip to content

Instantly share code, notes, and snippets.

View serialhex's full-sized avatar
😸
Pondering language design...

serialhex

😸
Pondering language design...
View GitHub Profile
@serialhex
serialhex / lazy.lisp
Last active August 29, 2015 14:01
Awesome lazyness in lisp by Conrad Barski
; from Land of Lisp by Conrad Barski MD.
; http://landoflisp.com/
; lazy eval is awesome...
; and lazy!
(defmacro lazy (&body body)
(let ((forced (gensym))
(value (gensym)))
`(let ((,forced nil)
import com.jacob.com.*;
public class Foo {
public static void main(String[] args) {
System.out.println("Hello world!");
// QBFC constants looked up using the object browser
Variant ctLocalQDB = new Variant(1);
Variant omDontCare = new Variant(2);
// major and minor version of qbXML used to talk to QuickBooks
Variant qbXMLMajor = new Variant(6);
#!/bin/bash
# Usage: sudo apt-get install -yqq curl; curl -L -s https://raw.github.com/gist/5015316/ubuntu-install-media.sh | sudo bash
# originally by [AJ ONeal](http://blog.coolaj86.com/articles/the-ubuntu-you-deserve.html)
# edited by serialhex to make ubuntu computers look more like win-7... only because I have to...
#alias sagi="apt-get install --yes --quiet" # normall sudo apt-get, but this is already root
#alias sagid="apt-get install --yes --quiet --download-only" # same as above
#STDOUT=/dev/stdout
var canvas = null;
var context = null;
var assets = ['/media/js/standalone/libs/gamedev_assets/robowalk/robowalk00.png',
'/media/js/standalone/libs/gamedev_assets/robowalk/robowalk01.png',
'/media/js/standalone/libs/gamedev_assets/robowalk/robowalk02.png',
'/media/js/standalone/libs/gamedev_assets/robowalk/robowalk03.png',
'/media/js/standalone/libs/gamedev_assets/robowalk/robowalk04.png',
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>My Hakyll Blog - about</title>
<link rel="stylesheet" type="text/css" href="./css/default.css" />
</head>
<body>
<div id="header">
/* Program to create "Time-Lock Puzzle" for LCS35 Time Capsule
Ronald L. Rivest
April 2, 1999
*/
import java.io.*;
import java.util.Random;
import java.math.BigInteger;
import java.lang.Math;
@serialhex
serialhex / worldgen.c
Created January 13, 2013 19:00
fractal worldmap generator; from here: http://www.lysator.liu.se/~johol/fwmg/fwmg.html
/*
* Copyright (C) 1999 John Olsson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
#!/usr/bin/env ruby
print "Content-Type: text/plain\r\n\r\n"
puts "foo"
@fibb=[0,1]
def fibb n
@fibb[n] ||= fibb(n-1) + fibb(n-2)
end
alignment top_left
background yes # fork process
color0 00FF00 # section header
double_buffer yes # may reduce flicker
default_color BBBBBB
draw_outline no # draw text outline
draw_shades yes # draw shades
--An unbiased single 4-sided die is thrown and its value, T, is noted.
--T unbiased 6-sided dice are thrown and their scores are added together. The sum, C, is noted.
--C unbiased 8-sided dice are thrown and their scores are added together. The sum, O, is noted.
--O unbiased 12-sided dice are thrown and their scores are added together. The sum, D, is noted.
--D unbiased 20-sided dice are thrown and their scores are added together. The sum, I, is noted.
--Find the variance of I, and give your answer rounded to 4 decimal places.
import Data.Ratio
import Data.List