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
#!/bin/env ruby | |
# Last used with 3.2.2 - purge a Rackspace cloud files container. | |
# Put fog-rackspace in your gemfile and run: bundle install && bundle exec ./rackdel.rb <container name> | |
# limits don't seem to quite work correctly since this will empty your container even past 10_000 items per container?? | |
# oO Definately could be improved. | |
require 'net/http' | |
require 'fog/rackspace' | |
CONNECTION_OPTIONS = { |
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
/* | |
* An implementation of Ruby's string.succ method. | |
* By Devon Govett | |
* | |
* Returns the successor to str. The successor is calculated by incrementing characters starting | |
* from the rightmost alphanumeric (or the rightmost character if there are no alphanumerics) in the | |
* string. Incrementing a digit always results in another digit, and incrementing a letter results in | |
* another letter of the same case. | |
* | |
* If the increment generates a carry, the character to the left of it is incremented. This |