Skip to content

Instantly share code, notes, and snippets.

Jean-Christophe jcberthon

Block or report user

Report or block jcberthon

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
jcberthon / docker-img-gc
Last active Sep 11, 2017 — forked from anildigital/gist:862675ec1b7bccabc311
Remove dangling docker images and volumes
View docker-img-gc
docker images --quiet --filter=dangling=true | xargs --no-run-if-empty docker rmi
jcberthon / string_ext.rb
Created Jun 12, 2012 — forked from erskingardner/string_ext.rb
Convert String to Boolean value
View string_ext.rb
class String
def to_boolean
return true if self == true || self =~ (/(true|t|yes|y|1)$/i)
return false if self == false || self.nil? || self.empty? || self =~ (/(false|f|no|n|0)$/i)
raise"invalid value for Boolean: \"#{self}\"")
You can’t perform that action at this time.