Skip to content

Instantly share code, notes, and snippets.

@privateip
privateip / gist:d0fd3c6459c5e1a4c1f9dceeb018b109
Created October 2, 2016 01:26
playbook to backup network device running configuration to local file
---
- hosts: ios
connection: local
vars:
backup_root: /tmp/backups
cli:
host: "{{ inventory_hostname }}"
username: cisco
@wido
wido / radosgw-gc-bucket-indexes.sh
Created November 15, 2018 12:38
Ceph RADOS Gateway bucket index garbage collection
#!/bin/bash
#
# Find orphaned bucket index objects in the RGW bucket index pool
# and clean them up if they do not belong to a bucket
#
# Author: Wido den Hollander <wido@42on.com>
#
INDEX_POOL=$1
@rfairburn
rfairburn / .vpn_helpers.sh
Last active November 8, 2022 03:16
Mac OS X command-line VPN Helpers
#!/bin/bash
# Source this file in your .bash_profile e.g.:
#
# source ~/gitcheckouts/vpn_heplers/.vpn_helpers.sh
#
# Note: This script works best with NOPASSWD: ALL configured in your sudoers file:
# /etc/sudoers:
# %admin ALL=(ALL) NOPASSWD: ALL
#
@willfurnass
willfurnass / sge_cheatsheet.md
Last active April 19, 2023 15:00
(Son of) Grid Engine tips and tricks

Random Grid Engine tips and tricks

The following work with Son of Grid Engine (SGE) 8.1.9 as configured on the University of Sheffield's ShARC and Iceberg clusters.

Jobs with dependancies

You can use the -hold_jid <<job-name or job-name>> option to make jobs run only when other jobs have finished, rather than having jobs start and sit waiting for other tasks to complete.

@jagtesh
jagtesh / split_tunneling.md
Created May 7, 2013 09:06
Split Tunneling tutorial - with openconnect (tested, works with Cisco AnyConnect VPN) Source: http://lists.unix-ag.uni-kl.de/pipermail/vpnc-devel/2009-February/002990.html

Table of Contents

  1. DISCLAIMER 2. Status 3. Introduction 4. Security issues 5. DNS
@hgomez
hgomez / download-java8.sh
Created March 19, 2014 20:39
wget to download Java 8
wget --continue --no-check-certificate -O jdk-8-linux-x64.tar.gz --header Cookie: oraclelicense=a http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.tar.gz
@Flamefire
Flamefire / deptree2exts_list.py
Last active September 12, 2023 11:07 — forked from boegel/deptree2exts_list.py
Find order of dependencies of a python package, put both into a PATH accessible folder (e.g. ~/.local/bin) and make executable
#!/usr/bin/env python
import json
import sys
import pkg_resources
from pprint import pprint
if len(sys.argv) != 3:
sys.stderr.write("ERROR: Usage: %s <path to JSON file with output of `pipdeptree -j <pkg>`> <pkg name>\n" % sys.argv[0])
sys.exit(1)
@ebal
ebal / cloud-init.sh
Created November 18, 2018 10:10
Cloud-init example using a Generic Cloud CentOS-7 on a libvirtd qmu/kvm lab
#!/bin/sh
if [ "$EUID" -ne 0 ]; then
echo -e "\nPlease run as root\neg. sudo $0 \n"
exit
fi
GITHUB_USERNAME="ebal"
cd `mktemp -d`
@louiszuckerman
louiszuckerman / gfid-resolver.sh
Last active November 29, 2023 10:01
Glusterfs GFID Resolver Turns a GFID into a real path in the brick
#!/bin/bash
if [[ "$#" < "2" || "$#" > "3" ]]; then
cat <<END
Glusterfs GFID resolver -- turns a GFID into a real file path
Usage: $0 <brick-path> <gfid> [-q]
<brick-path> : the path to your glusterfs brick (required)
@Be-El
Be-El / gist:3e0fb17ace7a899e1fdb0f15d4ab5fed
Created September 18, 2023 11:35
cinder ceph volume migration
#!/usr/bin/env perl
use strict;
use warnings;
use autodie qw(:all);
use Nice::Try;
use JSON;
# script to migrate cinder volumes from one backup to another backend