Skip to content

Instantly share code, notes, and snippets.

@simonc
simonc / tinci-css-guidelines.md
Last active August 9, 2017 11:46
Tinci CSS Guide

Tinci CSS Guide

This guide is for Tinci developers and any Tinci collaborator that will write CSS that Tinci has to later maintain.

This is a work in progress and may change in the future but for now we're happy with this.

  1. Tools
  2. Files Organization
  3. Bootstrap Override
  4. Colors
@simonc
simonc / Grooveshark Backup.md
Last active March 27, 2019 14:25
Go to grooveshark and type this in the development console (Thank you audiosplitter.fm !!)

Backup for Grooveshark Collection

This works even with Grooveshark dead!

The awesome people at audiosplitter.fm provide a little code snippet that allows you to get your Grooveshark collection back.

Go to http://grooveshark.com and open your browser devtools, go to the Console tab and type the content of the JS script. You'll get a big JSON blob, if you know how to exploit it good for you, if not audiosplitter.fm can import it, go use it ;)

@simonc
simonc / Gemfile
Last active August 29, 2015 14:20
This is a PoC about testing CSS with RSpec
source 'https://rubygems.org'
gem 'rails', '4.2.1'
gem 'pg'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'rspec-rails'
@simonc
simonc / template.rb
Last active June 25, 2016 17:34
Rails Template FTW!
ruby_version = '2.3.1'
def yes!(statement)
!!(ask("#{statement} [yes]") =~ /^(y(es)?)?$/)
end
project_name = @app_name.parameterize
doing_tests = yes!('Do you plan on writing tests?')
fr:
admin:
js:
true: Vrai
false: Faux
is_present: Est présent
is_blank: Est vide
date: Date ...
between_and_: Entre le ... et le ...
today: "Aujourd'hui"
@simonc
simonc / gist:7578108
Last active December 28, 2015 23:19
Shell tips

Here are some shell/term tips I use on a day to day basis.

Escape-dot

When typing a command, using esc-. inserts the last argument of the previous command.

$ ls aaa.txt bbb.txt ccc.txt
...
$ ls <esc-.>

$ ls ccc.txt

@simonc
simonc / redcartper_rouge.rb
Created June 3, 2013 00:30
Redcarpet+Rouge converter for Jekyll
# _plugins/redcarpet_rouge.rb
require 'redcarpet'
require 'rouge'
require 'rouge/plugins/redcarpet'
module Jekyll
class RedcarpetRouge < Converter
safe true
priority :high
@simonc
simonc / .zshrc
Last active December 16, 2015 21:49
My ZSH configuration
# tweaking the Ruby GC to speed up tests
export RUBY_GC_MALLOC_LIMIT=90000000
export RUBY_FREE_MIN=200000
# chruby
source /usr/local/opt/chruby/share/chruby/chruby.sh
source /usr/local/opt/chruby/share/chruby/auto.sh
RUBIES=(/usr/local/rubies/*)
chruby $(cat ~/.ruby-version)
@simonc
simonc / conventions.md
Last active December 16, 2015 16:00
My coding conventions for Rails

Rails conventions

General

  • Methods should be sorted alphabeticaly

Writing a private method

class Plop
@simonc
simonc / .gitconfig
Last active July 9, 2020 23:41
My git configuration
[advice]
# Hides command hints in basic `git status`.
statusHints = false
# Hides any warning when checking out a commit by hash instead of branch.
detachedHead = false
[alias]
# Shows the commit hash on 6 chars to match `git log`.
# -s suppresses the author name and timestamp from the output.
blame = blame --abbrev=6 -s