Skip to content

Instantly share code, notes, and snippets.

ld: warning: in /usr/lib/haxe/lib/nme/1,0,2/ndll/iPhone/libNME.iphoneos.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Users/alec/Documents/haxe/static-sdl/sdl-static-read-only/libfreetype.iphoneos.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Users/alec/Documents/haxe/static-sdl/sdl-static-read-only/libjpeg.iphoneos.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Users/alec/Documents/haxe/static-sdl/sdl-static-read-only/libogg.iphoneos.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Users/alec/Documents/haxe/static-sdl/sdl-static-read-only/libpng.iphoneos.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Users/alec/Documents/haxe/static-sdl/sdl-static-read-only/libSDL.iphoneos.a, file was
function calcMostCommonDiff($orig, $files) {
$mismatches = array();
$inRow = 0;
$firstLength = strlen(reset($orig));
$firstFile = reset($orig);
foreach($files as $file) {
$inRow = 0;
for($i = 0; $i < $firstLength; $i++) {
<pre><?php
function array_insert($array,$pos,$val) {
$array2 = array_splice($array,$pos);
$array[] = $val;
$array = array_merge($array,$array2);
return $array;
}
function num_exchange ($int) {
$arr = array('W','x','J','y','5','v','l','0','R','M');
return $arr[$int];
}
function num_rev_exchange ($let) {
$arr = array('W','x','J','y','5','v','l','0','R','M');
return array_search($let, $arr);
}
function rand_char_for_n ($n) {
while($c <= $n) {
function range ( low, high, step ) {
// http://kevin.vanzonneveld.net
// + original by: Waldo Malqui Silva
// * example 1: range ( 0, 12 );
// * returns 1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
// * example 2: range( 0, 100, 10 );
// * returns 2: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
// * example 3: range( 'a', 'i' );
// * returns 3: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
// * example 4: range( 'c', 'a' );
@alecgorge
alecgorge / Attribute Class.php
Created November 17, 2010 03:25
How I think attributes should go down.
<?php
class WebService extends Attribute {
public $baseURI = "";
public $name = "";
public $desc = "";
public function __construct ($baseURI, $name, $desc) {
$this->baseURI = $baseURI;
$this->name = $name;
@alecgorge
alecgorge / fb phonenumbers.js
Created December 4, 2010 19:33
Gets the phone numbers of your Facebook friends and gives CSV and JSON output.
/**
* Run this script in the console on http://www.facebook.com/friends/edit/?sk=phonebook
*/
(function () {
function getScript(url, success) {
var script = document.createElement('script');
script.src = url;
var head = document.getElementsByTagName('head')[0],
done = false;
script.onload = script.onreadystatechange = function () {
2011-02-27 13:58:48 [INFO] alecgorge [/127.0.0.1:57726] logged in with entity id
249
java.lang.NoSuchMethodError: OPlayerManager.a(LOPlayerManager;)Lnet/minecraft/se
rver/MinecraftServer;
at OPlayerInstance.<init>(SourceFile:31)
at OPlayerManager.a(OPlayerManager.java:29)
at OPlayerManager.a(OPlayerManager.java:56)
at OServerConfigurationManager.a(OServerConfigurationManager.java:78)
at ONetLoginHandler.b(SourceFile:114)
at ONetLoginHandler.a(SourceFile:37)
@alecgorge
alecgorge / java-properties.php
Created May 18, 2011 00:29
Parse Java properties files in PHP
<?php
function parse_properties($txtProperties) {
$result = array();
$lines = split("\n", $txtProperties);
$key = "";
$isWaitingOtherLine = false;
foreach ($lines as $i => $line) {
if (empty($line) || (!$isWaitingOtherLine && strpos($line, "#") === 0))
continue;
{
"as_of": "Wed, 18 May 2011 22:35:04 +0000",
"trends": [{
"url": "http:\/\/search.twitter.com\/search?q=%23itshardwhen",
"name": "#itshardwhen"
}, {
"url": "http:\/\/search.twitter.com\/search?q=%23myfavoriteartist",
"name": "#myfavoriteartist"
}, {
"url": "http:\/\/search.twitter.com\/search?q=%23thatstheone",