Cambia a jruby
$ rvm use jruby-9.0.0.0.pre1
Crea una nueva app
$ rails _4.1.9_ new <yourapp>
Use if you dont want minitest
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: pumacontrol | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Puma web server |
| +keyframe(fadeout) | |
| 0% | |
| opacity: 1 | |
| 100% | |
| opacity: 0 | |
| +keyframe(changecolor) | |
| 0% | |
| color: #000 | |
| 100% |
Cambia a jruby
$ rvm use jruby-9.0.0.0.pre1
Crea una nueva app
$ rails _4.1.9_ new <yourapp>
Use if you dont want minitest
| vim ~/.rvm/hooks/after_use_jruby_custom | |
| #!/usr/bin/env bash | |
| \. "${rvm_path}/scripts/functions/hooks/jruby" | |
| if [[ "${rvm_ruby_string}" =~ "jruby" ]] | |
| then | |
| jruby_options_append "-Xcompile.invokedynamic=false -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -Xcompile.mode=OFF" | |
| else |
| for pic in *.jpg; do | |
| convert "${pic}" -interlace Plane -sampling-factor 4:2:0 -quality 84% -strip -resize 225x137 "${pic%.*}-home.jpg" | |
| convert "${pic}" -interlace Plane -sampling-factor 4:2:0 -quality 84% -strip -resize 355x216 "${pic%.*}-large.jpg" | |
| convert "${pic}" -interlace Plane -sampling-factor 4:2:0 -quality 84% -strip -resize 115x66 "${pic%.*}-medium.jpg" | |
| convert "${pic}" -interlace Plane -sampling-factor 4:2:0 -quality 84% -strip -resize 1200x732 "${pic%.*}-category.jpg" | |
| convert "${pic}" -interlace Plane -sampling-factor 4:2:0 -quality 84% -strip -resize 70x70 "${pic%.*}-small.jpg" | |
| convert "${pic}" -interlace Plane -sampling-factor 4:2:0 -quality 84% -strip -resize 1200x732 "${pic%.*}-thickbox.jpg" | |
| done |
| #!/usr/bin/env sh | |
| if [ -f "$1" ] ; then | |
| echo "Geotaging non geolocated pictures" | |
| # Find only non geolocated pictures | |
| exiftool -geotag $1 -overwrite_original -if 'not $gpslongitude' * | |
| else | |
| echo "Skiping geolocating picture due to not track provided." | |
| echo " Provide track with 'renamepics.sh track.gpx'\n" | |
| fi | |
| echo "\nRenaming pictures" |
| exiftool -geotag track.gpx *.JPG |
| defmodule HappoWeb.ContextHelpers do | |
| @moduledoc """ | |
| # SETUP FUNCTIONS | |
| # | |
| # Example: setup [:fun_one, :fun_two] | |
| # | |
| # These functions help to prepare a test before execution. They | |
| # receive a map with the context, returns `{:ok, new_context}`, and are | |
| # chainable between them. | |
| # |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. |