Skip to content

Instantly share code, notes, and snippets.

View cdl's full-sized avatar
💭
I may be slow to respond.

Colby Ludwig cdl

💭
I may be slow to respond.
View GitHub Profile
curl -s https://gist.githubusercontent.com/cdl/babab8bbe80e3a80fe23/raw/1a7769c66d1403fc3e835baaf018bade2a6a7b6c/no-reddit.sh | sh
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@cdl
cdl / index.html
Created July 9, 2015 17:31
Because 🐕.
<!DOCTYPE html>
<head>
<title>Dog cursor!</title>
<style type="text/css">
html, body {
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
width: 100%;
height: 100%;
cursor: url('https://dropbox.com/s/4tyju1mi7jl541v/dog.ico?dl=1'), default;
}
/**
* This is the example that works. Defining a simple Theme model with a name and author, that's it.
*/
// Set up Sequelize with DB connection
var Sequelize = require('sequelize');
var sequelize = new Sequelize('sidebar_development', 'sidebar', '', {
host: 'localhost',
dialect: 'postgres',
pool: {
//
// Account.h
// Recurring
//
// Created by Colby Ludwig on 2015-08-19.
// Copyright (c) 2015 Colby Ludwig. All rights reserved.
//
#import <Realm/Realm.h>
@class Bill;
// Snippet for extracting PR titles and links from a Github "compare" page
// Useful for creating changelogs!
var output = [];
var links = $('.issue-link');
if(!window.location.href.indexOf('github.com')) { alert('Not a Github compare page!'); }
links = Array.prototype.slice.call(links);

Ember Resources

Some pretty great resources I've found for learning Ember (which, surprisingly, can be really difficult with the pace things are evolving in the Ember world).


  • EmberWatch - a compiled list of talks on different things related to Ember.
  • Ember Observer - a bunch of addons for Ember
  • Ember Weekly Newsletter - a great email newsletter with news, tips, and talks on all things Ember
  • ember-cli 101 - an awesome book in the style of Michael Hartl's "Rails Tutorial". diving into the process behind making a real-world Ember application
# going to assume you're using Bash for this - if not, replace "bash_profile" with
# your shell profile (~/.zshrc, etc)
# install make + gcc + essential build tools
xcode-select --install
# install homebrew (check brew.sh to make sure this command is up to date)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# make sure your system is good to brew
// Aiming to print out the value of a cell's text label when tapped. Assume the below
// method is inside the implementation of a UITableViewController subclass.
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let cell: UITableViewCell? = tableView.cellForRowAtIndexPath(indexPath)
guard let _ = cell where cell != nil else {
return
}
tableView.deselectRowAtIndexPath(indexPath, animated: true)
print("Tapped cell with label:", cell!.textLabel?.text)
var fs = require('fs');
var moment = require('moment');
process.stdin.resume();
process.stdin.setEncoding('utf8');
var util = require('util');
var paused = false;
var interval;
process.stdin.on('data', function(text) {