Skip to content

Instantly share code, notes, and snippets.

@macek
macek / psx_bios.txt
Created January 5, 2012 05:50
SCPH bios
http://forums.xbox-scene.com/index.php?showtopic=54858
DTLH3000.BIN
12/04/95
America
DTLH3002.BIN
12/04/95
Europe
@macek
macek / hijack.php
Created December 7, 2011 23:10
Patchwork Sample
<pre>
<?php
class Loader {
static public function helper($class){
echo "including concrete5 {$class}\n";
}
}
class MyLoader {
@macek
macek / config.mk
Created October 18, 2011 21:13
configure irssi-xmpp
LDFLAGS += -flat_namespace -undefined warning -fPIC
@macek
macek / sql_sanitizer.php
Created April 15, 2011 05:11
POS410 SQL sanitizer example
<?php
class Mysql {
static public function query(){
$args = func_get_args();
return mysql_query(call_user_func_array(array("self", "queryf"), $args));
}
static public function queryf(){
@macek
macek / Gemfile
Created November 16, 2010 01:46
Quick Sinatra App on Heroku
source 'http://rubygems.org'
gem "sinatra"
@macek
macek / .htaccess
Created September 29, 2010 21:59
Redirect without www on Nginx and Engine Yard
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
@macek
macek / access_default_search.rb
Created September 24, 2010 20:52
Advanced Techniques for Searchlogic 2
# your custom search
@search = Product.search(params[:search])
# searchlogic default
@search = Product.searchlogic(params[:search])
#!/usr/bin/env ruby
require 'net/http'
require 'uri'
require 'json'
response = Net::HTTP.post_form(
URI.parse("http://closure-compiler.appspot.com/compile"),
{
:js_code => STDIN.read,
require "benchmark"
ITERATIONS = (ARGV[0] || 10000).to_i
def pick(set)
set[rand(set.size)]
end
def trial(method)
affiliate
+ referrals
| + referral
| | + player
| | | + rake
| | | + rake
| | + player
| | + rake
| + referral
| | + player