Skip to content

Instantly share code, notes, and snippets.

View rrrene's full-sized avatar
👶
Chasing a toddler. I may be slow to respond.

René Föhring rrrene

👶
Chasing a toddler. I may be slow to respond.
View GitHub Profile
@rrrene
rrrene / all_models.rb
Created July 10, 2010 23:16
All Models in rails (that are already loaded)
# All Models in rails (that are already loaded)
Object.constants.map { |c|
c.constantize
}.select { |klass|
klass.is_a?(Class) && klass < ActiveRecord::Base
}
@rrrene
rrrene / my_console.rb
Created July 11, 2010 08:22
custom IRB console
#!/usr/bin/env ruby -wKU
# ... do some awesome stuff (requires, variable initialization, etc.)
require 'irb'
require 'irb/completion'
IRB.start
@rrrene
rrrene / simplify_string.rb
Created July 19, 2010 21:17
Replace european accents and umlauts with their simple counterparts
# Replace european accents and umlauts with their simple counterparts
# ä -> a, ç -> c, etc.
class String
def simplify
gsub(/[àáâãäåæ]/i, 'a').
gsub(/[ç]/i, 'c').
gsub(/[èéêë]/i, 'e').
gsub(/[ìíîï]/i, 'i').
gsub(/[ñ]/i, 'n').
@rrrene
rrrene / ecc.rb
Created May 15, 2013 10:50 — forked from bkerley/ecc.rb
# derived from http://h2np.net/tips/wiki/index.php?RubyOpenSSLDigitalSignatureSample
require 'openssl'
require 'base64'
include OpenSSL
group_name = 'secp521r1'
message = '10000 fartbux sent to bryce from a can of beans'
key = PKey::EC.new(group_name)
key = key.generate_key
@rrrene
rrrene / Tex ERb key binding
Last active December 23, 2015 12:49
Key-Binding for erbify sublime snippet
{"keys": ["ctrl+shift+c"], "command": "insert_snippet","args": {"contents": "<%= ${1} \"$SELECTION\" %>"}}
@rrrene
rrrene / buttons.css
Created June 23, 2015 12:04
Button style suggestion for Alchemist project page
a.button {
color: #FFFFFF;
/* font: bold 12px Helvetica, Arial, sans-serif; */
text-decoration: none;
padding: 7px 12px;
position: relative;
display: inline-block;
/* text-shadow: 0 1px 0 #fff; */
-webkit-transition: border-color .218s;
-moz-transition: border .218s;
TITLE:
Coinbase-Elixir released
TEXT:
I recently released my mostly complete Coinbase API for Elixir.
Check it out: https://github.com/gregpardo/coinbase-elixir

Try to blog once a week, describing 1 package that is clearly missing on Hex.

You create a complementary project on GitHub called something like "missing-hex-packages". There you create 1 issue per blog post.

You can ask people to participate in a discussion on the issue and eventually link their implementation of the described package in the issue's comments.

Use the mailing list and/or sites like elixirstatus.com to raise awareness for your blog post series and increase participation.

Few weeks back I was reading a blog about concurrency limitations in Ruby (which we all are aware since long) and how Elixir is evolving. Thus I was extremely curious to know this new dynamic functional programming language "Elixir", the two decades old Erlang language & Erlang Virtual Machine (VM) known for running low-latency, distributed and fault-tolerant systems.

This blog post is a result of my curiosity about Elixir and Erlang.

{
"args": [],
"branch_name": "master",
"client_name": "inchjs",
"client_version": "0.4.0",
"git_repo_url": "https://github.com/foreverjs/forever.git",
"language": "javascript",
"objects": [
{
"comment": "//\n// ### @private function (file, options, callback)\n// #### @file {string} Target script to start\n// #### @options {Object} Options to start the script with\n// #### @callback {function} Continuation to respond to when complete.\n// Helper function that sets up the pathing for the specified `file`\n// then stats the appropriate files and responds.\n//",