Skip to content

Instantly share code, notes, and snippets.

View sebastiangeiger's full-sized avatar
🐕

Sebastian Geiger sebastiangeiger

🐕
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.7.0/ember.js"></script>
<style id="jsbin-css">
require 'rspec'
require 'pry'
require_relative "../lib/application"
describe 'Event Sourcing' do
let(:sf) { Port.new(city: "San Francisco", country: :USA) }
let(:la) { Port.new(city: "Los Angeles", country: :USA) }
let(:yyv) { Port.new(city: "Vancouver", country: :Canada) }
let(:ship) { Ship.new("King Roy") }
require 'rspec'
require 'pry'
require_relative "../lib/application"
describe 'Updating the application model' do
let(:sf) { Port.new(city: "San Francisco", country: :USA) }
let(:la) { Port.new(city: "Los Angeles", country: :USA) }
let(:yyv) { Port.new(city: "Vancouver", country: :Canada) }
let(:ship) { Ship.new("King Roy") }

Ember Cheatsheet

1. Templates / Handlebars

1.1 The Application Template: (Think layout.html.erb)

<script type="text/x-handlebars">
  <header>..</header>
  {{outlet}} <-- this displays the route specific template (Rails: yield)
  <footer>..</footer>
@sebastiangeiger
sebastiangeiger / index.html
Created May 22, 2014 18:20
Rotating Video Cube
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
@sebastiangeiger
sebastiangeiger / MO-Logo.markdown
Created February 17, 2014 17:00
A Pen by Sebastian Geiger.
FROM ubuntu
# Installing ruby 2.0.0-p353 from source
RUN apt-get -y update && apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev wget
RUN cd /tmp && wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p353.tar.gz && tar -xvzf ruby-2.0.0-p353.tar.gz
RUN cd /tmp/ruby-2.0.0-p353/ && ./configure --prefix=/usr/local && make && make install

Email only signup with Rails 4 and Devise 3

The copy and paste version

Follow this guide, then we need change some little things.

Create a User.find_by_public_confirmation_token method.