Skip to content

Instantly share code, notes, and snippets.

@davekelly
davekelly / README.md
Last active October 26, 2016 09:00 — forked from silviaegt/README.md
Bibliographic metadata sunburst

metadata_sunburst

An attempt to visualize bibliographic (Dewey) metadata with D3 based on Kerry Rodden's Sunburst

Keybase proof

I hereby claim:

  • I am davekelly on github.
  • I am davekelly (https://keybase.io/davekelly) on keybase.
  • I have a public key ASBPbBvtc0vKV14XahM8mmiDIwlBZP30bTyACX8V-2Zl0Qo

To claim this, I am signing this object:

@davekelly
davekelly / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html>
<head>
<title>Map</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
svg {
background: #eee;
}
@davekelly
davekelly / WordPress URL Update SQL
Created August 19, 2013 21:46
Update all urls in a WordPress database. Used when migrating a site from one server to another (for example, test to production)
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-url.com', 'http://new-url.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-url.com','http://new-url.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-url.com', 'http://new-url.com');
@davekelly
davekelly / gist:3918937
Created October 19, 2012 15:42
Add Intercom.io snippet to Magento site
<?php
/*
* /app/design/frontend/default/your_theme/template/page/intercom-io.phtml
*/
// Settings for the intercom.io app.
if( $this->helper('customer')->isLoggedIn() ): ?>
<?php $customer = Mage::helper('customer')->getCustomer()->getData(); ?>
<script id="IntercomSettingsScriptTag">
@davekelly
davekelly / gist:2769687
Created May 22, 2012 15:14
Add a custom field to a Custom Taxonomy (WordPress)
<?php
/**
* Used to attach a gallery shortcode to a custom taxonomy (but has more general uses)
*
* Uses code from:
* @link http://sabramedia.com/blog/how-to-add-custom-fields-to-custom-taxonomies
*/
// in functions.php / custom post setup file...
@davekelly
davekelly / gist:2354729
Created April 10, 2012 21:32
Settings for Nettuts+ Fetch SublimeText Plugin
// http://net.tutsplus.com/articles/news/introducing-nettuts-fetch/
// Config settings for commonly used files & packages
{
"files":
{
"jquery": "http://code.jquery.com/jquery.min.js"
},
"packages":
{
"bootstrap": "https://github.com/twitter/bootstrap/zipball/master",