Skip to content

Instantly share code, notes, and snippets.

View veeenu's full-sized avatar

Andrea Venuta veeenu

View GitHub Profile
@veeenu
veeenu / jumpingtux.pl
Created April 7, 2014 08:54
Jumping Tux obfuscation in Perl, dates back to 2004. I was so young and so 31337, and this could have been made hundreds of times better than this, but still to date I'm so proud of it :)
#!/usr/bin/perl
###########################################
# Jumping Tux Obfu v0.1_alpha by X-3mE'89 #
# Written for Perlmonks.org on 18/07/2k4 #
###########################################
######################################
# Tools used to create this obfu: #
# #
@veeenu
veeenu / cellular-automaton.hs
Last active August 29, 2015 14:07
Haskell cellular automaton
import System.Random
getCell :: Int -> Int -> [Int] -> Int
getCell x y vec = head $ drop ((clamp y) * 32 + (clamp x)) vec
where clamp i = min 31 (max 0 i)
generation :: Int -> [Int] -> [Int]
generation 0 vec = vec
generation i vec = map step [0 .. length vec]
where
@veeenu
veeenu / ortho.hs
Created November 7, 2014 18:47
Haskell orthograpic projection
import qualified Graphics.UI.GLUT as GLUT
import Data.IORef
type Mat3 = (
GLf, GLf, GLf,
GLf, GLf, GLf,
GLf, GLf, GLf
)
type Vec3 = ( GLf, GLf, GLf )
type GLf = GLUT.GLfloat
@veeenu
veeenu / index.html
Created December 4, 2014 17:07
Thema Regium
<!DOCTYPE html>
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono' rel='stylesheet' type='text/css'>
<style>
body {
padding: 9rem;
font-size: 4rem;
font-family: 'Ubuntu Mono', monospace;
line-height: 6rem;
@veeenu
veeenu / fragment.glsl
Last active August 29, 2015 14:13
Isosurface polygonization with chunked voxels
precision highp float;
varying vec3 fnormal, flight, fpos;
varying vec2 ftextureCoordinate;
varying vec3 fogv;
uniform sampler2D textureSampler;
void main(void) {
vec3 ldir = normalize(flight);
@veeenu
veeenu / avgvri-rvdi.js
Created February 9, 2015 19:53
Avgvri Rvdi - happy birthday demo card
c = document.createElement('canvas');
c.width=innerWidth;c.height=innerHeight;
document.body.appendChild(c);
d = c.getContext('2d');
d.font='64px\x20Times\x20New\x20Roman';
d.shadowColor='white'
d.shadowBlur=8;
p = []
setInterval(function() {
p.push([ Math.random()*innerWidth, Math.random()*innerHeight,
@veeenu
veeenu / index.html
Last active October 10, 2015 11:49
Particle System - I
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='style.css'/>
</head>
<body>
<script type='application/x-shader' id='vertex'>
attribute vec3 Position;
attribute float Size, Life;
@veeenu
veeenu / barrier.js
Created July 18, 2013 11:29
Simple barrier synchronization implementation.
var Barrier = function(obj) {
this._barrier = []; // Holds the elements to wait for
this._loaded = []; // Holds the elements which have been loaded
// Synchronization callback
this._sync = obj.sync || function() {};
// Set to true once no other elements are to be added.
// Prevents firing the sync callback before all elements
@veeenu
veeenu / config-3.11.6-x61s
Created October 26, 2013 12:02
Linux Kernel config file for my Thinkpad X61s
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.11.6 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
@veeenu
veeenu / briscola.cpp
Created October 29, 2013 11:02
Quant'ero giovane.
/*
Briscola.cpp - by X-3mE`89 - http://exxtreme.altervista.org
Released under GNU GPL terms
Codice per la console Windows preso da http://msdn.microsoft.com
Buon divertimento
Versione: 0.1