Skip to content

Instantly share code, notes, and snippets.

View tartansandal's full-sized avatar
💭
I may be slow to respond.

Kahlil Hodgson tartansandal

💭
I may be slow to respond.
  • Melbourne, Australia
View GitHub Profile
@tartansandal
tartansandal / operating_system.rb
Last active January 16, 2020 11:21
Copy of `/usr/share/rubygems/rubygems/defaults/operating_system.rb` on Fedora 31
module Gem
class << self
##
# Returns full path of previous but one directory of dir in path
# E.g. for '/usr/share/ruby', 'ruby', it returns '/usr'
def previous_but_one_dir_to(path, dir)
return unless path
@tartansandal
tartansandal / ftp.pl
Created March 16, 2015 21:53
Trigger error hidding with Net-FTP- 2.77
#!/usr/bin/perl
use strict;
use warnings;
use Net::FTP;
use Devel::SimpleTrace;
my $server = 'ftp.arin.net';
my $passive = 1; # <<< toggle this ;-)
@tartansandal
tartansandal / configure.yml
Created October 28, 2013 01:30
Minimal test case demonstrating interpolation of complex variables within a host_vars file.
#!/bin/env ansible-playbook
- name: configure postgres
hosts: localhost
connection: local
tasks:
- name: configure pg_hba.conf
template: src=pg_hba.conf.j2 dest=./pg_hba.conf