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 | |
/** | |
* Implements hook_cron_queue_info(). | |
* | |
* Define callback functions for queue items. | |
*/ | |
function pc_rel_cron_queue_info() { | |
return array( | |
'cleanup_old_guardian_relationships' => array( | |
'worker callback' => 'pc_rel_cleanup_old_guardian_relationships', |
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
$webapp = hiera('store_vhosts') | |
$user = $webapp['default']['webapp']['user'] | |
$pass = $webapp['default']['webapp']['pass'] |
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
bcc_resque: | |
redis: | |
host: localhost | |
port: 6379 | |
password: |
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 | |
/** | |
* @file | |
* Contains Drupal\resque\PerformLockPlugin. | |
*/ | |
namespace Drupal\resque; | |
use Resque as Php_Resque; | |
use Resque_Job_DontPerform; |
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
bcc_resque: | |
redis: | |
host: localhost # the redis host | |
port: 6379 # the redis port | |
database: 1 # the redis database |
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
app_root = ENV['DRUPALRESQUE_DIR'] || '/mnt/apci/drupal-resque' | |
num_workers = ENV['NUM_WORKERS'] || 2 | |
queues = [ | |
'PostMaster_General', | |
'PostMaster_Group', | |
'PostMaster_User', | |
'PostMaster_Send', | |
'PostMaster_Mail', | |
'PostMaster_PMessage', | |
'PostMaster_PMIndex', |
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
1. Connect old drive to mac | |
diskutil list | |
2. Choose the disk | |
sudo dd if=/dev/disk{#} of=/Users/{your_user}/new_image.img bs=1024k | |
3. Eject old drive | |
4. Connect new drive | |
5. Unmount disk | |
sudo unmountDisk /dev/disk{#} | |
6. Restore from image | |
sudo dd if=/Users/{your_user}/new_image.img of=/dev/disk{#} bs=1024k |
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
require 'resque' | |
namespace :resque do | |
desc "Clear pending tasks" | |
task :clear do | |
queues = Resque.queues | |
queues.each do |queue_name| | |
puts "Clearing #{queue_name}..." | |
Resque.redis.del "queue:#{queue_name}" | |
end | |
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
class User { | |
private $storage; | |
function __construct($storage) { // $storage is abstract, this is good | |
$this->storage = $storage; | |
} | |
function setLanguage($language) { | |
$this->storage->set($language); | |
} | |
} |
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
Vagrant.configure('2') do |config| | |
config.vm.define 'apci' do |apci| | |
apci.vm.box = 'base' | |
apci.vm.network 'private_network', ip: '192.168.213.2' | |
apci.vm.provider :virtualbox do |vb| | |
vb.customize ['modifyvm', :id, '--memory', '2048'] | |
vb.customize ['modifyvm', :id, '--cpus', '2'] | |
vb.customize ['modifyvm', :id, '--ioapic', 'on'] | |
end | |
apci.vm.host_name = 'vbox.apci.ws' |