Skip to content

Instantly share code, notes, and snippets.

View rbrto's full-sized avatar

Roberto Esparza rbrto

View GitHub Profile
@jpalala
jpalala / how-to-setup-mac-elasticsearch.md
Created September 11, 2015 08:28
setting up elasticsearch on your mac with brew

Install va homebrew

If you don't have homebrew installed - get homebrew here

Then run: brew install elasticsearch

Configuration

Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml.

@rickbacci
rickbacci / background_workers.markdown
Last active October 29, 2016 14:36
Background Workers
@maxivak
maxivak / 00.md
Last active September 15, 2025 13:09
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@joekr
joekr / Dockerfile-Nginx
Last active January 9, 2025 12:22
Kubernetes + Rails (NGINX & Unicorn) on GCE
# Set nginx base image
FROM nginx
# Copy custom configuration file from the current directory
COPY nginx.conf /etc/nginx/nginx.conf
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active January 9, 2025 12:22
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@mrcrilly
mrcrilly / netdata.yml
Created June 21, 2016 06:34
netdata Ansible Playbook
---
- name: Install netdata on a Linux host
hosts: all
become: true
tasks:
- name: Install depdendencies
yum:
name: "{{item}}"
state: present
@vdeville
vdeville / Tuto Nginx SSL Cerbot Let's Ecnrypt.yml
Last active January 30, 2017 19:43
Tuto Nginx SSL Cerbot Let's Ecnrypt
# /etc/nginx/sites-available/www.valentin-deville.eu
# Redirection de http sur https
server {
listen 80;
server_name www.valentin-deville.eu;
rewrite ^ https://$server_name$request_uri? permanent;
}
@caalberts
caalberts / deploy.yml
Last active December 31, 2023 21:04
Ansible Playbook to Deploy Rails to AWS
---
# Deploy rails app from localhost to remote servers
- name: Set up AWS infrastructure
hosts: localhost
connection: local
roles:
- setup_aws
- name: Package app
redis:
image: redis:3.0.5
expose:
- 6379
volumes:
- redis:/var/lib/redis/data
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
@PavloBezpalov
PavloBezpalov / 1. ELK.install
Last active January 5, 2024 16:14
ELK Stack with Rails (Elasticsearch, Logstash, Kibana) on Ubuntu VPS
INSTALL JAVA
$ sudo apt-get update && sudo apt-get install default-jre
INSTALL ELASTIC SEARCH https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
$ wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
$ echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
$ sudo apt-get update && sudo apt-get install elasticsearch
$ sudo update-rc.d elasticsearch defaults 95 10
$ sudo service elasticsearch restart
$ sudo service elasticsearch status