Skip to content

Instantly share code, notes, and snippets.

@code0100fun
code0100fun / app_controllers_sign-in.js
Created June 8, 2015 20:02
Ember Simple AUth + Ember CLI Mirage
// app/controllers/sign-in.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
signIn(){
this.set('errors', null);
var params = { identification: this.get('email'), password: this.get('password') };
// Redirects to index route on success (configurable in config/environment.js)
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', params);
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

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.

Install Software

@sheldonbaker
sheldonbaker / 1-policy.coffee
Last active June 24, 2016 02:37
s3 image upload with ember-data - requires a Policy model (required by Amazon for browser uploads) generated by your server
`import DS from 'ember-data'`
# https://aws.amazon.com/articles/1434
Policy = DS.Model.extend
key: DS.attr('string')
bucket: DS.attr('string')
acl: DS.attr('string')
'AWSAccessKeyId': DS.attr('string')
'Content-Type': DS.attr('string')
@dylanjha
dylanjha / 1. application.html.erb
Last active January 31, 2016 17:55
Set a `currentUser` in Ember world that all controllers ( and all views ) can access. I'm using Ember 1.5.0 and Ember Data 1.0.0-beta.6
<!DOCTYPE html>
<html>
<head>
<title>App</title>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag "templates/all" %>
<%= csrf_meta_tags %>
</head>
<body>
@particlebanana
particlebanana / waterline-express-example.js
Last active October 31, 2019 15:53
How to load the beta of Waterline v0.10 when using Express.js Make sure to use the `associations` branch of any adapters you plan on loading.
/**
* A simple example of how to use Waterline v0.10 with Express
*/
var express = require('express'),
_ = require('lodash'),
app = express(),
Waterline = require('waterline');
@jimeh
jimeh / Tango with Monokai.itermcolors
Created January 1, 2012 23:54
A iTerm color theme blending Tango Dark with Monokai.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
@mojodna
mojodna / Procfile
Created September 29, 2011 20:22 — forked from RandomEtc/Procfile
Getting Kue working on Heroku
web: node app.js
worker: node consumer.js
@dnagir
dnagir / rspec-syntax-cheat-sheet.rb
Created November 5, 2010 09:29
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")