Skip to content

Instantly share code, notes, and snippets.

View sole's full-sized avatar
🌞
🌿🌱

sole sole

🌞
🌿🌱
View GitHub Profile
@sole
sole / php-cgi.rc.sh
Created September 24, 2012 19:30 — forked from zliang-min/php-cgi.rc.sh
php-cgi rc script for archlinux
#!/bin/bash
# vim: syntax=sh
. /etc/rc.conf
. /etc/rc.d/functions
daemon_name=php-cgi
BIND=/tmp/php-cgi.socket
USER=gimi
@sole
sole / unroll.fs
Created August 30, 2012 18:15
This is how I UNroll
float find_closest(int x, int y, float c0) {
/*
Original looping code, from http://devlog-martinsh.blogspot.com.es/2011/03/glsl-dithering.html
vec4 dither[4];
dither[0] = vec4( 1.0, 33.0, 9.0, 41.0);
dither[1] = vec4(49.0, 17.0, 57.0, 25.0);
dither[2] = vec4(13.0, 45.0, 5.0, 37.0);
dither[3] = vec4(61.0, 29.0, 53.0, 21.0);
@sole
sole / FirstPersonControls2.js
Created July 28, 2012 12:55
FirstPersonControls put on a diet ;-)
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
* @author paulirish / http://paulirish.com/
*/
THREE.FirstPersonControls2 = function ( object, domElement ) {
var latitude = 0,
longitude = 0,
phi = 0,
@sole
sole / munit_advanced.js
Created May 29, 2012 13:30
munit.js advanced example
var array;
var arrayTest = new MUNIT.Test([
function lengthZeroWhenEmpty() {
this.assertEquals(0, array.length);
},
function lengthNotZeroIfNotEmpty() {
array.push(1);
this.assertTrue(array.length != 0);
},
var Car = function() {
this.beep = function() {
return 'beep';
}
this.honk = function() {
return 'honk';
}
return this;
@sole
sole / imagemagick-slice.sh
Created March 7, 2012 14:52
Imagemagick slice
# http://broutilles.com/2011/04/22/imagemagick-how-to-slice-an-image-in-parts/
convert svg-cards.png -crop 179x260 +repage +adjoin cards_%02d.png
@sole
sole / xcodezombie.sh
Created February 22, 2012 10:29
XCode...
# http://stackoverflow.com/questions/788277/iphone-strange-error-when-testing-on-simulator
ps ax | grep Simulator
# list zombie processes
ps -el | grep "Z"
@sole
sole / cvt.py
Created January 24, 2012 09:15
Script to downsample images for book creation - original by Eric Jeschke. I'm adapting it to Python 3
#! /usr/bin/env python
#
"""
cvt.py -- script to downsample images for book creation
Comments, patches welcome:
Eric Jeschke (eric@redskiesatnight.com)
(c) 2009 Eric R. Jeschke (eric@redskieatnight.com).
This work is licensed under a Creative Commons Attribution-Share Alike
@sole
sole / jquery.tinycarousel.modified.js
Created January 23, 2012 15:52
tinycarousel.js with destroy function
/*!
* Tiny Carousel 1.9
* http://www.baijs.nl/tinycarousel
*
* Copyright 2010, Maarten Baijs
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/gpl-2.0.php
*
* Date: 01 / 06 / 2011
@sole
sole / compile_ffmpeg.sh
Created January 18, 2012 08:57
Get an updated, 64-bit FFMPEG in your Mac Os X Lion computer
#!/bin/bash
# Thanks to Martin Los for his guide: http://www.martinlos.com/?p=41
URLS=("http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.3.tar.gz" "http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz" "http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz")
for i in "${URLS[@]}"
do
echo $i
curl -O -L $i