Skip to content

Instantly share code, notes, and snippets.

#
# :class => points to name of model used.
#
FactoryGirl.define do
# User groups
factory :role_group, :class => :RoleGroup do
name 'client'
end
@haad
haad / gist:1689116
Created January 27, 2012 14:46
proxychains mac os x patch
diff -ruN proxychains-3.1/proxychains/Makefile.in proxychains-3.1_resolv/proxychains/Makefile.in
--- proxychains-3.1/proxychains/Makefile.in 2006-03-15 10:16:59.000000000 -0600
+++ proxychains-3.1_resolv/proxychains/Makefile.in 2011-06-16 13:17:20.000000000 -0500
@@ -121,7 +121,7 @@
LIBS = @LIBS@
libproxychains_la_DEPENDENCIES =
libproxychains_la_OBJECTS = libproxychains.lo core.lo
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -arch x86_64 -arch i386
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@haad
haad / gist:1696065
Created January 28, 2012 22:47
proxychains4 homebrew formula
diff --git a/Library/Formula/proxychains.rb b/Library/Formula/proxychains.rb
new file mode 100644
index 0000000..589bafa
--- /dev/null
+++ b/Library/Formula/proxychains.rb
@@ -0,0 +1,17 @@
+require 'formula'
+
+class Proxychains < Formula
+ url 'https://github.com/haad/proxychains/zipball/proxychains-4.0.1'
[haad@lynx BG2]$ ../../Applications/GemRB.app/Contents/MacOS/GemRB -h
GemRB Core Version v0.7.0-git Loading...
[Core]: Initializing the Event Manager...[Core]: Initializing Lists Dictionary...[Core]: Initializing Variables Dictionary...[OK]
[Config]: Trying to open GemRB.cfg [NOT FOUND]
[Config]: Trying to open /Users/haad/.GemRB/GemRB.cfg [OK]
[Core]: Starting Plugin Manager...
[PluginMgr]: Loading Plugins from GemRB.app/Contents/Plugins/
[PluginMgr]: Loading Plugins from /Users/haad/Library/Application Support/GemRB/plugins/
[PluginMgr]: Loading: /Users/haad/Library/Application Support/GemRB/plugins/OGGReader.so...[ERROR]
Cannot Load Module, Skipping...
[haad@ build]$ gemrb/gemrb.app/Contents/MacOS/gemrb -c ../../../../.GemRB/GemRB.cfg
GemRB Core Version v0.7.0 Loading...
[Core]: Initializing the Event Manager...[Core]: Initializing Lists Dictionary...[Core]: Initializing Variables Dictionary...[OK]
[Config]: Trying to open ../../../../.GemRB/GemRB.cfg [OK]
[Core]: Starting Plugin Manager...
[PluginMgr]: Loading Plugins from /Users/haad/Library/Application Support/GemRB/plugins/
[PluginMgr]: Loading: /Users/haad/Library/Application Support/GemRB/plugins/2DAImporter.so... 2DA File Importer...[OK]
[PluginMgr]: Loading: /Users/haad/Library/Application Support/GemRB/plugins/ACMReader.so... ACM File Importer...[OK]
[PluginMgr]: Loading: /Users/haad/Library/Application Support/GemRB/plugins/AREImporter.so... ARE File Importer...[OK]
[PluginMgr]: Loading: /Users/haad/Library/Application Support/GemRB/plugins/BAMImporter.so... BAM File Importer...[OK]
@haad
haad / Log-1
Created February 19, 2012 00:50
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: GemRB Core Version v0.7.0-git Loading...
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Core]: Initializing the Event Manager...[Core]: Initializing Lists Dictionary...[Core]: Initializing Variables Dictionary...[OK]
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Config]: Trying to open GemRB.cfg [NOT FOUND]
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Config]: Trying to open /Users/haad/.GemRB/GemRB.cfg [OK]
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Core]: Starting Plugin Manager...
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [PluginMgr]: Loading Plugins from GemRB.app/Contents/Plugins/
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [PluginMgr]: Loading: GemRB.app/Contents/Plugins/2DAImporter.so... 2DA File Importer...[OK]
2/19 Sunday/12 2:06:35.735 AM [0x0-0x2a9ba99].net.sourceforge.gemrb: [Plugi
[haad@ BG2]$ cat ../../.GemRB/GemRB.cfg | grep -v '#' | uniq
GameType=bg2
GameName=Baldur's Gate 2
Width=1024
Height=768
@haad
haad / gist:2427733
Created April 20, 2012 10:43
mogilefs + memcached
# mogadm settings list
memcache_servers = 127.0.0.1:11211
# memcached-tool localhost:11211 stats
#localhost:11211 Field Value
accepting_conns 1
auth_cmds 0
auth_errors 0
bytes 0
bytes_read 303
location = /memc {
internal;
memc_connect_timeout 100ms;
memc_send_timeout 100ms;
memc_read_timeout 100ms;
set $memc_key $query_string;
set $memc_exptime 300;
memc_pass memcached_servers;
# ab -t 30 -c 200 http://192.168.200.64/share/public/110/RE0000003/ads/133/RE0000003-11-000017/img/8011263.jpeg
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.200.64 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Finished 19951 requests