Skip to content

Instantly share code, notes, and snippets.

code facility severity
0 kernel emergency
1 kernel alert
2 kernel critical
3 kernel error
4 kernel warning
5 kernel notice
6 kernel info
7 kernel debug
8 kernel emergency
@weichenlin
weichenlin / read_file_content
Created June 13, 2015 00:52
perl read entire file without CPAN
my $file = "filename";
my $content = do {
local $/ = undef;
open(my $fh, "<", $file) or die "Failed to open file $file: $!";
<$fh>;
};
@weichenlin
weichenlin / DOMDocumentTest.php
Created May 14, 2015 10:47
PHP DOMDocument debug
<?php
/**
* Generated by PHPUnit_SkeletonGenerator on 2015-04-22 at 18:55:22.
*/
class DOMDocumentTest extends \PHPUnit_Framework_TestCase
{
private $bom;
private $doctype;
private $header;