Skip to content

Instantly share code, notes, and snippets.

@afomi
afomi / gist:3dc80442bd08738e179c
Created January 6, 2015 05:43
CPORD - The basics steps of GTD
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
collect ->
process ->
organize ->
review ->
do
}
</script>
@afomi
afomi / gist:9aa9633942c3c7c82e6f
Last active August 29, 2015 14:12
Graphviz: Noodling out my own workflow
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
compound=true;
idea -> paper
paper -> inbox
org_tools -> pivotal_tracker
org_tools -> textfiles
@afomi
afomi / gist:2ce351fcba2dd719d861
Created January 6, 2015 05:45
Graphviz: Tripartite Object Modeling
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
compound=true;
subgraph cluster_1 {
node [style=filled];
b0 -> b1 -> b2 -> b3;
label = "process #1";
color=blue;
@afomi
afomi / gist:d49dab7bc147a8d4406d
Created January 6, 2015 05:46
Graphviz: Design Process via Communicating Design
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
"personas" ->
"content inventory & data model" ->
"workflows & sitemap" ->
"mockups" ->
"screen designs" ->
"working, tested software"
}
</script>
@afomi
afomi / gist:298acf782a5efd95ada3
Created January 6, 2015 05:47
Graphviz: Initial tests with Graphviz using viz.js
<h2>
Hello Graphviz World"
</h2>
<p>
Initial tests with Graphviz using viz.js
</p>
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
@afomi
afomi / ihat notes
Last active August 29, 2015 14:13
ihat notes
<h2>
iHat
</h2>
<p>
Notes and Stuff
</p>
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
@afomi
afomi / ihat ideas
Last active August 29, 2015 14:13
ihat ideas
<h2>
iHat
</h2>
<p>
Ideas
</p>
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
@afomi
afomi / check_for_invalid_records.rb
Created January 16, 2015 15:15
Check for Invalid Records in a Rails DB
tables = ActiveRecord::Base.connection.tables; nil
tables.each do |table|
begin
z = table.singularize.camelize.constantize
records = z.all;nil
i = 0
records.each do |record|
if !record.valid?
@afomi
afomi / count_database_records.rb
Created January 22, 2015 22:11
count records in every table
@hash = {}
tables = ActiveRecord::Base.connection.tables; nil
tables.each do |table|
begin
z = table.singularize.camelize.constantize
i = z.count
p "====> #{i} Records in #{table}"
@hash[table] = i
@afomi
afomi / playing_with_routes.rb
Created March 16, 2015 04:28
Playing with Routes - Trying to be more explicit with route definitions.
# A routes object that is actually a Routeset
routes = Rails.application.routes.class
=> ActionDispatch::Routing::RouteSet
# A more proper Routes object
routes = Rails.application.routes.routes.class
=> ActionDispatch::Journey::Routes
# An array of Routes
routes = Rails.application.routes.routes.routes.class