Skip to content

Instantly share code, notes, and snippets.

@sleungcy
sleungcy / colorInConsole.groovy
Created February 16, 2019 01:47 — forked from crevier/colorInConsole.groovy
How to print color in console in groovy
def fg = 30
def bg = 46
def style = "${(char)27}[$fg;$bg"+"m"
println(style+"HELLO")
/*
+~~~~~~+~~~~~~+~~~~~~~~~~~+
| fg | bg | color |
+~~~~~~+~~~~~~+~~~~~~~~~~~+
| 30 | 40 | black |
| 31 | 41 | red |
@sleungcy
sleungcy / rails_migration_cheatsheet.md
Last active August 29, 2015 14:27 — forked from amejiarosario/rails_migration_cheatsheet.md
Rails Migration - Cheatsheet