Skip to content

Instantly share code, notes, and snippets.

View taxilian's full-sized avatar

Richard Bateman taxilian

View GitHub Profile
@taxilian
taxilian / gist:1119641
Created August 2, 2011 05:26
FBTestPlugin size breakdown
Functions by size (kilobytes):
18.14: AxIdMapInit::AxIdMapInit axutil.obj
5.62: memcmp memcmp.obj
5.14: unaligned_memcmp memcmp.obj
4.68: _woutput_p_l woutputp.obj
4.68: _output_p_l outputp.obj
4.52: std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>::_Getffld FBTestPluginAPI.obj
4.47: FBTestPluginAPI::FBTestPluginAPI FBTestPluginAPI.obj
3.86: std::num_get<char,std::istreambuf_iterator<char,std::char_traits<char>>>::_Getffld FBTestPluginAPI.obj
2.95: _output_s_l outputs.obj
@taxilian
taxilian / gist:1123444
Created August 3, 2011 18:39
size output
Functions by size (kilobytes):
28.28: @ILT+28950(??$?0V?$FunctorCallImpl@V?$bind_t@XV?$mf4@XVPhotoUploaderPlugin@@_NABV?$multimap@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@ABV?$shared_array@E@boost@@I@_mfi@boost@@V?$list5@V?$value@PAVPhotoUploaderPlugin@@@_bi@boost@@V?$value@_N@23@V?$value@V?$multimap@V?$basic_string@DU?$char_trait... 21.12: _Curl_pop3_write pop3.obj
18.14: AxIdMapInit::AxIdMapInit axutil.obj
9.76: _Curl_ossl_close_all ssluse.obj
9.12: _ENGINE_get_cipher tb_cipher.obj
9.07: _Curl_ftpsendf ftp.obj
7.87: _ENGINE_ctrl_cmd_string eng_ctrl.obj
7.75: _Curl_setopt
@taxilian
taxilian / gist:1125843
Created August 4, 2011 18:26
FBTestPlugin optimized build size analysis
Functions by size (kilobytes):
16.86: AxIdMapInit::AxIdMapInit axutil.obj
5.62: memcmp memcmp.obj
4.43: FBTestPluginAPI::FBTestPluginAPI FBTestPluginAPI.obj
4.42: std::num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>::_Getffld FBTestPluginAPI.obj
2.95: _output_s_l outputs.obj
2.95: std::num_get<char,std::istreambuf_iterator<char,std::char_traits<char>>>::_Getffld FBTestPluginAPI.obj
2.90: UnDecorator::composeDeclaration undname.obj
2.89: _output_l output.obj
2.74: _woutput_s_l woutputs.obj
@taxilian
taxilian / fb_atlassian
Created August 10, 2011 17:51
FireBreath atlassian config
server {
listen 208.73.49.195:80;
listen [2001:1938:1aa::1]:80;
server_name www.firebreath.org;
location /googlea397163c37cd3fba.html {
root /home/richard/sites/firebreath/;
}
location /google316f67fc8ad7cb11.html {
root /home/richard/sites/firebreath/;
@taxilian
taxilian / example.js
Created August 25, 2011 19:59
Example of using a generic handler with anonymous functions
// Don't do this on something real! It'll leak!
function myHandler(obj, param1, param2)
{
alert("Some object " + obj + " fired an event with " + param1 + " and " + param2;
}
function pluginOnLoad(plugin)
{
plugin.addEventListener("coolevent", function(p1, p2) { myHandler(plugin, p1, p2); });
@taxilian
taxilian / backbone-multihash.js
Created September 16, 2011 23:51
Backbone.js attach multiple hash routers
define(["require", "./underscore", "./backbone"], function(require, _, Backbone) {
// Backbone.js doesn't quite do what we want it to, but it almost does;
// we can modify it so that it does do what we want pretty easily, thanks
// to the eminent hackability of javascript.
//
// We may need to update this when backbone.js updates! :-/
var patched_methods = {
// Save and rename the old route function, modified to work with the new
override_route : function(route, callback) {
@taxilian
taxilian / M4-CT512M4SSD2.txt
Created October 14, 2011 16:05
Drive Type
Disk Test 435.91
Sequential 262.92
Uncached Write 401.06 246.24 MB/sec [4K blocks]
Uncached Write 370.53 209.65 MB/sec [256K blocks]
Uncached Read 119.32 34.92 MB/sec [4K blocks]
Uncached Read 609.51 306.33 MB/sec [256K blocks]
Random 1274.49
Uncached Write 2082.73 220.48 MB/sec [4K blocks]
Uncached Write 713.97 228.57 MB/sec [256K blocks]
Uncached Read 2054.14 14.56 MB/sec [4K blocks]
@taxilian
taxilian / Factory.cpp
Created October 15, 2011 04:14
Example of adding a file-based logging method
#include <boost/filesystem.hpp>
#include "SystemHelpers.h"
using namespace boost::filesystem;
/// ...
void getLoggingMethods( FB::Log::LogMethodList& outMethods )
{
path appDataPath = FB::System::getLocalAppDataPath("CompanyName");
@taxilian
taxilian / errlog.txt
Created October 17, 2011 16:49
error log
Traceback (most recent call last):
File "doxygen/doc2confluence.py", line 248, in <module>
Main()
File "doxygen/doc2confluence.py", line 245, in Main
a.begin()
File "doxygen/doc2confluence.py", line 236, in begin
self.makeFirstPageInConfluence(pageId, membersPageId)
File "doxygen/doc2confluence.py", line 70, in makeFirstPageInConfluence
children = self.rpc.getChildren(self.token, pageId)
File "/usr/local/lib/python2.6/dist-packages/SOAPpy/Client.py", line 540, in __call__
@taxilian
taxilian / post-receive
Created October 26, 2011 19:41
python post-receive hook for irccat
#!/usr/bin/env python
""" Git post-receive hook to publish commit info to an irccat receiver
apt-get install python-git
or:
easy_install gitpython
"""
import os, sys, json
from datetime import datetime
from git import *