Skip to content

Instantly share code, notes, and snippets.

class Stock < ActiveRecord::Base
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
belongs_to :exchange
belongs_to :company
has_many :comments, as: :commentable
has_many :tasks
has_many :task_comments, through: :tasks, source: :comments
import UIKit
class AuthenticationViewController: UIViewController {
// MARK: - Properties
var welcomeLabel: UILabel = {
let label = UILabel()
label.text = "Welcome to Paparazzi"
label.setTranslatesAutoresizingMaskIntoConstraints(false)
label.font = UIFont(name: "HelveticaNeue-Thin", size: 30)
#import "SSDataKit.h"
@class CDKList;
@class CDKTask;
extern NSString *const kCDKCurrentUserChangedNotificationName;
@interface CDKUser : SSRemoteManagedObject
@property (nonatomic, strong) NSString *firstName;
class SettingsViewController: UIViewController {
weak var delegate: SettingsViewControllerDelegate?
...
}
//
// FriendsViewController.swift
// Nudge
//
// Created by Peter Nicholls on 2/08/2014.
// Copyright (c) 2014 Peter Nicholls. All rights reserved.
//
import Foundation
import UIKit
import Foundation
import UIKit
class FriendsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
var user: NDUser
var friends: [NDUser]
var fetchCompleted: Bool
lazy var tableView: UITableView = {
let tableView = UITableView()
source 'http://rubygems.org'
ruby "1.9.3"
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
gem "rails", "3.2.16"
# Use postgres as the database for Active Record
gem "pg", "~> 0.17.0"

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

{"countries":[{"id":1,"code":"AU","description":"Australia"}],"meta":{"count":1,"total_count":1}}
@pnicholls
pnicholls / es.sh
Last active December 26, 2015 06:49 — forked from rajraj/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.5.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share