Skip to content

Instantly share code, notes, and snippets.

View claudinec's full-sized avatar

Claudine Chionh claudinec

View GitHub Profile
--- a/modules/hs_taxonomy.module
+++ b/modules/hs_taxonomy.module
@@ -181,6 +181,9 @@ function hs_taxonomy_form_taxonomy_form_term_alter(&$form, &$form_state) {
// Use Hierarchical Select for selecting the parent term(s).
$parent = isset($form['#term']['tid']) ? array_keys(taxonomy_get_parents($form['#term']['tid'])) : array(0);
+ if (empty($parent)) {
+ $parent = array(0);
+ }
$form['relations']['parent'] = array(
@claudinec
claudinec / gist:4015195
Created November 5, 2012 03:41
select top-level terms in vocabulary 4
-- select top-level terms in vocabulary 4
-- Drupal 6
select d.tid, d.name from term_data as d join term_hierarchy as h
where d.tid = h.tid
and h.parent = 0
and d.vid = 4;
@claudinec
claudinec / drupal6.make
Created December 5, 2012 22:27
Drupal stub makefiles
core = 6.x
api = 2
; Copy of core
projects[drupal][version] = "6.26"
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
@claudinec
claudinec / ascm_build.make
Last active December 12, 2015 06:19
Drupal version and patch are in ascm_profile.make
core = 7.x
api = 2
; Copy of core
projects[drupal][version] = "7.20"
projects[ascm_profile][type] = "profile"
projects[ascm_profile][download][type] = "git"
projects[ascm_profile][download][url] = "[email protected]:claudinec/ascm_profile.git"
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/2001/REC-MathML2-20010221/dtd/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Processed by MultiMarkdown -->
<meta name="Format" content="complete" />
</head>
<body>
@claudinec
claudinec / history-10.sh
Created October 21, 2013 23:42
See your top 10 most used terminal commands
# By Eric Raio https://coderwall.com/p/15msta
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
@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>
@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 / 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: