Skip to content

Instantly share code, notes, and snippets.

View maxkaplan's full-sized avatar
🎯
Focusing

Max Kaplan maxkaplan

🎯
Focusing
View GitHub Profile
@maxkaplan
maxkaplan / ruby_on_rails_deployment.md
Created February 26, 2021 23:59 — forked from zentetsukenz/ruby_on_rails_deployment.md
Deploy Ruby on Rails application with Docker Compose and Capistrano with ease

Docker

Files and Folders.

|
|\_ app
|...
|\_ docker
| |
@maxkaplan
maxkaplan / dominant_colors.rb
Created February 25, 2018 21:32 — forked from edouard/dominant_colors.rb
A ruby script to get the most dominant colours in an image (uses ImageMagick)
require 'open-uri'
require 'rubygems'
require 'rmagick'
include Magick
TOP_N = 10 # Number of swatches
# Create a 1-row image that has a column for every color in the quantized
# image. The columns are sorted decreasing frequency of appearance in the
# quantized image.
#!/bin/bash
set -eo pipefail
TARGETFMT='/opt/vagrant/embedded/gems/gems/vagrant-%s/plugins/providers/virtualbox/driver/meta.rb'
die() { echo >&2 "$@"; exit 1; }
[[ $EUID -eq 0 ]] || die "sudo required"
@maxkaplan
maxkaplan / README.md
Last active July 28, 2017 21:02 — forked from oodavid/README.md
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

Keybase proof

I hereby claim:

  • I am maxkaplan on github.
  • I am maxkaplan (https://keybase.io/maxkaplan) on keybase.
  • I have a public key whose fingerprint is 3FEC C2B0 A7E1 DD72 E5F4 850C 0F7F D605 0DE9 1FAE

To claim this, I am signing this object: