NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
Improved YARD CHEATSHEET http://yardoc.org
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
#!/usr/bin/env ruby | |
# Put this file in the root of your Rails project, | |
# then run it to output the SQL needed to change all | |
# your tables and columns to the same character set | |
# and collation. | |
# | |
# > ruby character_set_and_collation.rb | |
DATABASE = '' |
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
### | |
A meta-compilation of: | |
https://raw.github.com/gist/1453705/d253733a56632a8d2c29321a75c18b627fa4dda8/reserved_usernames.rb | |
http://blog.postbit.com/reserved-username-list.html | |
http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features | |
(Took out some company-specific terms at the top of the first one (e.g. imulus, stacks), added one term so far - 'edits'.) | |
NOTE: Does not include profanities. You may or may not want to add a list of those. | |
(See https://www.google.com/search?q=profanity+list, but don't try to apply regexp's here because Scunthorpe - http://en.wikipedia.org/wiki/Scunthorpe_problem) |
<% flash.each do |type, message| %> | |
<div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
<button class="close" data-dismiss="alert">×</button> | |
<%= message %> | |
</div> | |
<% end %> |
NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
<?php | |
namespace App\Traits; | |
use Spatie\Color\Hex; | |
use Spatie\Color\Rgb; | |
trait SetupColors | |
{ | |
protected function darken(Hex $hex, float $intensity): Rgb |