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 | |
# https://martin.elwin.com/blog/2008/05/backups-with-squashfs-and-luks/ | |
set -e | |
SQUASHFS_IMG="$1" | |
LUKS_IMG="$2" | |
CRYPTNAME=mkcrypt-$RANDOM | |
CRYPTDEV="/dev/mapper/$CRYPTNAME" |
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
<?php | |
class Process_Manager implements Countable | |
{ | |
protected $processes = array(); | |
protected $is_child = FALSE; | |
public function count() | |
{ | |
return count($this->processes); |
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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |