Skip to content

Instantly share code, notes, and snippets.

View claudinec's full-sized avatar

Claudine Chionh claudinec

View GitHub Profile
@claudinec
claudinec / xkpasswd.json
Last active June 26, 2018 09:06
xkpasswd config
{
"comment": "This works on https://xkpasswd.net/ but not with the Perl hsxkpasswd CLI tool.",
"num_words": 2,
"word_length_min": 4,
"word_length_max": 8,
"case_transform": "LOWER",
"separator_character": "NONE",
"padding_digits_before": 0,
"padding_digits_after": 2,
"padding_type": "NONE",
@claudinec
claudinec / songbook_refs.js
Created March 29, 2016 07:32
jquery filter
.filter(function() {
return this.id.match(/[A-Z]*\-/)
})
@claudinec
claudinec / apache.sh
Last active March 29, 2016 08:02
vagrant-scripts
#!/bin/bash
# Originally copied from https://linode.com/docs/applications/configuration-management/vagrant-linode-environments
apt-get install apache2 -y
mv /etc/apache2/ports.conf /etc/apache2/ports.conf.backup
mv /etc/apache2/ports1.conf /etc/apache2/ports.conf
a2dissite 000-default.conf
a2ensite vhost.conf
service apache2 reload
@claudinec
claudinec / usd2aud.pl
Created January 4, 2016 02:00
usd2aud.pl
#!/usr/bin/env perl
# Convert from USD to AUD.
# Time-stamp: <2009-03-15 19:55:57 claudine>
use strict;
use warnings;
use Carp;
use Finance::Quote;
use Getopt::Long;
@claudinec
claudinec / bmi.py
Created January 4, 2016 01:51
bmi.py
#!/usr/bin/env python
"""
Calculate Body Mass Index.
BMI = mass (kg) / height (m) ^ 2
Mass and height must be numbers.
"""
@claudinec
claudinec / drupal-dev.md
Last active December 8, 2015 23:40
Drupal development notes

Drupal development notes

Managing code

Use Git and git-flow to manage code.

If we're working across multiple major Drupal versions, prefix the branch with d7-, d8- etc.

Two options:

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@claudinec
claudinec / keybase.md
Created October 18, 2014 06:57
keybase.md

Keybase proof

I hereby claim:

  • I am claudinec on github.
  • I am claudinec (https://keybase.io/claudinec) on keybase.
  • I have a public key whose fingerprint is C08E 1BCD 9B5B 1E9D 192F 3529 37AE 0BD2 7DA6 E10C

To claim this, I am signing this object:

@claudinec
claudinec / ascm_addresses.sql
Last active August 29, 2015 14:07
ascm select and group addresses
SELECT GROUP_CONCAT(name SEPARATOR ' and ') AS name,
company_name, primary_address_1, primary_address_2, primary_city, primary_state, primary_postal_code, primary_country
FROM db
GROUP BY primary_address_1, primary_address_2, primary_city, primary_state, primary_postal_code, primary_country
ORDER BY primary_country, primary_postal_code
@claudinec
claudinec / intro.html
Last active August 29, 2015 13:56
intro text for move-in form (equiem residential portal)
<h3>Important Information</h3>
<p>Residents wishing to move in or out must pre-book their move date and time with a minimum of 48 hours notice. Moves can only be booked during the following times:</p>
<p>Monday &ndash; Friday: 9:00am &ndash; 1:00pm, 1:00pm &ndash; 4:00pm.
<br/>Saturday/Sunday/Public Holidays: No Bookings</p>
<h4>Lift Allocation</h4><p>Use of the Riverfront lift applies to apartments: 1LG - 6LG, 1G - 6G, 101A - 115A and 217A-229A ONLY. All other apartments to use the central lift.</p>
<h4>Hire of Ferry Vehicle</h4><p>A Ferry Vehicle is available for hire for a flat fee of $70.00.
<span id="read-more">Read more [+].</span>
<span id="read-full" style="display: none">View full information.</span></p>
<h4>Indemnity Form</h4><p>This form must be completed and signed in conjunction with the Building Manager. <span id="read-full">Download form.</span><p>