Skip to content

Instantly share code, notes, and snippets.

View JohnMorales's full-sized avatar

John Morales JohnMorales

  • Northern Virginia
View GitHub Profile
@pepa65
pepa65 / .gitignore
Last active August 25, 2017 17:35
Improving update-grub (grub-mkconfig), only include versions that are included in the root partition's /lib/modules
10_linux
10_linux.new
10_linux.old
30_os-prober
30_os-prober.new
30_os-prober.old
@tony-gutierrez
tony-gutierrez / AWS_Single_LetsEncrypt.yaml
Last active March 7, 2024 11:29
AWS Elastic Beanstalk .ebextensions config for single instance free SSL using letsencrypt certbot and nginx. http://bluefletch.com/blog/domain-agnostic-letsencrypt-ssl-config-for-elastic-beanstalk-single-instances/
# 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!
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
@soardex
soardex / gist:e95cdc230d1ac5b824b3
Created May 9, 2015 01:15
Install rbenv in CentOS 7
# 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://github.com/sstephenson/rbenv.git .rbenv
git clone git://github.com/sstephenson/ruby-build.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
choppsv1 / tmux-24.diff
Last active December 21, 2018 15:25
True color (24-bit) terminal support for tmux-1.9a and tmux-2.0
This diff is a modified version of a diff written by Arnis Lapsa.
[ The original can be found here: https://gist.github.com/ArnisL/6156593 ]
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 https://gist.github.com/choppsv1/73d51cedd3e8ec72e1c1 patch)
to display 16 million colors while running in tmux.
The primary change I made was to support ":" as a delimeter as well
@ismell
ismell / README.md
Last active September 10, 2016 15:39
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
rgreenjr / postgres_queries_and_commands.sql
Last active April 23, 2024 19:14
Useful PostgreSQL Queries and Commands
-- 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
jessieay / ActiveRecord Cheat Sheet v1
Created July 17, 2012 19:55
Active Record cheat sheet with examples of queries I've needed most so far
ActiveRecord cheat sheet / EXAMPLES
INSTALL
=======
$ gem install activerecord
in GEMFILE: gem ‘activerecord’
REQUIRE
=======
require ‘active_record’
@shripadk
shripadk / gist:552554
Created August 27, 2010 00:59
Setting up Heroku Hostname SSL with GoDaddy SSL Cert
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