Skip to content

Instantly share code, notes, and snippets.

View damianesteban's full-sized avatar
🎯
Focusing

Damian Esteban damianesteban

🎯
Focusing
View GitHub Profile
@damianesteban
damianesteban / Carthage Instructions.md
Last active August 29, 2015 14:27 — forked from pxlshpr/Carthage Instructions.md
These are the steps required to add and embed a framework into your project using Carthage.
  1. Add the URL of the framework's repo to your Cartfile using one of the following:
  github "ReactiveCocoa/ReactiveCocoa" # GitHub.com
  github "https://enterprise.local/ghe/desktop/git-error-translations" # GitHub Enterprise
  git "https://enterprise.local/desktop/git-error-translations2.git"
  git "/Users/user/foo/bar.git"

…optionally followed by one of the following version specifiers:

------------
Conformances
------------
protocol AbsoluteValuable
Conformances:
Comparable
IntegerLiteralConvertible
SignedNumberType
# Command Line Tools via Xcode
1. Get Xcode from App Store
2. Open Xcode
3. Go to Preferences
4. Downloads > Components > Command Line Tools > Install
# or
xcode-select --install
# Homebrew
@damianesteban
damianesteban / shit_ror_devs_say.txt
Last active August 29, 2015 14:16 — forked from ktheory/shit_ror_devs_say.txt
Shit Ruby on Rails Developers say in 2015.
Did you upgrade to Rails 4.0.4 yet?
I made a rake task for that.
2.1.0 or 2.2.0?
Did you know there's a rake task for that?
We should use Angular.js on this project.
I love the new hash syntax.
Did you upgrade to Rails 4.18 yet?
Did you see my pull request?
I hate the new hash syntax.
Did you upgrade to Rails 4.2.0 yet?
def fib(n)
(0..n).inject([1,0]) { |(a,b), _| [b, a+b] }[0]
end
@damianesteban
damianesteban / index.md
Last active August 29, 2015 14:11 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

Web Design Contract for OkDork readers (open-source)

Between [your name] and [their name]

Summary:

You ([their name]), located at [customer address] are hiring me ([your name]) located at [company address] to [design and develop a web site] for the estimated total price of [total] as outlined in our previous correspondence.

What do both parties agree to do?

#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
PlayersList = new Mongo.Collection('players');
console.log("Hello world");
if (Meteor.isClient) {
Template.leaderboard.helpers({
'player': function () {
return "Some other text"
}
});
# SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
# BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.