One way to do this is to use bundler to scaffold our gem:
bundler gem my_gem
I prefer to put tasks meant to manage the gem itself in lib/tasks, and tasks the gem is meant to provide to gem users in lib/my_gem/tasks.
| # https://www.postgresql.org/docs/13/ddl-partitioning.html#DDL-PARTITIONING-DECLARATIVE | |
| class PartitionByDay | |
| class Row | |
| include Virtus.model | |
| attribute :name, String | |
| attribute :expression, String | |
| end | |
| def self.all(table) |
One way to do this is to use bundler to scaffold our gem:
bundler gem my_gem
I prefer to put tasks meant to manage the gem itself in lib/tasks, and tasks the gem is meant to provide to gem users in lib/my_gem/tasks.
// direct_uploads.js
addEventListener("direct-upload:initialize", event => {
const { target, detail } = event
const { id, file } = detailThat is is basically a "fork" of blog article i'm constantly returning to. It seems that the blog is down:
Dave Bass proposed this which I picked up for my implementation (here for an 8-chars token):
| # Add gem | |
| https://github.com/toy/image_optim | |
| # For production/demo install instructions look in gem readme | |
| ### UBUNTU 12.04 image_optim requirments: | |
| > sudo add-apt-repository ppa:danmbox/ppa | |
| > sudo apt-get update | |
| > sudo apt-get install -y advancecomp gifsicle jhead jpegoptim libjpeg-progs optipng pngcrush pngquant | |
| # download pngout from http://www.jonof.id.au/kenutils |
Let's say you're a web developer who happens to work with both MAMP and Ruby when building different types of websites. Let's say you also like to keep your MySQL stuff in one place and don't like having to juggle both a local MySQL install as well as a MAMP MySQL install. Well, you can indeed connect your ruby apps to MAMP's MySQL. Here's a tutorial on how to do it.
Important! Before you do anything, download and install MAMP. MAMP Pro will work as well. At the time of this writing, MAMP 2.1.1 is the latest.
brew install rbenv, follow any instructions homebrew gives you after the installation is complete.