First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails
gem 'pry-rails', group: :development
Then you'll want to rebuild your Docker container to install the gems
First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails
gem 'pry-rails', group: :development
Then you'll want to rebuild your Docker container to install the gems
// This gist is based on @wnstn's great [gist](https://gist.github.com/wnstn/36010c8378e850cc3580) | |
// and @maykefreitas's [advice](https://github.com/BrowserSync/browser-sync/issues/977#issuecomment-236443965) about turbolinks. | |
// Code below is generated after running `browser-sync init` in your project's root directory. | |
// I commented the lines I changed or added so you can run it from scratch as well, if you like. | |
/* | |
|-------------------------------------------------------------------------- | |
| Browser-sync config file |
$ uname -r
# -*- coding: utf-8 -*- | |
"""A simple tool to document how to control AWS resources. | |
AWS AUTHENTICATION | |
------------------- | |
In order to run any of the code below, you need a profile with AWS credentials | |
set up on your computer. It's very easy to do this. Google how to configure | |
your profile with boto3, or visit the docs: |
#/usr/bin/env bash | |
rm -rf ./.pngs | |
rm -rf ./.gifs | |
mkdir .pngs | |
mkdir .gifs | |
ffmpeg -i $1 -r 10 ./.pngs/out%04d.png | |
sips -s format gif ./.pngs/*.png --out ./.gifs | |
gifsicle ./.gifs/*.gif --optimize=3 --delay=3 --loopcount --resize 720x405 --colors=255 > $1.gif | |
gifsicle --unoptimize $1.gif | gifsicle --dither --colors 48 --resize-fit-width 512 -O2 `seq -f "#%g" 0 2 213` -o $1.optimized.gif | |
rm -rf $1.gif |
# usage: | |
# it "should return a result of 5" do | |
# eventually { long_running_thing.result.should eq(5) } | |
# end | |
module AsyncHelper | |
def eventually(options = {}) | |
timeout = options[:timeout] || 2 | |
interval = options[:interval] || 0.1 | |
time_limit = Time.now + timeout |
Uploads large files in multiple chunks. Also has the ability to resume if the upload is interrupted.
Typical usage:
/upload
with the first chunk of the file and receive an upload id in return.POST /upload/commit/:id
:
###rpush - https://github.com/rpush/rpush
Follow the steps in rpush to add the gem to your rails project
####PushNotificationDevice
rails g model PushNotificationDevice device_type:integer:index device_token:string
class CreatePushNotificationDevices < ActiveRecord::Migration