Skip to content

Instantly share code, notes, and snippets.

View hipyhop's full-sized avatar

Thomas Luff hipyhop

  • Brisbane, Australia
View GitHub Profile
@hipyhop
hipyhop / iam_key_to_smtp_cred.py
Last active January 15, 2020 00:49
Used to convert an AWS IAM access key to SMTP password
#!/usr/bin/env python3
import hmac
import hashlib
import base64
import argparse
# Values that are required to calculate the signature. These values should
# never change.
DATE = "11111111"
@hipyhop
hipyhop / playbook.yml
Created February 1, 2019 01:01
Ansible k8s append_hash weirdness
- hosts: localhost
vars:
kube_resource_configmaps:
test: "{{ lookup('template', 'test.configmap.yml') | from_yaml }}"
tasks:
- name: create configmaps
k8s:
### Keybase proof
I hereby claim:
* I am hipyhop on github.
* I am hipyhop (https://keybase.io/hipyhop) on keybase.
* I have a public key ASCLx0RK9BTtfxMtCXxZ1WnVHybz5rFwfyzoxX8PRtOziQo
To claim this, I am signing this object:
@hipyhop
hipyhop / shellmarks.sh
Last active January 3, 2016 00:29 — forked from harith/shellmarks.sh
Shellmarks - Bookmarking for directories
# Utilities for quickly accessing frequently used directories in zsh/bash.
# Usage:
# $ cd /path/to/project/src/
# $ mark code # Will create a new shortcut.
# # Becomes interactive if a shortcut already exists
# # m is an alias for mark. You can also `m code`
#
# $ code # From now on, running this anywhere in the shell
# # will put you in /path/to/project/src/code
use warnings;
use strict;
use Storable;
sub random_sequence {
my @nuc = ( 'A' , 'T' , 'C' , 'G' );
my $DNA;
$DNA .= $nuc[rand @nuc] for 1..50;
return $DNA;
use warnings;
use strict;
multiplyArray( [1,2,3], [4,5,6]);
sub multiplyArray{
#my $a = shift;
#my $b = shift;
my ($a, $b) = @_;
@hipyhop
hipyhop / gist:4539801
Created January 15, 2013 16:18
CoderSumo perl entry test
print "$_\n" for map { $_ % 3 == 0 ? $_ % 5 == 0 ? "FizzBuzz" : "Fizz" : $_ % 5 == 0 ? "Buzz" : $_ } (1..100);