Skip to content

Instantly share code, notes, and snippets.

View louim's full-sized avatar

Louis-Michel Couture louim

  • Quebec
  • 04:14 (UTC -04:00)
  • X @louim
View GitHub Profile
@louim
louim / nametohash.rb
Created February 23, 2013 17:04
#take a string and split it in hash, based on letter frequency
#take a string and split it in hash, based on letter frequency
class NameToHash
def initialize(name = "Louis-Michel")
@name = name.downcase
name_convert
end
def name_convert
hash = Hash.new
@name.each_char do |lettre|
@louim
louim / reg_replace.json
Created April 22, 2013 19:05
Add space around brackets and square brackets using SublimeText RegReplace
{
"replacements": {
"add_space_around_opening_brackets": {
"find": "\\((?! |\\)|\\n)",
"replace": "( ",
"greedy_scope": true,
"scope_filter": ["source.js,source.php","-comment", "-string.regexp", "-string.quoted.single.php", "-string.quoted.double.php"]
},
"add_space_around_closing_brackets": {
"find": "(?<! |\\(|\\t)\\)",
@louim
louim / keybase.md
Last active February 5, 2016 14:54

Keybase proof

I hereby claim:

  • I am louim on github.
  • I am louim (https://keybase.io/louim) on keybase.
  • I have a public key whose fingerprint is 94AC 8D58 9C1E F159 8936 1971 289E 3E82 121D 32B7

To claim this, I am signing this object:

@louim
louim / uploads.yml
Last active December 23, 2022 14:20
Drop-in playbook for Trellis to push and pull uploads from the server to your local machine.
---
- name: Sync uploads between environments
hosts: web
remote_user: "{{ web_user }}"
vars:
project: "{{ wordpress_sites[site] }}"
project_root: "{{ www_root }}/{{ site }}"
tasks:
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});