Skip to content

Instantly share code, notes, and snippets.


Vinney Cavallo vcavallo

View GitHub Profile

items in front of you

jar is an object in front of you. It is tall and from above looks like a circle.

a jar has stuff in it. there can be either peanut butter, which is brown in color, or jelly, which is purple in color. peanut butter jar and jelly jar. a jar has three parts - the inner stuff is one, and the outer stuff is in two pieces: the top and the bottom. you can see the division between the two parts. the bottom is the part that is facing down, the top is facing up.

bag of bread is an object in front of you. it has two parts - an outer container and an inner material. the bag is the container and what is inside in the bread. there are many nearly-identical items that are all bread. they are individually called slices. a slice of bread is an individual item.

knife is another object in front of you. it is the only remaining object. it is silver in color and has the shape of a wide line. there are two ends to it handle and blade. the handle is the thicker end. the blade

vcavallo / cs
Created Sep 24, 2013
CS function for bash profile - `cs ~/directory` does `cd` to ~/directory and then immediately does `ls` there (well, a fancy ls...).
View cs
# CS function
function cs () {
cd $1; ls "-lahG"
vcavallo / fork_you.markdown
Last active Dec 24, 2015
Forking how-to with descriptions
View fork_you.markdown


essentially like cloning on github's servers - but that's inconsequential, mostly.. also: forks are not automatically up to date (relative to repo you forked)! your fork creates a snapshot of the original repo at the time you fork it.

  • fork on github

  • creates a clone on github servers

  • copy url of that clone

  • git clone [url]

    • clones the content of your fork to your local machine
vcavallo /
Last active Jan 8, 2017
Create a GitHub repo from the CLI (plus bash function)

Create GitHub repo without leaving the command line

curl -u 'USER' -d '{"name":"REPO"}'

Replace USER with your username and REPO with the intended repo name. Include all quotes above.

The do the usual:

git remote add origin
git push origin master
vcavallo / databasecleaner_config.rb
Created Apr 4, 2014
database cleaner configuration
View databasecleaner_config.rb
# spec_helper.rb
RSpec.configure do |config|
# earlier configurations omitted ...
# Set config.use_transactional_fixtures to false
config.use_transactional_fixtures = false
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
vcavallo / gist:80f01ad6fb4b90993dfd
Created Dec 8, 2014
password protect any site without devise users
View gist:80f01ad6fb4b90993dfd
class AnyController < ApplicationController
# HTTP authentication should be used for staging to prevent unauthorized outside access to application.
before_filter :authenticate if Rails.env.staging?
def authenticate
authenticate_or_request_with_http_basic do |user,pass|
user == "usernamehere" && pass == "passwordhere"
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
vcavallo / questions-for-employers.txt
Created Sep 21, 2015
this is an archive of a blog post that i had saved to newsblur back when it was posted. it appears the post has since been taken down or moved.
View questions-for-employers.txt
Comments: " 10 questions to ask your potential employer"
The interview is all too often driven by the employer. Can you handle this workload? What are your strengths and weaknesses? How do you feel about this aspect of the business?
But at the end of the interview, you do not know enough to know if you will actually love and enjoy the work. How many developers or designers do you know who have worked at a place for less than a year? Less than 9 months? I bet more than a few.
Here's some questions you should ask before committing a significant portion of your life to a company.
vcavallo /
Last active Dec 10, 2015
Creating an agile project from a "template" in jira

Setting up a new Agile Scrum project in Jira

  1. create new project
  2. choose "scrum software development"
  3. click 'select' on the next screen to use the default issue type for now
  4. choose a name and project lead
  5. go to 'project administration' (this option is in different places depending on your view)
  6. you should be viewing the summary now. do these:
    1. issue types
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