Skip to content

Instantly share code, notes, and snippets.

View jaimerodas's full-sized avatar

Jaime Rodas jaimerodas

View GitHub Profile
@jaimerodas
jaimerodas / uber.rb
Last active August 29, 2015 14:08
Scriptsito para decirme los precios de Uber
#! /usr/bin/env ruby
begin
require 'httparty'
require 'json'
end
pos = {lat: 0.00, lon: 0.00}
datos = {
@jaimerodas
jaimerodas / recursos.md
Last active January 23, 2021 19:32
Recursos
@jaimerodas
jaimerodas / install.sh
Last active March 12, 2016 00:48 — forked from bobthecow/install.sh
Install PHP on OS X
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
# Xcode CLT *must* be installed
# https://github.com/Homebrew/homebrew-php/issues/1946
xcode-select --install
# Install PHP
brew install php56 --with-pear
@jaimerodas
jaimerodas / php.conf
Created March 12, 2016 01:22
Default PHP nginx conf
server {
server_name site.dev;
root /domains/www; ## <-- Your only path reference.
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
#!/bin/bash
clear
~/letsencrypt/letsencrypt-auto renew --email [email protected] --agree-tos >> /var/log/le-renew.log
service nginx reload
echo "Renovación de Certificados"
@jaimerodas
jaimerodas / letsencrypt.md
Last active July 18, 2016 17:47
Cómo encriptar Nginx con Let's Encrypt

Encriptar gratis con Let's Encrypt

Necesitamos un servidor con Ubuntu 14.04 con un usuario con privilegios de sudo. Ya debemos tener registrado el dominio que queremos proteger, si no, puedo recomendar ampliamente usar a estos cuates.

Let's Encrypt valida los dominios a través de A Records así que ya debes tener los registros creados para los dominios que quieres certificar.

sudo apt-get update
sudo apt-get -y install git bc nginx
@jaimerodas
jaimerodas / quicklook.sh
Last active May 18, 2016 14:05
Quick Look Plugins
# Instalamos plugins de Quick Look
brew cask install qlimagesize qlcolorcode betterzipql quicklook-csv quicklook-json
# Reiniciamos el servicio de Quick Look
qlmanage -r
@jaimerodas
jaimerodas / default.conf
Last active June 11, 2016 20:34
Set up Ubuntu 14.04 con Digital Ocean
upstream app {
server 127.0.0.1:3000 fail_timeout=0;
}
server {
listen 443 ssl;
server_name example.com www.example.com;
ssl_certificate /etc/letsencrypt/live/www.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.example.com/privkey.pem;
@jaimerodas
jaimerodas / postgres.sh
Last active June 11, 2016 20:52
Setup de PostgreSQL 9.3 en Ubuntu 14.04
sudo apt-get update
sudo apt-get install -y build-essential git
sudo apt-get install postgresql
# https://www.digitalocean.com/community/tutorials/scaling-ruby-on-rails-setting-up-a-dedicated-postgresql-server-part-3
sudo vim /etc/postgresql/9.3/main/postgresql.conf # Para aceptar conexiones de todas las ips
sudo vim /etc/postgresql/9.3/main/pg_hba.conf # Para restringir quién se puede loginear
@jaimerodas
jaimerodas / cap.md
Last active June 21, 2016 02:35
Capistrano, Rails, rbenv

Cómo usar Capistrano con Rails, nginx, puma, y rbenv

Primero hay que agregar las siguientes líneas a la sección de development en el Gemfile

  gem 'capistrano',         require: false
  gem 'capistrano-rbenv',   require: false
  gem 'capistrano-rails',   require: false
  gem 'capistrano-bundler', require: false
 gem 'capistrano3-puma', require: false