Skip to content

Instantly share code, notes, and snippets.

View dfuentes77's full-sized avatar
🏠
Working from home

Damian Fuentes dfuentes77

🏠
Working from home
View GitHub Profile
@mhart
mhart / ci.yml
Last active May 23, 2022 04:36
GitHub Actions running 5 tslint jobs in parallel (each tests every 5th file)
name: CI
on: [push]
jobs:
tslint:
runs-on: ubuntu-latest
strategy:
matrix:
job: [0, 1, 2, 3, 4]
@johntoups
johntoups / jq_examples.md
Last active September 11, 2023 14:38 — forked from rhelmer/gist:a49cc673ad20a1e7fb56
aws-cli + jq
@equivalent
equivalent / add_ip.sh
Created September 29, 2017 16:54
AWS EC2 security group add current IP and remove old IP
myip=$(dig +short myip.opendns.com @resolver1.opendns.com) # this will fetch my current IP
#myip=$(curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//')
mkdir -p "./tmp"
touch "./tmp/old_ip.txt"
removing_ip=$(cat ./tmp/old_ip.txt)
adding_ip=$myip
echo $adding_ip > ./tmp/old_ip.txt
@ajbrown
ajbrown / letmein.sh
Last active March 19, 2021 07:04
Update a set of security groups, allowing SSH access from your current public IP address.
#!/usr/bin/env bash
#
# Add the security groups you want to allow the current IP address
# SSH access to by updating the "groups" array below. The user
# running the script must have the aws-cli installed and configured.
# Their credentials will be used for API calls, so access should be
# controlled that way.
#
# Note: It's a good idea to clean up these security groups regularly.
# I prefer to have a security group that I can remove all ingress rules
@manicminer
manicminer / info.md
Last active November 1, 2018 22:44
RDS Production termination protection

RDS Production Termination Protection

Create a policy like this, substituting your AWS account number, then attach it to all groups and roles. It will prevent deletion of RDS instances containing the string "prod" in their name.

Note: This is intended to prevent accidental deletion, and is easily sidestepped.

@btroncone
btroncone / rxjs_operators_by_example.md
Last active September 14, 2025 16:48
RxJS 5 Operators By Example
@aaronshaf
aaronshaf / paas.txt
Created December 4, 2015 17:05
Docker-Based Micro-PaaS
otto
https://ottoproject.io/
https://github.com/hashicorp/otto
deis
https://deis.com/
https://github.com/deis/deis
has 5 full-time devs
flynn
@iKazuyoshi
iKazuyoshi / add-headers-more.sh
Created November 17, 2015 06:32
Add headers more for Amazon Linux
#!/usr/bin/env bash
NGINX_VER=1.6.3
HEADERS_MORE_VER=0.28
PWD=`pwd`
cd /usr/local/src
# get nginx source.
wget http://nginx.org/download/nginx-${NGINX_VER}.tar.gz
@darron
darron / gist:5f0b869d5e309db26ad3
Created April 8, 2015 17:33
AWS user-data for automatically registering with a Chef Server.
#!/bin/bash
apt-get update
apt-get -y upgrade
# Install s3cmd to get the validation.pem
pip install python-dateutil
cd /tmp
wget https://github.com/s3tools/s3cmd/releases/download/v1.5.2/s3cmd-1.5.2.tar.gz
tar -xf s3cmd-1.5.2.tar.gz
@ibanez270dx
ibanez270dx / prompt.sh
Last active August 29, 2015 14:17
Bash Prompt -- Git, RbEnv, etc...
#!/usr/bin/env bash
# Examples:
#
# ps1_set --prompt ∴
#
# This will yield a prompt like the following, for example,
#
# 00:00:50 jeff@edison:~/dev/humani.se (git:master:156d0b4) ruby-2.2.0