Skip to content

Instantly share code, notes, and snippets.

Pulse background color

A simple jQuery plugin that uses CSS3 animation to pulse the background color of any element

A Pen by Joel on CodePen.

License.

@jtwalters
jtwalters / gist:8995023
Created February 14, 2014 02:55
Diff modules on two Drupal sites
diff -u \
<(drush @site1 pm-list --no-core --type=module --pipe --status=enabled | sort) \
<(drush @site2 pm-list --no-core --type=module --pipe --status=enabled | sort)
@jtwalters
jtwalters / quit-and-relaunch.applescript
Created March 4, 2014 22:21
Quit and relaunch an application in AppleScript, e.g., Google Chrome—to finish installing updates.
set appName to "Google Chrome"
tell application appName to quit
repeat
tell application "System Events"
if appName is not in (name of application processes) then exit repeat
end tell
do shell script "sleep 0.5"
end repeat
tell application appName to launch
@jtwalters
jtwalters / mymodule.php
Created April 9, 2014 01:59
A really deep Drupal conditional to hide Manage Display (display suite)
<?php
/**
* Selectively hide the "Manage Display" local task added by Display Suite
* @see hook_menu_local_tasks_alter
*/
function HOOK_sitewide_tweaks_menu_local_tasks_alter(&$data, $router_item, $root_path) {
// If we're on a node page
if (isset($router_item['path']) && $router_item['path'] == 'node/%') {
// If page_arguments exists
if (isset($router_item['page_arguments']) && is_array($router_item['page_arguments'])) {
@jtwalters
jtwalters / nbsp.txt
Created April 10, 2014 00:56
Non-breaking spaces
Copy any space below this line for a non-breaking space.
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
@jtwalters
jtwalters / ensure-eof.sh
Created April 22, 2014 01:13
Ensure newline at EOF for all tracked files in a Git repository.
for file in `git ls-files`; do; file $file | grep ASCII > /dev/null && sed -i '' -e '$a\' $file; done
@jtwalters
jtwalters / gist:11189634
Created April 22, 2014 18:32
Delete remote GitHub pull branches
git for-each-ref --format="%(refname:short)" refs/remotes/origin/pr/\* | xargs git branch -d -r
Hi there,
Sorry to hear you’re having trouble with our form. From what you are describing, it sounds like you might have cookies disabled in your web browser. Our registration form requires cookies to be enabled for our site in order for us to “remember” that you have filled out the form and can access premium content such as our free training videos. Would you mind trying to enable cookies for our website and then fill out the form just one more time?
Apologies for the inconvenience and let me know if you have any further questions or issues.
@jtwalters
jtwalters / gist:68e36077218b3b5e25b4
Last active August 29, 2015 14:01
GitHub Release Notes Print Bookmarklet
javascript:(function($) { $('.header, .pagehead, .repository-sidebar, .release-authorship, .release-meta, .section-heading, .release-downloads, .site-footer').hide(); $('.release-show, .release-body').css('border', 'none'); window.print(); })(jQuery);
@jtwalters
jtwalters / say.txt
Last active August 29, 2015 14:01
Caboose sayings
-v hysterical caboose is the best thing since sliced bread