Skip to content

Instantly share code, notes, and snippets.

chrismo chrismo

Block or report user

Report or block chrismo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View meander.md
View bundler-5059.debug.txt
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/.
Starting resolution (2016-10-06 10:14:12 -0500)
Resolving dependencies...Creating possibility state for fog (= 1.38.0) (1 remaining)
Attempting to activate fog (1.38.0)
Activated fog at fog (1.38.0)
Requiring nested dependencies (fog-core (~> 1.32), fog-json, fog-xml (~> 0.1.1), ipaddress (~> 0.5), fog-aliyun (>= 0.1.0), fog-atmos, fog-aws (>= 0.6.0), fog-brightbox (~> 0.4), fog-cloudatcost (~> 0.1.0), fog-dynect (~> 0.0.2), fog-ecloud (~> 0.1), fog-google (<= 0.1.0), fog-local, fog-openstack, fog-powerdns (>= 0.1.1), fog-profitbricks, fog-rackspace, fog-radosgw (>= 0.0.2), fog-riakcs, fog-sakuracloud (>= 0.0.4), fog-serverlove, fog-softlayer, fog-storm_on_demand, fog-terremark, fog-vmfusion, fog-voxel, fog-vsphere (>= 0.4.0), fog-xenserver)
Creating possibility state for fog-core (~> 1.32) (14 remaining)
Attempting to activate fog-core (1.43.0)
Activated fog-core at fog-core (1.43.0)
View bundle outdated filter switches.sh
=> bundle outdated
Fetching source index from file:/Users/chrismo/dev/bundler-cases/out/repo/
Resolving dependencies...
Outdated gems included in the bundle:
* bar (newest 1.1.0, installed 1.0.0) in group "default"
* foo (newest 2.0.0, installed 1.0.0) in group "default"
* qux (newest 1.0.1, installed 1.0.0) in group "default"
=> bundle outdated --major
@chrismo
chrismo / .gitignore
Last active Jan 25, 2016
Answer to creating multiple has_many records
View super_modules
module Car
def vroom
'<car noise>'
end
end
module Boat
def vroom
'<boat noise>'
end
View gist:17d3fe00b5117d394aa2
(fn [x coll]
(keep #(if (= (count %) x) % nil)
(map #(map last %)
(vals
(group-by
#(quot (first %) x)
(map-indexed #(vector % %2) coll)))))
)
View gist:809e901313061c0358a5
(fn [coll x]
(apply concat
(map
(fn [item]
(map
(fn [_] identity item)
(range x)))
coll)))
@chrismo
chrismo / bundle editor.sh
Last active Aug 29, 2015
Sequel Pro Format Sql Bundle
View bundle editor.sh
ruby formatsql.rb "$(cat)"
View hopedale.txt
Coloured fox fur production, HOPEDALE, Labrador, 1834-1842
#Source: C. Elton (1942) "Voles, Mice and Lemmings", Oxford Univ. Press
#Table 17, p.265--266
29
22
2
16
12
35
8
@chrismo
chrismo / copr.md
Last active Aug 29, 2015
Git: Checkout PR
View copr.md

Greg Vaughn posted this cool alias the other day:

copr = "!f() { git fetch -fu origin refs/pull/$1/head:pr-$1; git checkout pr-$1; } ; f"

Preferring to be a stock-tools person, I wanted to deconstruct this to see how I'd use it off-the-shelf without the alias.

git fetch     -- I'm already familiar with this command
-fu           -- these two flags I'm not sure are necessary, esp. -u since the help says, 
                 "unless you are implementing your own Porcelain you are not supposed to use 
You can’t perform that action at this time.