Skip to content

Instantly share code, notes, and snippets.

Sam Leung sleungcy

Block or report user

Report or block sleungcy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sleungcy
sleungcy / colorInConsole.groovy
Created Feb 16, 2019 — forked from crevier/colorInConsole.groovy
How to print color in console in groovy
View colorInConsole.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 |
View rails_migration_cheatsheet.md
You can’t perform that action at this time.