This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Redmine Hour Counter | |
// @namespace http://projects.deeson.info | |
// @description Adds up selected hours. | |
// @include https://projects.deeson.info/* | |
// @grant none | |
// ==/UserScript== | |
/** | |
* Adds the count icon at the top of the page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Drupal disable CKEditor in Drupal by default | |
// @namespace https://github.com/dan-sprog | |
// @description Disable CKEditor by default | |
// @version 1 | |
// ==/UserScript== | |
(function(){ | |
if(typeof Drupal !== 'undefined' && typeof CKEDITOR !== 'undefined' && Drupal.behaviors.ckeditor && CKEDITOR.env.isCompatible) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Insert an element into an associative array after a specified key. | |
* | |
* @see _element_insert() | |
*/ | |
function element_insert_after(&$element, $insert, $key) { | |
_element_insert(TRUE, $element, $insert, $key); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.scope = function() { | |
var scope = this; | |
return function(selector) { | |
return $(selector, scope) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DRUPAL_ROOT', getcwd()); | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
if ($user->uid == 1) { | |
if (function_exists('apc_clear_cache')) { | |
apc_clear_cache('opcode'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name JIRA natural times | |
// @namespace http://angrydan.example.com | |
// @description Allows entering times with a colon | |
// @include https://deeson.atlassian.net/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
jQuery(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Helper for creating new beans. | |
* | |
* @see https://gist.github.com/dan-sprog/ae7a7da430288607685f | |
*/ | |
function my_module_blocks_install_bean($info, $overwrite = FALSE, $needs_revert = FALSE) { | |
if ($overwrite) { | |
$bean = bean_load_delta($info['delta']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$view = views_get_view('VIEW_NAME'); | |
if (!empty($view)) { | |
ctools_include('export'); | |
ctools_export_crud_set_status('views_view', $view, TRUE); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Disable overlay | |
// @namespace http://angrydan.example.com | |
// @description Disable the Drupal overlay | |
// @include * | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// Drupal.ajaxError was introduced in D7. D6 won't have it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use: red for live, yellow | |
# Red | |
PS1='\[\033[0;31m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' | |
# Yellow | |
PS1='\[\033[0;33m\]\u@\h\[\033[0;34m\] \w \$\[\033[00m\] ' | |
# Green | |
PS1='\[\033[0;32m\]\u@\h\[\033[0;34m\] \w \$\[\033[00m\] ' |
OlderNewer