This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ $# -eq 0 ]; then | |
echo "please supply a servername: bootstrap-server.sh node.example.com" | |
exit 1 | |
fi | |
username=`whoami` | |
# copy public rsa key to server for root user | |
read -r -p "Transfer ssh public keys to server for root? [y/N] " response | |
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GITREMOTE=git://github.com/roundcube/roundcubemail.git | |
GITBRANCH=master | |
VERSION=1.1.0 | |
all: clean dist dependent framework | |
dist: roundcubemail-git toolchain | |
cp -r roundcubemail-git roundcubemail-$(VERSION) | |
(cd roundcubemail-$(VERSION); cp composer.json-dist composer.json) | |
(cd roundcubemail-$(VERSION); patch -p0 < ../dist.diff) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/bash | |
# shell script hardening | |
set -euf -o pipefail | |
# | |
# Lets Encrypt Certificate Generator | |
# https://calomel.org/lets_encrypt_client.html | |
# lets_encrypt.sh v0.04 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"mappings": { | |
"_default_": { | |
"_all": { | |
"enabled": true, | |
"norms": { | |
"enabled": false | |
} | |
}, | |
"dynamic_templates": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########### | |
# Script install and configure ELK stack Server and can be used for adding new clients to this stack. | |
# Last modified 3/3/2016 | |
# Author: Aljo Antony | |
########### | |
# Define colors in case we decide to use them | |
color() { | |
Red='\e[0;31m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance. | |
# | |
# Must be run with root privileges | |
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5) | |
# | |
export BUILD_DIR="$PWD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
for x | |
do | |
echo "Converting $x" | |
tr -d '\015' < "$x" > "tmp.$x" | |
mv "tmp.$x" "$x" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible_ssh_host | |
The name of the host to connect to, if different from the alias you wish to give to it. | |
ansible_ssh_port | |
The ssh port number, if not 22 | |
ansible_ssh_user | |
The default ssh user name to use. | |
ansible_ssh_pass | |
The ssh password to use (this is insecure, we strongly recommend using --ask-pass or SSH keys) | |
ansible_sudo_pass | |
The sudo password to use (this is insecure, we strongly recommend using --ask-sudo-pass) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# MongoDB-backed dynamic inventory script for Ansible | |
# http://docs.ansible.com/intro_dynamic_inventory.html | |
import os | |
from argparse import ArgumentParser | |
import pymongo |
OlderNewer