Skip to content

Instantly share code, notes, and snippets.

@ns408
ns408 / gist:97b1db4847e844484c15
Last active August 29, 2015 14:01
/etc/r10k.yaml unable to use '/tmp/dir' as remote:
###Checkout a github repository with r10k layout:###
[root@itq tmp]# pwd
/tmp
[root@itq tmp]# rm -rf /tmp/puppet-r10k
[root@itq tmp]# git clone --bare https://github.com/ns408/puppet-r10k puppet-r10k
Initialized empty Git repository in /tmp/puppet-r10k/
{
"Statement": [
{
"Action": [
"route53:ChangeResourceRecordSets",
"route53:GetHostedZone",
"route53:ListResourceRecordSets"
],
"Effect": "Allow",
"Resource": [
class { '::mongodb::globals': manage_package_repo => $manage_package_repo, } ->
class { '::mongodb::server':
bind_ip => "0.0.0.0",
auth => true,
} ->
class { '::mongodb::client': }
$databasename = hiera('mongo_databasename', "mongo_databasename")
$databaseuser = hiera('mongo_databaseuser', "mongo_databaseuser")
$databasepass = hiera('mongo_databasepass', "mongo_databasepass")
@ns408
ns408 / bootstrap.sh
Created April 1, 2016 12:20 — forked from christianberg/bootstrap.sh
Script to install Docker on a Ubuntu 13.04 host
#/bin/bash
set -e
echo "=== Activating Firewall (only SSH allowed) ==="
ufw allow ssh
ufw --force enable
if [ ! -f /swapfile ]; then
echo "=== Activating swap ==="
fallocate -l 1G /swapfile
@ns408
ns408 / README.md
Created April 14, 2017 04:54 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@ns408
ns408 / osx_install.sh
Created August 15, 2017 07:40 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@ns408
ns408 / A.markdown
Created February 20, 2018 13:38 — forked from larrybotha/A.markdown
Merge wiki updates that are on a fork of your repo.

Merge Wiki Changes From A Forked Github Repo

This is inspired (or basically copied) from How To Merge Github Wiki Changes From One Repository To Another, by Roman Ivanov, and serves to ensure that should something happen to the original article, the information remains nice and safe here.

Terminology

OREPO: original repo - the repo created or maintained by the owner

FREPO: the forked repo that presumably has updates to its wiki, not yet on the OREPO

@ns408
ns408 / monit.myapp.conf
Created February 24, 2018 00:45 — forked from joeyimbasciano/monit.myapp.conf
Monit configuration file to check HTTP service listening on port 9009 and recovery from DNS failures
check host appsrv1 with address 127.0.0.1
start program = "/sbin/start myapp"
stop program = "/sbin/stop myapp"
alert [email protected] on {timeout,connection}
if failed port 9009 protocol HTTP
request /
with timeout 3 seconds
then restart
if 10 restarts within 10 cycles then timeout
if 10 restarts within 10 cycles then exec "/usr/bin/monit start aws-dns-healthcheck"
@ns408
ns408 / pid-file-daemon.sh
Created February 24, 2018 01:48 — forked from rodw/pid-file-daemon.sh
Bash script that uses a PID file to add daemon-like start/stop/status behavior to an arbitrary program.
#!/bin/bash
# Uses a PID file to add daemon-like behavior to an arbitrary program.
################################################################################
usage() {
echo "Usage: `basename $0` PROGRAM {start|stop|restart|force-stop|force-restart|status} [PIDFILE|PID]" >&2
echo "Where: PROGRAM is an executable file." >&2
echo " PIDFILE is the file that contains (or will contain) the PID." >&2
echo " PID is a process id to use in place of a PIDFILE." >&2
}
@ns408
ns408 / irc.md
Created March 6, 2018 10:05 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.