Skip to content

Instantly share code, notes, and snippets.

require "bundler/capistrano"
# General
set :application, "application_name"
set :domain, "www.your_domain.com"
set :user, "deploy"
set :runner, "deploy"
set :use_sudo, false
set :deploy_to, "/var/www/#{application}"
set :repository_cache, "#{application}_cache"
@ismarsantos
ismarsantos / ubuntu14.04-command-line-install-android-sdk
Created May 23, 2016 20:12 — forked from shark0der/ubuntu14.04-command-line-install-android-sdk
Ubuntu 14.04 command line install android sdk (platform & platform-tools only, no emulator)
# install java
apt-get install -y software-properties-common
apt-add-repository -y ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
# download latest android sdk
# http://developer.android.com/sdk/index.html#Other
cd /opt
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
Run this command to install MG-CLI:
sudo apt-get update && wget https://minergate.com/download/deb-cli -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb
to start miner (4 cores for BCN) use this command:
minergate-cli -user <YOUR@EMAIL.KAPPA> -bcn 4
Feel free to send some of your earnings to me:
BTC (Don't attempt to send other coins to this address!): 17f77AYHsQbdsB1Q6BbqPahJ8ZrjFLYH2j
@ismarsantos
ismarsantos / comoNaoDeixarNoVaucoNoWhatsapp.js
Created October 23, 2017 03:22 — forked from callmeloureiro/comoNaoDeixarNoVaucoNoWhatsapp.js
Como não deixar no vácuo no whatsapp
/*
Hoje não deixaremos mais ninguém no vácuo no whatsapp
Para utilizar:
- Abra o web.whatsapp.com;
- Abra o console e cole o código que está no gist;
- Aguarde e verá uma mensagem sendo enviada a cada momento que alguém te enviar alguma mensagem.
Confira também como ser chato no whatsapp: https://gist.github.com/mathloureiro/4c74d60f051ed59650cc76d1da0d32da
@ismarsantos
ismarsantos / __readme.md
Created December 6, 2017 01:07 — forked from maxivak/__readme.md
Tree with ancestry. Rails

Contents:

  • show full path for the item
  • show tree in ol li
  • show tree in dropdown select

Show full path for item

  • one item
@ismarsantos
ismarsantos / ubuntu_agnoster_install.md
Created December 6, 2017 15:47 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@ismarsantos
ismarsantos / dokku_setup.md
Created December 18, 2017 05:57 — forked from joshteng/dokku_setup.md
Using Dokku to deploy a Rails Application

#Goal Deploy your Rails App super easily with Dokku on Digital Ocean cheap cheap!

##Notes

  • Follow 12 factor design (include the rails_12factor gem)
  • Don't forget your Procfile with the command to start up your application server
  • I prefer using external hosted logging services like Logentries (not in this guide)
  • Set up performance monitoring AppSignal or New Relic (not in this guide)
@ismarsantos
ismarsantos / application_helper.rb
Created January 5, 2018 18:18
Ruby on Rails. Class "active" for menu items based on Path or Controller and Action names
module ApplicationHelper
def active_for(options = {})
name_of_controller = options[:controller] || nil
name_of_action = options[:action] || nil
request_path = options[:path] || nil
if request_path.nil?
if (name_of_action.nil? or name_of_action == action_name) and
name_of_controller == controller_name
'active'
@ismarsantos
ismarsantos / 1. README.md
Created April 14, 2018 22:58 — forked from sauloarruda/1. README.md
Configurando aplicação Rails com Nginx e Unicorn

Configurando aplicação Rails com Nginx e Unicorn

TL;DR Como configurar uma aplicação Rails usando Nginx + Unicorn + Upstart + RVM (gemset por aplicação).

Dependências: (TODO) Configuração de Servidor Nginx

Essas instruções são aplicáveis para o seguinte ambiente:

  • Sistema Operacional: Ubuntu Server 12.04 beta2
  • Servidor: AWS EC2 usando ESB AMI: ubuntu/images-milestone/ebs/ubuntu-precise-12.04-beta2-amd64-server-20120328 (ami-b5ea34dc)
@ismarsantos
ismarsantos / generate-ssh-key.sh
Created May 14, 2018 20:06 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa