This file contains 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/sh | |
# @author: Alexandre Plennevaux | |
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP | |
# | |
# FTP LOGIN | |
HOST='sftp://ftp.domain.com' | |
USER='ftpusername' | |
PASSWORD='ftppassword' | |
# DISTANT DIRECTORY |
This file contains 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/bash | |
trap 'echo Goodbye! && rm $cmdfile && kill $child; exit 1' INT | |
if [ -z $1 ] | |
then | |
echo "Usage: monitor_search hostname" | |
exit 1 | |
else | |
host=$1 | |
fi |
This file contains 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
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version | |
# see https://github.com/defunkt/resque/issues/49 | |
# see http://redis.io/commands - new commands | |
namespace :resque do | |
desc "Clear pending tasks" | |
task :clear => :environment do | |
queues = Resque.queues | |
queues.each do |queue_name| | |
puts "Clearing #{queue_name}..." |