Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am cypher on github.
  • I am markuswein (https://keybase.io/markuswein) on keybase.
  • I have a public key ASAb_47B-PGjeAyx2PFmEjJ0cbAAmiDQec8uS8mYmv7TvQo

To claim this, I am signing this object:

@cypher
cypher / gist:5038241
Last active December 14, 2015 05:49
I got an error while trying out Rails 4 Beta 1 on Ruby 2.0 (running rbenv): `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) Solution via http://ikm.hatenablog.jp/entry/2013/02/13/031343: Make sure you have an up-to-date version of OpenSSL installed (at least 1.0.…
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
@cypher
cypher / gist:2394473
Created April 15, 2012 19:42 — forked from k0d/gist:2394453
htpasswd check
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+':'):
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
+ '[' -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
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++",
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
@cypher
cypher / feed.xml
Created April 26, 2011 11:24
Jekyll Atom Feed example
---
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>
class MyAwesomeMiddleware
def initialize(app)
@app = app
end
def call(env)
return_value = @app.call(env)
do_awesome_post_request_processing
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