This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Development/git 32deca7 [±] λ git lock | |
usage: git lock <file> | |
--------------------------------------------------------------- | |
|Owner |Locked file | | |
--------------------------------------------------------------- | |
|franckverrot |foo | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# More details about the 23 value | |
# https://github.com/ruby/ruby/blob/e279eca4bdf1e4364308aee2ca504bbdf2b5d221/include/ruby/ruby.h#L824-836 | |
# | |
require 'benchmark' | |
N = 1_000_000 | |
Benchmark.bmbm do |bm| | |
bm.report("s_23chr +=") { N.times { s_23chr = "xxxxxxxxxxxxxxxxxxxxxx"; s_23chr += "x" } } | |
bm.report("s_23chr <<") { N.times { s_23chr = "xxxxxxxxxxxxxxxxxxxxxx"; s_23chr << "x" } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/private/tmp/hiredis-rb 691a320 [±] λ rake compile && RUBYLIB=lib ruby -rhiredis test.rb | |
cd tmp/x86_64-darwin13.0/hiredis_ext/2.1.0 | |
make | |
compiling ../../../../ext/hiredis_ext/connection.c | |
linking shared-object hiredis/ext/hiredis_ext.bundle | |
cd - | |
install -c tmp/x86_64-darwin13.0/hiredis_ext/2.1.0/hiredis_ext.bundle lib/hiredis/ext/hiredis_ext.bundle | |
[connection_is_connected is called] | |
true | |
nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InviteController < ApplicationController | |
# The controller's responsibility is to build an object graph | |
# that will do the hard work. | |
def accept | |
response = InvitationResponse.new(self) | |
scenario = InvitationScenario.new(response) | |
scenario.accept_invite_token_for_user(current_user, params[:token]) | |
# The alternative is to implement both |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module elmira | |
import java.util.HashMap | |
import java.util.Arrays | |
import java.util.LinkedList | |
function test = -> DynamicObject() | |
function Elmira = -> DynamicObject(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: test | |
test: | |
ruby "test/unittest.rb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
franck@zeu ~ % HOME=.ssh/heroku-franck heroku apps | |
=== My Apps | |
... | |
=== Collaborated Apps | |
[redacted] | |
franck@zeu ~ % HOME=.ssh/heroku-evome heroku apps | |
You have no apps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem "paymill" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Paste the line below in your URL address bar to disable emojis | |
// This line only works on new Issues. | |
javascript:;jQuery('#issue_body').replaceWith($('<div name="issue[body]"/>').html('')); jQuery('[name="issue[body]"]').replaceWith($('<textarea name="issue[body]"/>').html('')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "./tinyparse" | |
parser = Tinyparse.build do | |
paren "(", :main, ")", :main | |
main [:paren, ""] | |
end | |
["((()))", "(((", "()()((()()))", "))(("].each do |str| | |
puts str |