This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OUTPUT="$(rails secret RAILS_ENV=production)" | |
SECRET="SECRET_KEY_BASE=${OUTPUT}" | |
echo $SECRET >> ~/.profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bundle install | |
OUTPUT="$(rails secret RAILS_ENV=production)" | |
SECRET="SECRET_KEY_BASE=${OUTPUT}" | |
echo $SECRET >> ~/.profile | |
rails db:migrate RAILS_ENV=production | |
rails db:seed RAILS_ENV=production | |
rails assets:precompile RAILS_ENV=production |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "forwarded_port", guest: 3000, host: 3002 | |
config.vm.network "forwarded_port", guest: 3306, host: 3004 | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.synced_folder ".", "/home/vagrant/apps" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/inflections.rb | |
# Ruby on Rails inflections | |
# | |
# Common inflections for Spanish MX (es-MX). | |
# Flexiones más comunes para español México. | |
# | |
ActiveSupport::Inflector.inflections(:"es-MX") do |inflect| | |
############# Reglas generales |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#instalar browser-sync | |
npm install -g browser-sync | |
#iniciar browser-sync | |
browser-sync start --proxy 192.168.33.10:3000 --files "app/assets/stylesheets/**/*.scss, app/views/**/*.html.erb" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#instalar nodemon (en la máquina virtual) | |
sudo npm install -g nodemon | |
#copiar nodemon.json al directorio del proyecto | |
#copiar rails.sh al directorio del proyecto | |
#dar permisos de ejecución a rails.sh | |
sudo chmod +x rails.sh | |
#iniciar nodemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
import { isBlank } from "@ember/utils"; | |
export default Controller.extend({ | |
searchKeyword: "", | |
updateList: Ember.computed('searchKeyword', function(){ | |
var keyword = this.get('searchKeyword') | |
var regex = new RegExp(keyword, "gi"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timedatectl set-timezone America/Asuncion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://sources.voidlinux.eu/freetds-1.00.23/freetds-1.00.23.tar.gz | |
or https://distfiles.macports.org/freetds/freetds-1.00.23.tar.bz2 | |
tar -zxvf freetds-1.00.23.tar.gz | |
or tar -jxvf | |
Then | |
cd freetds-1.00.23/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.3.3 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
RUN mkdir /myapp | |
WORKDIR /myapp | |
COPY Gemfile /myapp/Gemfile | |
COPY Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install | |
EXPOSE 3000 | |
VOLUME /myapp | |
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"] |
OlderNewer