Skip to content

Instantly share code, notes, and snippets.

View claudinec's full-sized avatar

Claudine Chionh claudinec

View GitHub Profile
@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
<?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 / 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"
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 / drupal6.make
Created December 5, 2012 22:27
Drupal stub makefiles
core = 6.x
api = 2
; Copy of core
projects[drupal][version] = "6.26"
@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;
--- 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 / yarragreens.make
Created October 13, 2012 03:23
yarragreens.make
core = 7.x
api = 2
; Copy of core
projects[drupal][version] = "7.16"
; Copy of yarragreens_profile
; This contains another makefile that will recursively fetch
; our contrib/custom modules, libraries and themes
@claudinec
claudinec / uft_stub.make
Last active October 9, 2015 11:08
UFT Drupal 7 stub makefile
core = 7.x
api = 2
; Copy of core
projects[drupal][version] = "7.22"
; Copy of uft_profile
; This contains another makefile that will recursively fetch
; our contrib/custom modules, libraries and themes
@claudinec
claudinec / uninstall_homebrew.sh
Created August 20, 2012 01:34 — forked from mxcl/uninstall_homebrew.sh
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e