Skip to content

Instantly share code, notes, and snippets.

View nicksantamaria's full-sized avatar

Nick Santamaria nicksantamaria

View GitHub Profile
@simesy
simesy / config-export-http.sh
Last active December 6, 2019 04:44
Export remote config without drush or db.
#!/bin/bash
DOMAIN=${1:-"missing"}
if [[ ${DOMAIN} = "missing" ]] ; then
echo "Pass a Drupal site please, like https://example.com"
exit 1
fi
echo "What is your user name for ${DOMAIN}:"
read USER
@chrodriguez
chrodriguez / dockerhub-readme-update.sh
Last active November 10, 2022 21:39
How to update dockerhub readme automatically
#!/bin/bash
usage() {
if [ ! -z $1 ]; then
echo -e "ERROR:\n" 1>&2
fi
echo "Usage: $0 -f /path/to/README.md -u dockerhub-username [-r dockerhub-repo-prefix] -n repo-name" 1>&2
exit 1;
}
while getopts ":r:u:f:n:" o; do
@nicksantamaria
nicksantamaria / run.sh
Last active February 26, 2021 01:12
Boilerplate bash script
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
#/ Usage:
#/ Description:
#/ Examples:
#/ Options:
#/ --help: Display this help message
usage() { grep '^#/' "$0" | cut -c4- ; exit 0 ; }
@so0k
so0k / kubectl.md
Last active March 22, 2024 13:03
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@natelandau
natelandau / .bash_profile
Last active March 20, 2024 22:19
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jedi4ever
jedi4ever / dns tuning ssh login speedup vagrant
Created May 27, 2013 13:37
speeding up DNS/SSH connections in vagrant
- Tune /etc/ssh/sshd_config
UseDNS no # Disable DNS lookups
GSSAPIAuthentication no # Disable negotation of slow GSSAPI
don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it
- Tune Vagrantfile
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
@cbmd
cbmd / default.conf
Created December 9, 2012 21:13
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
@aarongustafson
aarongustafson / responsive-iframes.css
Created October 25, 2011 17:07
Responsive iFrames with jQuery
iframe {
max-width: 100%;
}