Markus Prinz cypher

View gist:5038241
1 2 3
CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl) --with-readline-dir=$(brew --prefix readline)" \
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" \
rbenv install 2.0.0-p0
View gist:2394473
1 2 3 4 5 6 7 8 9 10
import crypt
 
def find_line_in_file(filename, string_to_find):
with open(filename, 'r') as f:
for line in f:
if line.startswith(string_to_find):
yield line
 
def check(username, password):
for line in find_line_in_file('/srv/htpasswd', username+':'):
View crashreport.txt
1 2 3 4 5 6 7 8 9 10
Rubinius Crash Report #rbxcrashreport
 
Error: signal SIGSEGV
 
[[Backtrace]]
0 rbx 0x000000010bcadac6 _ZN8rubiniusL12segv_handlerEi + 486
1 libsystem_c.dylib 0x00007fff8e2dccfa _sigtramp + 26
2 rbx 0x000000010bec11f0 rbx_set_my_field + 0
3 rbx 0x000000010be87038 _ZN8rubinius7ImmixGC7collectERNS_6GCDataE + 564
4 rbx 0x000000010bcd6df2 _ZN8rubinius12ObjectMemory14collect_matureERNS_6GCDataE + 76
View rbenv-output.txt
1 2 3 4 5 6 7 8 9 10
+ '[' -z /Users/cypher/.rbenv ']'
+ RBENV_ROOT=/Users/cypher/.rbenv
+ export RBENV_ROOT
++ abs_dirname /Users/cypher/.rbenv/bin/rbenv
+++ pwd
++ local cwd=/Users/cypher/Development/Rubinius
++ local path=/Users/cypher/.rbenv/bin/rbenv
++ '[' -n /Users/cypher/.rbenv/bin/rbenv ']'
++ cd /Users/cypher/.rbenv/bin
++ local name=rbenv
View config.rb
1 2 3 4 5 6 7 8 9 10
module Rubinius
BUILD_CONFIG = {
:which_ruby => :ruby,
:build_ruby => "/Users/cypher/.rbenv/versions/1.9.2-p290/bin/ruby",
:build_rake => "rake",
:build_perl => "perl",
:llvm => :prebuilt,
:llvm_configure => "",
:cc => "gcc",
:cxx => "g++",
View crashreport.txt
1 2 3 4 5 6 7 8 9 10
Rubinius Crash Report #rbxcrashreport
 
[[Exception]]
A toplevel exception occurred
undefined local variable or method `this_does_not_exist' on an instance of Object. (NameError)
 
Backtrace:
Kernel(Object)#this_does_not_exist (method_missing) at kernel/delta
/kernel.rb:79
{ } in Object#__script__ at -e:1
View feed.xml
1 2 3 4 5 6 7 8 9 10
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
<title>The Nuclear Squid</title>
<link href="http://nuclearsquid.com/feed.xml" rel="self"/>
<link href="http://nuclearsquid.com/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
View my_awesome_middleware.rb
1 2 3 4 5 6 7 8 9
class MyAwesomeMiddleware
def initialize(app)
@app = app
end
 
def call(env)
return_value = @app.call(env)
 
do_awesome_post_request_processing
View gist:379346
1 2 3 4 5 6 7 8 9
eschaton :: ~/Projects » cat scratch.rb
# encoding: utf-8
 
str = "This is ä strïng with ümläuts in it"
regex = / (\p{Alpha}) /
 
puts __ENCODING__
puts str.encoding
puts regex.encoding
View gist:366281
1 2 3 4 5 6 7
my_handler = lambda do
# stuff
end
 
get '/foo', &my_handler
 
post '/bar', &my_handler
Something went wrong with that request. Please try again.