Skip to content

Instantly share code, notes, and snippets.

View toch's full-sized avatar
🐱

Christophe Philemotte toch

🐱
View GitHub Profile
@toch
toch / speaker.md
Last active August 29, 2015 13:56 — forked from matiaskorhonen/speaker.md
@toch
toch / operators.md
Created March 14, 2014 08:07
Ruby Punctuations or a list of names of operators and other cabalistic punctuation
Operator Name
=> hashrocket
<=> spaceship
=== threequals
~> twiddlewalka
-> stabby lambda
@ spiral
* splat
~ tidle
@toch
toch / howto-yosemite-osx-linux-notes.md
Last active August 29, 2015 14:19
Yosemite OSX on Linux notes
  • download page

  • installation notes

  • disable EFI

  • run VBoxManage modifyvm "OSX Yosemite" --cpuidset 00000001 000306a9 00020800 80000201 178bfbff

  • follow the following because stuck on 2 minutes left

1. Close the VMachine when stuck on 2 minutes left (Power off)
2. Start it again, select newly created
@toch
toch / index.html
Created May 31, 2015 09:28
Personal Orval homepage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Some Orval <3</title>
</head>
<body>
<pre style="font: 10px/5px monospace;"> `,.`
`,``````` .;`
```````;`'`````,.
@toch
toch / gist:951e2b061ea62d19b33e
Created June 3, 2015 10:04
nested resource and dynamic load
<p id="notice"><%= notice %></p>
<p>
<b>Name:</b>
<%= @post.name %>
</p>
<p>
<b>Title:</b>
<%= @post.title %>
@toch
toch / Gemfile
Created August 20, 2015 08:58
Benchmarking Ruby's `method_missing` vs `define_method`
source "https://rubygems.org"
gem "benchmark-lab"
@toch
toch / trace_calls.rb
Last active September 8, 2015 14:50
Decorate any method in Ruby to get its call stack
def trace_calls_on
scope = {}
trace = TracePoint.new(:call, :line) do |tp|
case tp.event
when :call then puts "#{tp.path}:#{tp.lineno} #{tp.defined_class}::#{tp.method_id} " \
"called from #{scope[:path]}:#{scope[:lineno]} #{scope[:class]}::#{scope[:method_id]}"
when :line then scope = {
event: :line,
lineno: tp.lineno,
path: tp.path,
@toch
toch / gist:d1f83893af024c94581e
Created July 16, 2015 16:39
keybase verfication
### Keybase proof
I hereby claim:
* I am toch on github.
* I am toch (https://keybase.io/toch) on keybase.
* I have a public key whose fingerprint is 85EF 645A 76A2 4150 55D5 109A AAE6 0C3E E979 07D7
To claim this, I am signing this object:
@toch
toch / Pancake.md
Created September 28, 2015 08:27
Pancake Recipe

Pancakes (about 8)

Ingredient

  • 200g Philadelphia light Cream Cheese
  • 1 egg
  • 230ml semi-skimmed milk
  • 200g flour
  • 8g bakery yeast
  • 1/2 tea spoon salt
@toch
toch / gist:3205754
Created July 30, 2012 09:07
keybinding to run uxterm from Sublime Text 2 on Linux with Shell Turtlestein package
https://github.com/misfo/Shell-Turtlestein
add the following in your User keybinding setup file: ~/.config/sublime-text-2/Pacakges/User/Default (Linux).sublime-keymap
[
{"keys": ["shift+ctrl+alt+c"], "command": "subprocess_in_cwd", "args": {
"cmd": ["uxterm", "/bin/bash"]
} }
]