Skip to content

Instantly share code, notes, and snippets.

View sanderv32's full-sized avatar
🎯
Focusing

Alexander sanderv32

🎯
Focusing
View GitHub Profile
@sanderv32
sanderv32 / sshpass.rb
Last active March 14, 2022 20:24 — forked from cloverstd/sshpass.rb
brew install sshpass
require 'formula'
class Sshpass < Formula
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.09/sshpass-1.09.tar.gz'
homepage 'http://sourceforge.net/projects/sshpass'
sha256 '71746e5e057ffe9b00b44ac40453bf47091930cba96bbea8dc48717dedc49fb7'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"

Keybase proof

I hereby claim:

  • I am sanderv32 on github.
  • I am sanderv32 (https://keybase.io/sanderv32) on keybase.
  • I have a public key ASC0zIhkd2XJSJkMxtiWJBlASltRZ6EErExCQDJtjnUbzAo

To claim this, I am signing this object:

@sanderv32
sanderv32 / cs-vpn.sh
Created February 1, 2017 13:03
Example of how to use CloudMonkey to list/restart VPN's
#!/usr/bin/env bash
CM=$(which cloudmonkey)
function usage() {
APP=$(basename $0)
echo "Usage: $APP -h | -l | -v | -r <vpn-id> | -a"
echo " -h = Show help"
echo " -l = List disconnected VPN's"
echo " -v = List all VPN's"
@sanderv32
sanderv32 / timestamp.rb
Created April 26, 2016 19:46 — forked from ph3nx/timestamp.rb
Handy method to get the current unix time stamp in Ruby. Unix time, or POSIX time, is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.
def timestamp
Time.now.to_i
end
@sanderv32
sanderv32 / pedantically_commented_playbook.yml
Created February 6, 2016 15:37 — forked from marktheunissen/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.