Skip to content

Instantly share code, notes, and snippets.

@ivanxuu
ivanxuu / chuleta.torquebox.md
Last active August 29, 2015 14:15
Torquebox

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

@ivanxuu
ivanxuu / jruby_opts
Last active August 29, 2015 14:19
jruby options for faster startup time
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
@ivanxuu
ivanxuu / puma.sh
Last active December 19, 2015 09:08 — forked from runlevel5/puma.sh
#! /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
@ivanxuu
ivanxuu / 1. Example.sass
Last active December 25, 2015 14:59 — forked from Integralist/1. Example.scss
css 3 animations using sass syntax. Examples provided
+keyframe(fadeout)
0%
opacity: 1
100%
opacity: 0
+keyframe(changecolor)
0%
color: #000
100%
@ivanxuu
ivanxuu / geolocate pics using exiftool
Created January 25, 2016 10:55
geolocate pics using exiftool
exiftool -geotag track.gpx *.JPG
@ivanxuu
ivanxuu / rename-pics.sh
Last active February 6, 2016 11:52
rename pictures using exiftool conditionaly for geolocated pictures
#!/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"

Ultimos cambios en comemejor

  • Añadida pagina de changelog (09/06/2017). Página que muestra las últimas modificaciones en la web de comemejor
  • Columna de planificador de recetas en la pagina de recetas (08/06/2017). Esta columna permite añadir las recetas al planificador a la vez que estan visibles en la pantalla.
@ivanxuu
ivanxuu / context_helpers.ex
Created October 24, 2017 10:52
context setup functions elixir
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.
#
@ivanxuu
ivanxuu / phoenix.chuleta.md
Created November 21, 2017 17:27
Chuleta phoenix

ASSETS

Como añadir una librería de JS a phoenix?

  1. Instala la dependencia con assets/$ npm install --save jquery

  2. El fichero package.json se actualizará

  3. Puede que necesites cambiar el fichero brunch-config.js. Por ejemplo con jQuery si necesitas el $ disponible en todos los sitios

    npm: { enabled: true,

@ivanxuu
ivanxuu / Vagrantfile
Created January 5, 2018 17:01
Deploy elixir cluster using vagrant as an example
# -*- 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.