Skip to content

Instantly share code, notes, and snippets.

View chrismo's full-sized avatar

chrismo chrismo

View GitHub Profile
module Car
def vroom
'<car noise>'
end
end
module Boat
def vroom
'<boat noise>'
end
@chrismo
chrismo / .gitignore
Last active January 25, 2016 15:53
Answer to creating multiple has_many records
.bundle
=> 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
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)
@chrismo
chrismo / install_imagick_amzn2.sh
Last active October 12, 2021 14:52 — forked from sshymko/install_pecl_imagick_amzn2.sh
Install latest ImageMagick 7.x and imagick PHP extension from PECL on Amazon Linux 2
#!/bin/sh
# Uninstall ImageMagic library and imagick PHP extension using it (installed previously)
yum remove -y php-pecl-imagick ImageMagick
# Install libraries for JPG, PNG, GIF, WebP, and TIFF image formats
yum install -y libpng-devel libjpeg-devel openjpeg2-devel libtiff-devel libwebp-devel giflib-devel
# Install latest ImageMagick library compiled from downloaded sources
yum install -y tar gzip gcc make