When trying to freeze a script which imports any distutils
module (for example, distutils.dist
), the script fails at runtime with an exception like this:
> from distutils import dist, sysconfig
E ImportError: cannot import name dist
#!/usr/bin/env ruby | |
if GC.respond_to?(:copy_on_write_friendly=); GC.copy_on_write_friendly = true; end | |
def pidfile | |
@pidfile ||= File.expand_path(File.join('..', '..', 'tmp', 'pids', 'consumer.pid'), __FILE__) | |
end | |
case ARGV.first | |
when 'start' then |
var Semaphore = function(callback, context) { | |
this.semaphore = 0; | |
this.callback = callback; | |
this.context = context || this; | |
}; | |
Semaphore.prototype.increment = function() { | |
this.semaphore++; | |
}; |
# inspired by http://ariejan.net/2010/08/23/resque-how-to-requeue-failed-jobs | |
# retry all failed Resque jobs except the ones that have already been retried | |
# This is, for instance, useful if you have already retried some jobs via the web interface. | |
Resque::Failure.count.times do |i| | |
Resque::Failure.requeue(i) unless Resque::Failure.all(i, 1)['retried_at'].present? | |
end | |
# retry all :) | |
Resque::Failure.count.times do |i| |
''' | |
GNS3_auto_ip_script | |
author: [email protected] | |
Automatically generate and apply basic IP addressing config for a GNS3 dynamips topology. | |
Example: a network consisting of R1---R2---R3. | |
Using the script, the links will be numbered as: |