Skip to content

Instantly share code, notes, and snippets.

View cdl's full-sized avatar

Colby Ludwig cdl

View GitHub Profile
@cdl
cdl / plugin.js
Last active January 30, 2016 02:41
import Nimble from 'nimble';
export default Nimble.Plugin.extend({
/**
* request: Returns a Promise that resolves with a search response, or rejects with an error.
* @attr term – The search term given.
**/
request(term, function() {
// ... return the promise
@cdl
cdl / .vimrc
Created December 7, 2015 20:21
"""""""""""""""""""""""""""""
" Files, backups, undo, etc.
"""""""""""""""""""""""""""""
set nocompatible
set encoding=utf8
set ffs=unix,dos,mac
set nobackup
set nowb
set noswapfile
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) {
// 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)
# 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

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
// 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);
//
// 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;
/**
* 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: {
@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;
}