This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# give last chance to ^C | |
# place this file at /usr/local/bin | |
echo | |
echo " sudo: $@" | |
sleep 1.7 | |
/usr/bin/sudo $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'.source.python': | |
'import boilerplate': | |
'prefix': 'import' | |
'body': ''' | |
import collections | |
from collections import Counter, OrderedDict, defaultdict, deque, ChainMap, namedtuple | |
import itertools | |
from itertools import permutations, combinations, combinations_with_replacement | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import os, progressbar, bz2 | |
def bz2_wc(path): | |
count = 0 | |
with open(path, "rb") as bzf: | |
filesize = os.fstat(bzf.fileno()).st_size | |
p = progressbar.ProgressBar(maxval=filesize) | |
with bz2.open(bzf, "rt") as tf: | |
for line in tf: | |
p.update(bzf.tell()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use srfi-1) | |
(define (scan-pattern text) | |
(let loop ((pattern '(())) (lis (string->list text))) | |
(if (null? lis) (map (compose list->string reverse) pattern) | |
(loop (append | |
(map (lambda (x) (cons (car lis) x)) pattern) | |
(map (lambda (x) | |
(if (and (pair? x) (eq? (car x) #\*)) x (cons #\* x))) | |
pattern)) (cdr lis))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#automatic typescripting | |
# [ -z "${SCRIPT}" ] && SCRIPT=YES script -a -f -t ~/typescript 2>> ~/typescript.t && exit | |
SCRIPT= | |
PATH=${PATH}:/opt/java/jre/bin/ | |
# coreutils 8.25 | |
export QUOTING_STYLE=literal | |
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.histfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-module sound.clip | |
(export-all)) | |
(select-module sound.clip) | |
(define-class <clip> () | |
((proc :init-keyword :proc) | |
(duration :init-keyword :duration) | |
(sample-rate :init-keyword :sample-rate :init-value 44100) | |
(bits :init-keyword :bits :init-value 8))) | |
(define (make-clip duration proc . args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⍝ `blah ...` are literate (= English) quotes and 'blah ...' are quotes for character literals (= APL quotes). | |
:namespace Contest2012 | |
AboutMe ←, ⊂ 'I am a faculty student in Japan, majoring science.' | |
AboutMe ,← ⊂ 'I beleve that computers will transcend, or extend human intelligence' | |
AboutMe ,← ⊂ 'if programmed insightfully and analogically. It makes my passion toward computing.' | |
AboutMe ,← ⊂ 'Lisp, especially Scheme has been my language of choice for years.' | |
AboutMe ,← ⊂ 'I know some very basic element of APL has been imported to Scheme,' | |
AboutMe ,← ⊂ 'the iota function (srfi-1) and multidimentional array (srfi-25 via Common Lisp)' | |
AboutMe ,← ⊂ 'I have small repository to share fairly exprimental things on github.com/insanity (being rather unsocial, though)' |