Skip to content

Instantly share code, notes, and snippets.

@heldner
heldner / sysctl.conf
Created February 12, 2016 08:17 — forked from kfox/sysctl.conf
Linux kernel tuning settings for large number of concurrent clients
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
@heldner
heldner / pedantically_commented_playbook.yml
Created May 24, 2016 14:53 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@heldner
heldner / Cliref.md
Created June 11, 2016 16:20 — forked from yunga/Cliref.md
CLIRef.md
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.bash/cliref.md
/    \  \/|    | |   ||       _/ __ \  __\    copy/paste from whatisdb
\     \___|__  |_|_  ||    |   \  __/|_ |   http://pastebin.com/yGmGiDQX
 \________  /_____ \_||____|_  /____  /_|     yunga.palatino@gmail.com
 20160515 \/ 1527 \/         \/     \/

alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'

@heldner
heldner / jenkins_pipeline_functions.groovy
Last active February 3, 2021 11:51
Jenkins fun in pipelines groovy
// run command inside container with bypass aws creds
def aws_cli_container (
String command,
String verbose='none',
String aws_cli_image='undefined',
String aws_credentials_id='unknown'
) {
docker.image(aws_cli_image).inside('--net=host') {
withCredentials([[
$class: 'AmazonWebServicesCredentialsBinding',
@heldner
heldner / tun.sh
Last active February 15, 2022 14:42
#!/bin/sh
if [ ! -z "$DEBUG" ]; then
set -x
SSH_LOGLEVEL="-o LogLevel=VERBOSE"
fi
# need to define TUNNEL_HOST, TUNNUM, MYIP
TUNNAME=tun${TUNNUM}