Skip to content

Instantly share code, notes, and snippets.

View smcabrera's full-sized avatar
🐶

Stephen Mariano Cabrera smcabrera

🐶
View GitHub Profile
@smcabrera
smcabrera / osx-10.10-setup.md
Last active November 16, 2015 06:56 — forked from kevinelliott/osx-10.10-setup.md
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

This is forked from someone else; I've yet to go through this and fully customize it but I thought it was such a great idea I had to steal it.

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@smcabrera
smcabrera / index.md
Last active August 29, 2015 14:22 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@smcabrera
smcabrera / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@smcabrera
smcabrera / README.md
Last active August 29, 2015 14:11 — forked from hofmannsven/README.md
#!/bin/bash -ex
# Paste this into ssh
# curl https://gist.githubusercontent.com/smcabrera/143a72e9ef8729e97a67/raw/bd3089511fa43fc73c6943bc59685918e19a040b/bootstrap_homeshick.sh | sh
# When forking, you can get the URL from the raw (<>) button.
### Set some command variables depending on whether we are root or not ###
# This assumes you use a debian derivate, replace with yum, pacman etc.
aptget='sudo apt-get'
chsh='sudo chsh'
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Returns the result of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111
#!/usr/bin/ruby
#
# Download lecture videos of courses from Coursera (http://www.coursera.org).
#
# Install requirements:
#
# $ gem install curb trollop nokogiri capybara ruby-progressbar
#
# Example -- Download all video lectures of courses "Calculus: Single Variable"
# and "Introduction to Astronomy":