Skip to content

Instantly share code, notes, and snippets.

@afomi
afomi / Run in LOCAL terminal...
Last active August 29, 2015 13:55 — forked from jswartwood/Run in LOCAL terminal...
Dreamhost Git Post Hook
# Replace any brackets with real values
# Try to ssh in to DREAMHOST (ensure it no longer asks for a PW); you may want to restart Terminal
ssh [user]@[host]
cd ~
mkdir [mydomain_com].git
cd [mydomain_com].git
git init --bare
vi hooks/post-receive
# Enter the code from the "post-receive" file (in this gist); save + quit
@afomi
afomi / .slate
Created August 7, 2014 18:24
Slate Config
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Resize Bindings
bind right:alt resize +10% +0
bind left:alt resize -10% +0
@afomi
afomi / ember-rails-scaffold.md
Last active August 29, 2015 14:05 — forked from pixelhandler/ember-rails-scaffold.md
Ember Rails Scaffold

Scaffold for a browser app build with Ember.js, Rails, Ember.Data

Journal App

This is a scaffold for setting up: an API with Rails and the ember-rails gem, persistence with Ember.Data, and a browser app using Ember.js

See source code on GitHub: pixelhandler/journal.

@afomi
afomi / ember.js.md
Last active August 29, 2015 14:09
Ember.js

Basics

A request comes in. A URL comes in. And the request is handled by router.js.coffee and a /routes/*_route.js.coffee file.

Assumptions

  • The name of my example Ember App is App.
  • I'm using coffee-script, and I'm assuming it gets compiled to javascript.
@afomi
afomi / agile-pics
Last active August 29, 2015 14:10
agile-pics
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
"you" -> "createGist"
"createGist" -> "gist"
"gist" -> "code"
"code" -> "agile.pics"
"agile.pics" -> "visualization"
"visualization" -> "share"
"share" -> "collaborator"
"collaborator" -> "editGist"
@afomi
afomi / agile-pics-2
Last active August 29, 2015 14:10
agile-pics-2
<h1>
Using Agile Pics
</h1>
<div class="diagram">
Create a Gist->Grab its Id:
Visit->Request:
Request->App:
App->Routes:
Routes->Controller:
Controller->Model:
@afomi
afomi / billing.html
Last active August 29, 2015 14:10
tahi billing
<h1>
Billing
</h1>
<div class="diagram">
Billing->Corresponding\n Author:
Billing->Institutional\n Accounts:
Billing->Global Participation\n Initiative:
Billing->Publication Fee\n Assistance:
</div>
@afomi
afomi / gist:6646d1b9f667072bfb86
Last active August 29, 2015 14:10
policy enforcement
<h1>
App Policies
</h1>
<div class="diagram">
Request->Controller:
Controller->Authorization:
Authorization->EnforcePolicy:
EnforcePolicy->Policy:
Policy->Permissions:defines
</div>
@afomi
afomi / agile-pics-restaurant-example
Last active August 29, 2015 14:10
agile-pics-restaurant-example
<h3>
Restaurant
</h3>
<div class="diagram">
Customer->Host:welcome
Host->Waiting List: add names to List
Host->Waiting List: updating it as Customers are seated
Host->Customer: table is ready
Customer->Server:submits order
@afomi
afomi / agile-pics-data-model-example
Last active August 29, 2015 14:10
agile-pics-data-model-example
<script type="text/vnd.graphviz" id="graphviz">
digraph models_diagram {
graph[overlap=false, splines=true]
"Affiliation" []
"ApiKey" []
"Attachment" []
"Author" []
"Comment" []
"CommentLook" []
"Credential" []