Skip to content

Instantly share code, notes, and snippets.

View cswingler's full-sized avatar

Chrys Swingler cswingler

View GitHub Profile
@cswingler
cswingler / community.general.proxmox_notes.md
Last active October 12, 2021 04:22
notes on the proxmox ansible inventory thing

so if you're trying to use the community.general.proxmox plugin:

first, install it:

ansible-galaxy collection install community.general
[inventory]
enable_plugins = community.general.proxmox
@cswingler
cswingler / ical_dlink.py
Last active July 6, 2018 20:15
Apple Calendar (iCal) to Timex Datalink script
@cswingler
cswingler / HELLO.ASM
Last active February 11, 2018 06:20
DEBUG.COM Hello World - Commented
; This can be run with DEBUG.COM: Run DEBUG.COM < HELLO.ASM.
; You'll get a HELLO.COM output that outputs "Hello world!"
; This was sourced from http://www2.latech.edu/~acm/helloworld/dosdebug.html, comments are mine.
; Switch to DEBUG.COM assemble mode:
a
mov ah,9 ; 0100 : Put 9 (output to stdout) to ah
mov dx,108 ; 0102 : put 0108 in dx (which should contain the string "Hello world!$" )
int 21 ; 0105 : Kick the MS-DOS API, which reads from ah
ret ; 0107 : Return from procedure
; 0108: Our data:
33 text files.
31 unique files.
20 files ignored.
github.com/AlDanial/cloc v 1.72 T=0.21 s (68.2 files/s, 1816.8 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Ruby 5 19 48 126
Markdown 2 23 0 51
@cswingler
cswingler / Vagrantfile
Created February 10, 2017 20:50
Create a LVM volume in a Vagrant-driven VirtualBox using 75% of the space in the VG
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This is a Vagrant setup that sets up a logical volume mounted at /var/lib/mysql
# using only 75% of the avilable space in the volume group it lives in.
# DEPENCIES: vagrant-persistent-storage plugin.
Vagrant.configure(2) do |config|
config.vm.box = "opscode-ubuntu-14.04"
#!/usr/bin/env bash
# Let's do some dumb things.
from ipalib import api, errors
import sys
api.bootstrap_with_global_options(context='example.org')
api.finalize()
#!/bin/bash
# a dumb shell script
echo "i'm a little shell script"
echo "short and stout"
echo "i'm not going to read stdin, this is stdout"
echo "when you invoke me, here me shout:"
echo "here's my environment"
if type == 'server':
myid = str(sorted(params.zookeeper_hosts).index(params.hostname) + 1)
File(format("{zk_data_dir}/myid"),
mode = 0644,
content = myid
)
@cswingler
cswingler / gist:cb3bbfb8d873d5f88c4e
Created January 13, 2016 20:53
Reproducing Vagrant issue #6801
techops_chef git:(master) ✗ vagrant plugin uninstall berkshelf vagrant-berkshelf vagrant-omnibus
Uninstalling the 'berkshelf' plugin...
Uninstalling the 'vagrant-berkshelf' plugin...
Uninstalling the 'vagrant-omnibus' plugin...
➜ techops_chef git:(master) ✗ vagrant --version
Vagrant 1.8.1
➜ techops_chef git:(master) ✗ vagrant up ubuntu14.04
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
#!/bin/bash
echo "(╯°□°)╯︵ ʇuɐɹᵷɐʌ"
vagrant destroy -f $* && vagrant up $*