Skip to content

Instantly share code, notes, and snippets.

View hostingnuggets's full-sized avatar

Hosting Nuggets hostingnuggets

View GitHub Profile
@ukautz
ukautz / memcached-demo.php
Created February 16, 2017 11:36
Tuning memcached options for redundancy & fast failover
<?php
$servers = [
['10.0.0.1', 11211],
['10.0.0.1', 11212],
];
$id = 1;
$timeout = 50;
$mc = new \Memcached($id);
@starkers
starkers / prune_old_vols.sh
Last active August 28, 2023 11:11
prune delete and remove old bacula volumes
#!/usr/bin/env bash
#set -x
# Prune and volumes older than 2 months:
PAST=`date --date='-2 months 0 day ago' +%Y-%m-%d`
#EG a hard coded date
#PAST="2012-11-29"
#PAST="2013-11-29"
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')