This file contains hidden or 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 | |
/* | |
Standalone PHP script to migrate users from Drupal 6 to Drupal 7 programatically. | |
Date: 9-4-2012 | |
*/ | |
// set HTTP_HOST or drupal will refuse to bootstrap | |
$_SERVER['HTTP_HOST'] = 'example.org'; | |
$_SERVER['REMOTE_ADDR'] = '127.0.0.1'; |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# extracts the embedded PNG data from .skitch SVG files | |
require 'nokogiri' | |
require 'base64' | |
IMAGE_HEADER = "data:image/png;base64," | |
ARGV.each do |filename| | |
svg_document = Nokogiri::XML(File.open(filename)) |