Skip to content

Instantly share code, notes, and snippets.

@xrl
xrl / test.log
Created May 13, 2011 03:55
Citrus/RBX failure
one:citrus xavierlange$ rake test
(in /Users/xavierlange/code/citrus)
An exception occurred running /Users/xavierlange/.rvm/gems/rbx-head/gems/rake-0.8.7/lib/rake/rake_test_loader.rb
/Users/xavierlange/code/citrus/lib/citrus/grammars/calc.citrus: Malformed Citrus syntax on line 10 at offset 13
additive | factor
^ (Citrus::SyntaxError)
Backtrace:
Citrus::File.parse at lib/citrus/file.rb:344
@xrl
xrl / lua.kpeg
Created May 14, 2011 08:08
First attempt at lua grammar...
%% name = Lupin::Parser
chunk = (stat ";"?)* (laststat ";"?)?
block = chunk
stat = varlist "=" explist |
functioncall |
"do" block "end" |
"while" exp "do" block "end" |
exp = functioncall | prefixexp | function | tableconstructor | exp binop exp | unop exp | "nil" | "false" | "true" | number | string | "..."
@xrl
xrl / rubinius_profiler_show
Created July 3, 2011 06:19
Profiling merb's boot
Total running time: 0.000362175s
% cumulative self self total
time seconds seconds calls ms/call ms/call name
------------------------------------------------------------
96.44 0.00 0.00 1 0.08 0.08 Object::__script__<28> {}
3.56 0.00 0.00 1 0.00 0.00 Class#allocate
2 methods called a total of 2 times
Total running time: 0.000362175s
@xrl
xrl / so_slow.txt
Created July 3, 2011 07:44
Merb app startup
tureus_production@Crawler:~/app$ RBXOPT=-Xprofile bundle exec rackup config.ru --env production
NOTE: Gem.cache is deprecated, use Gem::source_index. It will be removed on or after 2011-08-01.
Gem.cache called from /home/tureus_production/app/gems/rbx/1.8/gems/templater-1.0.0/lib/templater/discovery.rb:62.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/local/rvm/rubies/rbx-head/lib/rubygems.rb:1128.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /home/tureus_production/app/gems/rbx/1.8/gems/templater-1.0.0/lib/templater/discovery.rb:62.
Loading init file from ./config/init.rb
Loading ./config/environments/production.rb
Logging to file at ./log/production.log
tureus_production@Crawler:~/app$ RBXOPT="-Xprofile -Xprofiler.graph" bundle exec rackup config.ru --env production
NOTE: Gem.cache is deprecated, use Gem::source_index. It will be removed on or after 2011-08-01.
Gem.cache called from /home/tureus_production/app/gems/rbx/1.8/gems/templater-1.0.0/lib/templater/discovery.rb:62.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/local/rvm/rubies/rbx-head/lib/rubygems.rb:1128.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /home/tureus_production/app/gems/rbx/1.8/gems/templater-1.0.0/lib/templater/discovery.rb:62.
Loading init file from ./config/init.rb
Loading ./config/environments/production.rb
Logging to file at ./log/production.log
@xrl
xrl / output.log
Created August 9, 2011 02:43
merb-core/active_support false positives expanded
Finished in 52.6 seconds
1343 examples, 113 failures, 5 pending
Failed examples:
rspec ./spec/test/multipart_request_helper_spec.rb:51 # Merb::Test::MultipartRequestHelper#multipart_post should post to the create action
rspec ./spec/test/multipart_request_helper_spec.rb:56 # Merb::Test::MultipartRequestHelper#multipart_post should post to the create action with params
rspec ./spec/test/multipart_request_helper_spec.rb:62 # Merb::Test::MultipartRequestHelper#multipart_post should upload a file to the action using multipart
rspec ./spec/test/multipart_request_helper_spec.rb:83 # Merb::Test::MultipartRequestHelper#multipart_put should put to the update action multipart
rspec ./spec/test/multipart_request_helper_spec.rb:88 # Merb::Test::MultipartRequestHelper#multipart_put should put to the update action with multipart params
@xrl
xrl / current_utc_time.c
Created August 17, 2011 00:02 — forked from jbenet/current_utc_time.c
work around lack of clock_gettime in os x
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@xrl
xrl / rake.log
Created October 17, 2011 01:58
RVM rbx build error
one:~ xavierlange$ cat rake.log
[2011-10-16 18:49:53] /Users/xavierlange/.rvm/wrappers/ruby-1.8.7-p352/rake install
/Users/xavierlange/.rvm/rubies/ruby-1.8.7-p352/bin/ruby vm/codegen/config_vars.rb vm/gen/config_variables.h
GEN vm/gen/config_variables.h
/Users/xavierlange/.rvm/rubies/ruby-1.8.7-p352/bin/ruby vm/codegen/encoding_extract.rb /Users/xavierlange/.rvm/src/vendor/onig vm/gen/encoding_database.cpp
/Users/xavierlange/.rvm/rubies/ruby-1.8.7-p352/bin/ruby vm/codegen/field_extract.rb vm/builtin/basicobject.hpp vm/builtin/object.hpp vm/builtin/integer.hpp vm/builtin/fixnum.hpp vm/builtin/array.hpp vm/builtin/bignum.hpp vm/builtin/executable.hpp vm/builtin/access_variable.hpp vm/builtin/alias.hpp vm/builtin/block_environment.hpp vm/builtin/block_as_method.hpp vm/builtin/bytearray.hpp vm/builtin/chararray.hpp vm/builtin/io.hpp vm/builtin/channel.hpp vm/builtin/module.hpp vm/builtin/class.hpp vm/builtin/compiledmethod.hpp vm/builtin/data.hpp vm/builtin/dir.hpp vm/builtin/exception.hpp vm/builtin/float.hpp v
@xrl
xrl / config.log
Created March 6, 2012 07:50
Suricata Build Config
Suricata Configuration:
AF_PACKET support: no
PF_RING support: no
NFQueue support: no
IPFW support: no
DAG enabled: no
Napatech enabled: no
Prelude support: no
PCRE jit: yes