This file contains 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
# Per http://www.ubuntuupdates.org/ppa/google_chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
This file contains 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
cat /etc/uwsgi/apps-enabled/royal.ini | |
cat /etc/nginx/sites-available/royal_production | |
cat /etc/supervisord.conf | |
cat /home/ubuntu/newrelic/newrelic.ini |
This file contains 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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
This file contains 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
sudo apt-get install mysql-server | |
sudo apt-get install mysql-client | |
sudo apt-get install libmysqlclient-dev // for environment development | |
sudo /etc/init.d/mysql restart | |
### crear base de datos con root y asignar permisos | |
mysql -u root -p | |
Enter password: |
This file contains 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
require File.join(File.dirname(__FILE__), 'deploy/nginx') | |
require File.join(File.dirname(__FILE__), 'deploy/log') | |
default_run_options[:pty] = true | |
set :ssh_options, { :forward_agent => true } | |
set :application, "appname" | |
set :repository, "git@giturl" | |
set :scm, :git |
This file contains 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
<h2>Sign up</h2> | |
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> | |
<%= devise_error_messages! %> | |
<div><%= f.label :email %><br /> | |
<%= f.email_field :email, :autofocus => true %></div> | |
<div><%= f.label :password %><br /> | |
<%= f.password_field :password %></div> |
This file contains 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
class User < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
ROLES = %w[admin moderator author banned] | |
def roles=(roles) | |
self.roles_mask = (roles & ROLES).map { |r| 2**ROLES.index(r) }.inject(0, :+) |
This file contains 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
<h2>Edit <%= resource_name.to_s.humanize %></h2> | |
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> | |
<%= devise_error_messages! %> | |
<div><%= f.label :email %><br /> | |
<%= f.email_field :email, :autofocus => true %></div> | |
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | |
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> |
This file contains 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
Primer paso: | |
Instalar el RVM (ruby version manager), es quien te maneja o administra las versiones de ruby y sus dependencias que hacen posible que se pueda codificar en ruby. | |
(cURL herramienta de transferencia de datos, para descargar el RVM de la página oficial) | |
$ sudo apt-get install curl | |
Segundo paso: | |
(Hacemos la descarga del RVM de la pagina oficial de http://rvm.io/) |
This file contains 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
Cambiar el author de todos los commits: | |
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Newname'; GIT_AUTHOR_EMAIL='newemail'; GIT_COMMITER_NAME='Newname'; GIT_COMMITTER_EMAIL='newemail';" HEAD |