Skip to content

Instantly share code, notes, and snippets.

View mcantelon's full-sized avatar

Mike Cantelon mcantelon

View GitHub Profile
<?
#
# Set CCK imagefields from node references
# by Mike Cantelon
#
# run this with Drush... example if named migration_script.php:
# drush -r /var/www/drupalroot -u "Mike Cantelon" php-script migration_script
#
#!/usr/bin/env ruby
require 'optparse'
def get_user_param(prompt_text, default = '')
prompt = prompt_text
prompt += default.length > 0 ? ' [' + default + ']' : ''
puts prompt
jetpack.statusBar.append({
html: "<i>IMG</i>",
width: 45,
onReady: function(widget){
$(widget).click(function() {
jetpack.notifications.show("Extracting!");
$(jetpack.tabs.focused.contentDocument)
.find('a > img')
.each(function() {
var src = $(this).parent().attr('href');