Skip to content

Instantly share code, notes, and snippets.

@chrishomer
chrishomer / .gitignore
Created March 4, 2012 20:12 — forked from atty303/.gitignore
Initial gitignore for iOS project.
# xcode noise
build/*
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
*.mode1
*.mode2v3
*.mode1v3
xcuserdata
@chrishomer
chrishomer / developer_trail_maps.md
Created March 28, 2012 21:02 — forked from croaky/developer_trail_maps.md
A trail map shows different paths someone can take. Everyone starts at different places and wants to go different places. Pick the ones that make sense for you.

Structure

  • Have a breakable toy side Rails project. It anchors your learning. Apply new skills/techniques here.
  • Put the code in Github. Give mentors access to the project. They'll review your code.
  • Understand the code review process and other style guidelines.
  • Deploy your breakable toy to Heroku.
  • Set learning goals weekly (e.g. X chapters of the Pickaxe, X Railscasts/week).
  • Keep a text document (using vim) to record interesting commands/concepts/things you've learned.
  • Review the text document daily for comprehension.
{
"id":1,
"created_at":"2012-06-24T15:17:44Z",
"email":"jon.smith@example.com",
"mongo_id":"4f830177a491c85627000001",
"name":"Jon Smith",
"pin_number":"0000",
"roles":"worker,admin,reporting",
"state":"active",
"updated_at":"2012-06-24T15:17:44Z"
[{
"id":1,
"email":"jon.smith@example.com",
"name":"Jon Smith",
"pin_number":"0000",
"roles":"worker,admin,reporting",
"state":"active"
},{
"id":2,
"email":"frank.joe@example.com",
{
picksheet: {
id: 77777
state: "picked"
picksheet_batch_id: 15
},
bag_required: true / false,
error: ""
}
{
bag: {
id: "888888",
code: "01-IND-999999-888888"
}
address: {
name: "John Smith",
line1: "570 Market St",
line2: "4th Floor",
city: "San Francisco",
@chrishomer
chrishomer / gist:3156321
Created July 21, 2012 16:25
CloudSearchDoc
[
{ "type": "add",
"id": 153001,
"version": 1,
"lang": "en",
"fields": {
"adjustable_waist": 0,
"brand_id": 141,
"brand_name": "Gymboree",
"brand_tier_id": 1,
@chrishomer
chrishomer / gist:3758824
Created September 20, 2012 22:52
SHOW STATUS
+------------------------------------------+-------------+
| Variable_name | Value |
+------------------------------------------+-------------+
| Aborted_clients | 7287 |
| Aborted_connects | 0 |
| Binlog_cache_disk_use | 45 |
| Binlog_cache_use | 1130102 |
| Binlog_stmt_cache_disk_use | 0 |
| Binlog_stmt_cache_use | 0 |
| Bytes_received | 4714 |
@chrishomer
chrishomer / gist:3758910
Created September 20, 2012 23:17
SHOW ENGINE INNODB STATUS
| InnoDB | |
=====================================
120920 22:53:10 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 49 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 46401 1_second, 45420 sleeps, 4635 10_second, 70 background, 70 flush
srv_master_thread log flush and writes: 48122
ItemEvent.where("item_events.created_at > ? AND item_events.created_at < ?",Time.parse("January 15 2013"),Time.parse("January 16 2013")).select("COUNT(DISTINCT item_events.item_id) AS cnt").first.cnt
=> 1979
Item.where("items.created_at > ? AND items.created_at < ?",Time.parse("January 15 2013"),Time.parse("January 16 2013")).count
=> 2739