Functions
WebDev/*nix assorted functions & hacks
Search
find all
Array
-
Bash
-
Classes
-
Config
-
DateTime
-
Debug
-
dotjs
-
File
-
foooo
-
Git
-
HTML
-
Images
-
Javascript
-
Linux
-
Math
-
Misc
-
MySQL
-
OS X
-
Reading
-
Redis
-
Shell scripts
-
snippets
-
SQL
-
Strings
-
TextMate
-
Web
-
\(^o^)/ Fun!
-
_Misc hacks
-
_Pages
Misc
* Readme
** Meta: todo
bash colors. thing.
getset($key, $val=null)
get_vars_from_file($file)
googlinks($links, $total, $return=0)
header_404()
return_bytes($val)
valid_email($address)
9
found
auth
Name:
Category: Misc
Body:
// nicked from php.net docs, somewhere around ini_get() page // (keywords: convert, conversion) // return_bytes($val) function return_bytes($val) { $val = trim($val); $last = strtolower(substr($val, -1)); switch($last) { case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; } return $val; }
Footer