Skip to content

Instantly share code, notes, and snippets.

Daniel Serodio dserodio

Block or report user

Report or block dserodio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
santisbon / Search my
Last active Nov 11, 2019
How to search gists
View Search my

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.

Find all gists with a .yml extension.

Find all gists with HTML files.

bvis / Jenkinsfile
Last active Nov 12, 2019
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
View Jenkinsfile
pipeline {
agent { node { label 'swarm-ci' } }
environment {
SLACK_CHANNEL = "#deployment-notifications"
#! /bin/bash
set -euo pipefail
# This script will remove automatic association for all networks not listed in the whitelist
# passed as the first argument. Passwords will NOT be removed from the Keychain.
# Alternatively, you can untick "Remember networks" in Network Preferences > Wi-Fi > Advanced,
# but then you won't be able to auto-join networks even temporarily, and you might already
# have a long list to go through.
citrusui /
Last active Nov 19, 2019
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<summary>How do I dropdown?</summary>
This is how you dropdown.
dserodio /
Last active Nov 29, 2018
ps(1) tips and tricks
# show process start time for a give PID (GNU ps)
ps -o lstart= -p $PID
# show process start time for all processes (GNU ps)
ps ax -O lstart
# show process environment variables (BSD grep)
ps -Eww -p $PID
alecl /
Last active Apr 11, 2017 — forked from lamont-granquist/
Forked and adjusted notes for creating a sample cookbook and running it through test kitchen with docker.

ChefDK, Test Kitchen Driven NTP Cookbook via Docker

This gist is a fork from lamont-granquist modified to be even easier and faster by taking advantage of Docker. Given the rapid development and change rate of Chef finding this gist with instructions that still are valid and reasonable was much appreciated.

This gist uses TK+Berkshelf to drive creating a vagrant virts and converging a simple recipe to install and configure NTPd. This is a simple cookbook that has one recipe, one template (for ntp.conf) and one attribute file. It works on Ubuntu 12.04/14.04 and CentOS 6.4/7.1 (and derviatives) and the attribute file is used to support both distros.

This should work on Mac (where I developed it) and any chef-supported Linux that you can get Docker onto (Ubuntu/CentOS).

Because I use ChefDK and Test Kitchen, I can largely ignore setting up Docker and Berkshelf and can get right to work on writing recipe code.

koreno /
Last active Oct 17, 2019
'rebaser' improves on 'git rebase -i' by adding information per commit regarding which files it touched.


git-prebase improves on 'git rebase -i' by adding information per commit regarding which files it touched.

  • Each file gets an alpha-numeric identifier at a particular column, a list of which appears below the commit list. (The identifiers wrap around after the 62nd file)
  • Commits can be moved up and down safely (without conflicts) as long as their columns don't clash (they did not touch the same file).


Add the executable to your path and git will automatically expose it as

jerrac / gitlab2elk.yml
Created Mar 23, 2015
Logstash and Logstash-Forwarder config for GitLab logs
View gitlab2elk.yml
# YAML config for these Ansible roles:
# Since it's just straight config blocks, you should be able to just copy and paste what you need if you don't use
# those Ansible roles.
# End result is multiline logs combined into one, and dates are parsed correctly.
function setjava {
local vmdir=/Library/Java/JavaVirtualMachines
local ver=${1?Usage: setjava <version>}
export JAVA_HOME=`/usr/libexec/java_home -v $ver`
PATH=$(echo $PATH | tr ':' '\n' | grep -v $vmdir | tr '\n' ':')
export PATH=$JAVA_HOME/bin:$PATH
java -version
anonymous / gist:223853355d67123fdda8
Created Oct 22, 2014
EC2 ssh tunnel bash script
View gist:223853355d67123fdda8
# Start/stop an EC2 instance for use as an ssh tunnel
# requires the aws package locally -- sudo apt-get install awscli
# usage: ./ start (spin up EC2 and create the tunnel)
# ./ stop (terminate the EC2 instance to save money)
# ./ resume (in case your tunnel is interrupted but the EC2 instance is still running)
You can’t perform that action at this time.