Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
@nitmir
nitmir / luksHeaderBackup.sh
Created March 2, 2015 16:21
Backup all luks header
#!/bin/bash
function backupdev () {
DEV=$1
if cryptsetup isLuks $DEV 2>/dev/null; then
DEVNAME=$(basename $DEV)
echo "Backup $DEV"
cryptsetup luksHeaderBackup $DEV --header-backup-file "luksHeaderBackup_${HOSTNAME}_${DEVNAME}.bin"
fi;
}
@netojoaobatista
netojoaobatista / sample.php
Created August 8, 2012 15:00
Slug function
<?php
echo slug('João Batista Neto'); //joao-batista-neto
@siahr
siahr / TokenUtil.php
Created February 18, 2012 03:24
Token Utilities
<?php
/**
* Token Utilities class
*
* The part of this PHP code is based on the product of BaseX Team.
* https://github.com/BaseXdb/basex/blob/master/src/main/java/org/basex/util/Token.java
*
* @package Sugina
* @author BaseX Team 2005-12, BSD License
* @author Christian Gruen
@johnlettman-old
johnlettman-old / HyClasses.php
Created July 19, 2011 22:30
Main classes file of Hybridium Engine -- contains a collection of previously created classes for easier development.
<?php
namespace Hybridium;
###############
## URL Class ##
###############
class URL {
public static function thisURL($forceSSL = false) {
if(!isset($_SERVER['REQUEST_URI']))