Skip to content

Instantly share code, notes, and snippets.

View cloudnull's full-sized avatar
👨‍🚒
Yup

Kevin Carter cloudnull

👨‍🚒
Yup
View GitHub Profile
@voidus
voidus / flake.nix
Created April 22, 2023 18:35
Build a cloudinit image in nixos
{
description = "A nixos cloudinit base image without nixos-infect";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
@jpmens
jpmens / arpaname.py
Created December 1, 2022 15:10
Ansible filter convert IP to arpaname
# arpaname.py, (C)2022 by Jan-Piet Mens <jp@mens.de>
# Convert an IPv4 or IPv6 address in textual form into a string whose value is
# the reverse-map domain name of the address.
#
# - debug: msg="{{ "192.168.1.3" | arpaname }}"
# "3.1.168.192.in-addr.arpa."
#
# - debug: msg="{{ "2001:DB8::7" | arpaname }}"
# "7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa."
@ahallora
ahallora / README.md
Created January 1, 2021 21:28
Streambeats Dropbox audio preview snippet

Streambeats Dropbox audio preview snippet

Why?

Harris (https://twitter.com/HarrisHeller) has done a remarkable job with Streambeats (https://www.streambeats.com) and the massive library of high quality music for your streaming needs. The library was so vast that I didn't want to just download everything and listen to it locally, so instead I did what every programmer would do. I did a small code snippet to add a preview pane to the Dropbox experience.

How?

  1. Copy the snippet below
  2. Enter a folder in Dropbox containing music files; e.g. https://www.dropbox.com/sh/1cgxqyptl2jq8f5/AAAeQ1i1rwAV6zIDNN2VHJY6a/8.%20White?dl=0&subfolder_nav_tracking=1
  3. Switch to table view in the folder view
  4. Press CTRL+SHIFT+I (Windows) / CMD+SHIFT+I (Mac) to open Chrome Developer Tools
@sjenning
sjenning / origin-gce-hosts.md
Created November 9, 2016 21:47
GCE openshift-ansible inventory
[OSEv3:children]
masters
nodes

[OSEv3:vars]
ansible_ssh_user=sjennings
ansible_become=yes

deployment_type=origin
@kstrauser
kstrauser / freezewheels.py
Created August 29, 2013 17:45
This works like a hypothetical "pip freezewheels" that makes wheels of all installed packages.
#!/usr/bin/env python
"""
Build wheels of all currently installed packages (as listed by "pip freeze")
"""
import glob
import importlib
from subprocess import call
@winhamwr
winhamwr / tutorial.md
Created June 4, 2012 22:37
Creating a repeatable, dynamic site to site VPN with OpenSwan on Ubuntu 10.04 from Amazon EC2

Creating a dynamic site-to-site VPN with OpenSwan on Ubuntu 10.04 on EC2

Wes Winham winhamwr@gmail.com

There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.

@skull-squadron
skull-squadron / gist:952660
Created May 3, 2011 01:18
Restart ssh-agent
killall ssh-agent; eval `ssh-agent`
@iangreenleaf
iangreenleaf / rsync-retry.sh
Created January 18, 2010 07:12
rsync with retries
#!/bin/bash
### ABOUT
### Runs rsync, retrying on errors up to a maximum number of tries.
### Simply edit the rsync line in the script to whatever parameters you need.
# Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit;" SIGINT SIGTERM
MAX_RETRIES=50