Skip to content

Instantly share code, notes, and snippets.

# SEPARATOR
# ##############################
separator() {
w=$(stty size | cut -d" " -f2) # width of the terminal
for ((x = 0; x < w; x++)); do
printf '\e[0;90m'%s - #dark gray
done
}
@phile
phile / content
Created November 15, 2012 21:23
Drupal 7: How to remove a HTML class from a form item using hook form_alter
// remove html class from form item
function theme_name_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
case 'form_id':
$classes = &$form['actions']['item_name']['#attributes']['class'];
$classes = array_filter($classes , function($e){
return $e != 'class_to_remove';
});
break;
}
@phile
phile / content
Created August 26, 2012 23:31
My main .tm_properties for Textmate 2
windowTitle = "$TM_DIRECTORY/$TM_DISPLAYNAME"
wrapColumn = 80
showWrapColumn = true
fontName = "Andale mono"
fontSize = 18
tabSize = 2
softTabs = true
[ text ]