Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/php
<?php
if (empty($argv[1])) {
die("please specify a file\n");
}
function is_str($word) {
return preg_match('%^".*"$%', $word);
}
@KaeruCT
KaeruCT / .conkyrc
Created September 12, 2013 21:33
conky config
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_class conky-semi
own_window_argb_value 40
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
format_human_readable yes
double_buffer yes
background yes
package main
import (
"fmt"
"math/big"
)
func fibonacciCalculator() func(n int) *big.Int{
cache := map[int]*big.Int{
0: big.NewInt(0),
@KaeruCT
KaeruCT / gist:5500114
Last active December 16, 2015 21:29
choose your own adventure (really tightly coupled to board software)
<?php
// By Kaeru~
require('lib/common.php');
$sql = new mysql;
if(!@$sql->connect($sqlhost,$sqluser,$sqlpass))
{
mysqlerror();
}
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (callback) {
window.setTimeout(callback, 1000 / 60);
};
})();
@KaeruCT
KaeruCT / noise.py
Last active December 14, 2015 09:08
i have no idea what i'm doing
#!/usr/bin/env python2
# do: ./noise.py | aplay -c 2
# edited: speed up until too fast
import sys
import math
import random
TEMPO=1000
def p(i):
@KaeruCT
KaeruCT / hackertyper.sh
Last active April 4, 2022 15:21
hackertyper.com on your bash shell
#!/bin/bash
if [ ! -r "$1" ]; then
echo "Please provide a valid file."
exit 0
fi
file="$(<$1)"
length="${#file}"
speed=4
char_count=0
@KaeruCT
KaeruCT / about.md
Created June 30, 2012 02:04 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@KaeruCT
KaeruCT / GameObject.java
Created May 2, 2012 21:57
bad platformer basic entity
package com.cascadegames.androidgame;
import android.util.Log;
import jgame.JGObject;
public abstract class GameObject extends JGObject {
AndroidGame g;
double gravity = 0.9;