Skip to content

Instantly share code, notes, and snippets.


Vinney Cavallo vcavallo

View GitHub Profile
vcavallo / version.rake
Created Dec 6, 2016 — forked from muxcmux/version.rake
Manage your rails app version with this rake task
View version.rake
def valid? version
pattern = /^\d+\.\d+\.*\d*(\-(dev|beta|rc\d+))?$/
raise "Tried to set invalid version: #{version}".red unless version =~ pattern
def correct_version version
ver, flag = version.split '-'
v = ver.split '.'
(0..2).each do |n|
v[n] = v[n].to_i
vcavallo / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console