Skip to content

Instantly share code, notes, and snippets.

View psx_bios.txt
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 Dec 7, 2011
Patchwork Sample
View hijack.php
<pre>
<?php
class Loader {
static public function helper($class){
echo "including concrete5 {$class}\n";
}
}
class MyLoader {
@macek
macek / config.mk
Created Oct 18, 2011
configure irssi-xmpp
View config.mk
LDFLAGS += -flat_namespace -undefined warning -fPIC
@macek
macek / sql_sanitizer.php
Created Apr 15, 2011
POS410 SQL sanitizer example
View sql_sanitizer.php
<?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 Nov 16, 2010
Quick Sinatra App on Heroku
View Gemfile
source 'http://rubygems.org'
gem "sinatra"
@macek
macek / .htaccess
Created Sep 29, 2010
Redirect without www on Nginx and Engine Yard
View .htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
@macek
macek / access_default_search.rb
Created Sep 24, 2010
Advanced Techniques for Searchlogic 2
View access_default_search.rb
# your custom search
@search = Product.search(params[:search])
# searchlogic default
@search = Product.searchlogic(params[:search])
View Compile.tmCommand
#!/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,
View monty_hall.rb
require "benchmark"
ITERATIONS = (ARGV[0] || 10000).to_i
def pick(set)
set[rand(set.size)]
end
def trial(method)
View affiliate_tree.txt
affiliate
+ referrals
| + referral
| | + player
| | | + rake
| | | + rake
| | + player
| | + rake
| + referral
| | + player
You can’t perform that action at this time.