Skip to content

Instantly share code, notes, and snippets.

digraph g{ graph[rankdir=LR;];
v0477 [label="0477\n(33)"]
v0225 [label="0225\n(05)"]
v4689 [label="4689\n(25)"]
v1224 [label="1224\n(03)"]
v2268 [label="2268\n(44)"]
v6678 [label="6678\n(12)"]
v6777 [label="6777\n(01)"]
v5589 [label="5589\n(34)"]
v2889 [label="2889\n(04)"]
default:
echo "(+ 1 2) (+ 10 3)" | ruby tlisp.rb
@tily
tily / njslyr_term_ranking.md
Created November 17, 2010 12:45
ニンジャスレイヤーの特徴的なカタカナ語ランキング (ベスト100)
順位 カタカナ 頻度 スコア
1 ニンジャスレイヤー 610 10632
2 ニンジャ 500 3657
3 イヤーッ 211 2537
4 グワーッ 155 2056
5 ギンイチ 166 1986
6 スリケン 123 1533
7 ネオサイタマ 73 1362
(ns xmas)
(doseq [line (concat (take 9 (map #(apply str
(take (+ (rem % 3)
(int (/ % 3)))
(repeat "*")))
(range 20)))
(take 2 (repeat "*")))]
(println (format "%1$30s*%1$s" line)))
@m2ym
m2ym / brainfuck.lisp
Created January 11, 2011 08:55
Brainfuck Interpreter for Common Lisp with JIT compiler
(defpackage :brainfuck (:use :cl))
(in-package :brainfuck)
(defun string->brainfuck (source)
(let* ((fragments
(map 'list
(lambda (c)
(case c
(#\> "(incptr 1)")
#!/bin/bash
cd "`dirname $0`/../"
lein compile
git archive --format=tar --prefix=hogehoge/ HEAD | gzip > ../hogehoge.tar.gz
scp -l 800 ../hogehoge.tar.gz server:/tmp/
ssh server "cd /usr/local; tar zxf /tmp/hogehoge.tar.gz"
@hitode909
hitode909 / bigaku.rb
Created January 31, 2011 23:42
ブサ彦物語ダウンロードする
# -*- coding: utf-8 -*-
require 'open-uri'
require 'nokogiri'
require 'uri'
$index_url = URI.parse('http://mbbs.tv/u/?id=18over')
$known_pages = []
def page(url)
@eliasson
eliasson / digest.clj
Created October 20, 2011 19:16
Clojure md5 digest
(defn md5
"Generate a md5 checksum for the given string"
[token]
(let [hash-bytes
(doto (java.security.MessageDigest/getInstance "MD5")
(.reset)
(.update (.getBytes token)))]
(.toString
(new java.math.BigInteger 1 (.digest hash-bytes)) ; Positive and the size of the number
16))) ; Use base16 i.e. hex
@kawabata
kawabata / tarai.clj
Created November 16, 2011 21:33
tarai mawashi in overtone
(ns tarai.core
(:use [overtone.live]))
;; basic.clj より
(defsynth foo [freq 200 dur 0.5]
(let [src (saw [freq (* freq 1.01) (* 0.99 freq)])
low (sin-osc (/ freq 2))
filt (lpf src (line:kr (* 10 freq) freq 10))
env (env-gen (perc 0.1 dur) :action FREE)]
(out 0 (pan2 (* 0.1 low env filt)))))
@samaaron
samaaron / bells.clj
Created December 12, 2011 15:20 — forked from jennifersmith/bells.clj
Cheesy Holiday Music and bell synthesis example
(ns overtone-xmas.bells
(:use [overtone.live]))
;;tested in Overtone 0.6-dev
;;add [overtone.sc.machinery.defcgen] to ns :use clause for 0.5.0
;;http://computermusicresource.com/Simple.bell.tutorial.html
(def dull-partials
[
0.56