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 / .slate
Last active December 23, 2018 01:30
Slate OSX Config
# Using Slate - https://github.com/jigish/slate
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
bind 2:cmd grid padding:5 0:6,2
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY
@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 / sequence-diagram.html
Last active January 6, 2017 15:06
js sequence diagram example
<h1>
Rails
</h1>
<div class="diagram">
Visit->Request:
Request->App:
App->Routes:
Routes->Controller:
Controller->Model:
Controller->View:
@afomi
afomi / graphviz.html
Last active August 10, 2018 07:23
Graphviz Example
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
"browser" ->
"http_request" ->
"server" ->
"routes" ->
"controller" ->
"model" -> "controller"
"controller" -> "response"
"response" -> "view" -> "html"
@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>