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
# ~/.bashrc | |
# changes the current theme of Terminal application to desired one | |
function tabc { | |
NAME=$1; | |
osascript -e "tell application \"Terminal\" to set current settings of front window to settings set \"$NAME\"" | |
} | |
function ssh { | |
# insert desired SSH-Theme here | |
tabc "Red Sands" |
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
CREATE FUNCTION fixUtf8Chars(str TEXT) RETURNS TEXT | |
BEGIN | |
SET str = REPLACE(str, CHAR(0xC383C2A9), CHAR(0xC3A9)); -- é | |
SET str = REPLACE(str, CHAR(0xC383C289), CHAR(0xC389)); -- É | |
SET str = REPLACE(str, CHAR(0xC383C2A8), CHAR(0xC3A8)); -- è | |
SET str = REPLACE(str, CHAR(0xC383C288), CHAR(0xC388)); -- È | |
SET str = REPLACE(str, CHAR(0xC383C2AA), CHAR(0xC3AA)); -- ê | |
SET str = REPLACE(str, CHAR(0xC383C28A), CHAR(0xC38A)); -- Ê | |
SET str = REPLACE(str, CHAR(0xC384C296), CHAR(0xC496)); -- Ė | |
SET str = REPLACE(str, CHAR(0xC384C297), CHAR(0xC497)); -- ė |
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 | |
// angenommen $h ist das image-handle | |
$m = array( | |
array(-1, -1, -1), | |
array(-1, 16, -1), | |
array(-1, -1, -1) | |
); | |
imageconvolution($h, $m, 8, 0); | |
?> |
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
// test if a file was uploaded | |
$formFieldName = 'myFile'; | |
if (isset($_FILES[$formFieldName])) { | |
switch(@$_FILES[$formFieldName]['error']) { | |
case UPLOAD_ERR_OK: // 0 | |
// everything is ok with the upload for php | |
break; | |
case UPLOAD_ERR_INI_SIZE: | |
// file is larger than the size set in php.ini | |
// upload_max_filesize |
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
- namen sind als [nachname] [vorname] gespeichert | |
SELECT | |
name, | |
-- lastname | |
SUBSTRING(name, 1, NULLIF(LOCATE(' ', name) - 1, -1)) | |
-- firstname | |
SUBSTRING(name, LOCATE(' ', name) + 1, LENGTH(name)), | |
FROM users | |
-- namen sind als [vorname] [nachname] gespeichert | |
SELECT |
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
define('WP_HOME','http://'.$_SERVER['HTTP_HOST'].'/wordpress/path/'); | |
define('WP_SITEURL', WP_HOME); |
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
grep -Z -P '^From:s(.+)' mail_export.txt | uniq |
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
Fr 4 Jun 2010 12:15:54 CEST | |
Batch Apache-Benchmarking on | |
http://www.horrorblog.org | |
uri: / | |
Finished 349 requests | |
Requests per second: 5.57 [#/sec] (mean) | |
Time per request: 1794.754 [ms] (mean) | |
Time per request: 179.475 [ms] (mean, across all concurrent requests) | |
uri: /blog/reca-drei-clips-und-red-band-trailer/ | |
Finished 588 requests |
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
" only use with buftabs plugin | |
set showtabline=0 | |
" custom colorsheme | |
colorscheme darkness | |
" set textmate as editr | |
set editor="mate -w" | |
" show hover links in status bar | |
set showstatuslinks=2 | |
js document.getElementById("status-bar").setAttribute("moz-collapsed", false); | |
" no error sound, just flash display |
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
# apply this rule on any location that’s an image using Regexp | |
location ~* \.(png|gif|jpg|jpeg|swf|ico)(\?[0-9]+)?$ { | |
# block empty blocked or whiteliste referers | |
valid_referers none blocked horrorblog.org www.horrorblog.org ~\.google\. ~\.yahoo\. ~\.bing\. ~\.facebook\. ~\.fbcdn\.; | |
if ($invalid_referer) { | |
return 403; | |
} | |
} |
NewerOlder