Skip to content

Instantly share code, notes, and snippets.

View chrismo's full-sized avatar

chrismo chrismo

View GitHub Profile
@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
@chrismo
chrismo / method_logger_test.rb
Created September 13, 2012 15:33 — forked from nhance/method_logger.rb
Rails compatible method logging. Use this to log all calls to instance methods of a class to the log.
# converted to stand-alone script
require 'minitest/autorun'
require 'minitest/unit'
require 'stringio'
# fake out the logger
class Rails
@@logger = StringIO.new