Skip to content

Instantly share code, notes, and snippets.

@KaeruCT
KaeruCT / c.js
Created February 11, 2014 18:35
// six(dividedBy(two())) == 3
var self = this;
['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'].forEach(function (el, i) {
self[el] = (function (i) {
return function (op) {
return op ? op(i) : i;
};
}(i));
});
rsync -avz --delete Music/ /media/andres/iwayo/music/
javax.persistence.EntityNotFoundException: Unable to find com.gangfive.sima.ejb.Nutricionista with id 88org.hibernate.ejb.Ejb3Configuration$Ejb3EntityNotFoundDelegate.handleEntityNotFound(Ejb3Configuration.java:155)org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:261)org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:175)org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:285)org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:185)com.gangfive.sima.ejb.Nutricionista_$$_javassist_7.getId(Nutricionista_$$_javassist_7.java)com.gangfive.sima.pojo.UsuarioPOJO.<init>(UsuarioPOJO.java:28)com.gangfive.sima.pojo.NutricionistaPOJO.<init>(NutricionistaPOJO.java:26)com.gangfive.sima.pojo.RetoPOJO.setNutricionista(RetoPOJO.java:161)com.gangfive.sima.pojo.RetoPOJO.<init>(RetoPOJO.java:48)com.gangfive.sima.controllers.RetosController.findByUsuario(RetosController.java:
@KaeruCT
KaeruCT / .conkyrc
Created June 5, 2014 23:46
new conky config
# Conky Google Now style #
# Conky settings #
background yes
update_interval 1
double_buffer yes
no_buffers yes
format_human_readable yes
# Window specifications #
@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;
@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 / 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):
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (callback) {
window.setTimeout(callback, 1000 / 60);
};
})();
@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();
}
package main
import (
"fmt"
"math/big"
)
func fibonacciCalculator() func(n int) *big.Int{
cache := map[int]*big.Int{
0: big.NewInt(0),