Skip to content

Instantly share code, notes, and snippets.

View toch's full-sized avatar
🐱

Christophe Philemotte toch

🐱
View GitHub Profile
@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 / speaker.md
Last active August 29, 2015 13:56 — forked from matiaskorhonen/speaker.md
@toch
toch / resprite.rake
Created May 3, 2013 08:55
A Rake task to generate CSS Sprites for Bootstrap-like icons
require 'sprite_factory'
namespace :assets do
desc 'recreate sprite images and css'
task :resprite => :environment do
Dir.glob('app/assets/images/icons/*.svg').each do |svg_file|
%x(convert -antialias -background transparent #{svg_file} -resize 15x14 #{File.dirname svg_file}/#{File.basename(svg_file).gsub(/\.svg\z/, ".png")} )
end
SpriteFactory.cssurl = "image-url('$IMAGE')"
@toch
toch / ArrayEqualTest
Last active December 14, 2015 02:09 — forked from vanakenm/ArrayEqualTest
Because - use eql? operator and include use == operator, you should take care of what you can obtain with a - (that use key hash to make the search) and include (that use object comparator to test)
require 'minitest/autorun'
require 'minitest/spec'
class ElementTest
attr_accessor :value
def eql?(other)
value == other.value
end
@toch
toch / .uxterm_settings
Created July 31, 2012 10:28
My uxterm config with clickable url
UXTerm*background: black
UXTerm*foreground: white
UXTerm*cursorColor: grey
UXTerm*faceName: Liberation Mono
UXTerm*faceSize: 11
UXTerm*VT100*translations: #override Shift <Btn1Up>: exec-formatted("firefox '%t'", PRIMARY)
UXTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
@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"]
} }
]