Skip to content

Instantly share code, notes, and snippets.

View alancoleman's full-sized avatar
:octocat:

Alan Coleman alancoleman

:octocat:
View GitHub Profile
@alancoleman
alancoleman / konsole_commands.txt
Last active December 19, 2016 11:47
A list of basic Konsole commands for reference
// Show the details of installed software, in this instance, Firefox
sudo apt-cache show firefox
sudo apt-cache show apache2
// Change the name of a file in a directory, using sudo because the directory is www
sudo mv alan_test.tx alan.txt
// Switch to root user
@mudge
mudge / test.retry.php
Created July 8, 2013 13:27
A retry function for PHP.
<?php
require_once dirname(__FILE__) . '/../lib/simpletest/autorun.php';
function retry($f, $delay = 10, $retries = 3)
{
try {
return $f();
} catch (Exception $e) {
if ($retries > 0) {
sleep($delay);