Skip to content

Instantly share code, notes, and snippets.

John Morales JohnMorales

  • Northern Virginia
Block or report user

Report or block JohnMorales

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pepa65 / .gitignore
Last active Aug 25, 2017
Improving update-grub (grub-mkconfig), only include versions that are included in the root partition's /lib/modules
View .gitignore
tony-gutierrez / AWS_Single_LetsEncrypt.yaml
Last active Jan 19, 2020
AWS Elastic Beanstalk .ebextensions config for single instance free SSL using letsencrypt certbot and nginx.
View AWS_Single_LetsEncrypt.yaml
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too.
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready!
Type: AWS::EC2::SecurityGroupIngress
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
View gist:e95cdc230d1ac5b824b3
# install build dependencies
sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
# clone and install rbenv environment
cd ~
git clone git:// .rbenv
git clone git:// ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
choppsv1 / tmux-24.diff
Last active Dec 21, 2018
True color (24-bit) terminal support for tmux-1.9a and tmux-2.0
View tmux-24.diff
This diff is a modified version of a diff written by Arnis Lapsa.
[ The original can be found here: ]
This diff adds support to tmux for 24-bit color CSI SRG sequences. This
allows terminal based programs that take advantage of it (e.g., vim or
emacs with patch)
to display 16 million colors while running in tmux.
The primary change I made was to support ":" as a delimeter as well
ismell /
Last active Sep 10, 2016
Docker Ubuntu upstart scripts

Production Ready Process Monitoring

  1. Install docker-manger.conf and docker-instance.conf in /etc/init

  2. Create a containers file in /etc/docker/ with the following format

     name: image cmd

    The name must be unique.

  3. sudo service docker-manager start

rgreenjr / postgres_queries_and_commands.sql
Last active Jan 22, 2020
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
jessieay / ActiveRecord Cheat Sheet v1
Created Jul 17, 2012
Active Record cheat sheet with examples of queries I've needed most so far
View ActiveRecord Cheat Sheet v1
ActiveRecord cheat sheet / EXAMPLES
$ gem install activerecord
in GEMFILE: gem ‘activerecord’
require ‘active_record’
shripadk / gist:552554
Created Aug 27, 2010
Setting up Heroku Hostname SSL with GoDaddy SSL Cert
View gist:552554
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS
You can’t perform that action at this time.