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
import { request } from "http"; | |
// check whether browser supports serviceWrokers | |
if (!navigator.serviceWorker) { | |
return; | |
} | |
// Register a serviceWorker | |
navigator | |
.serviceWorker |
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
free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m |
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
-- use this as a stored function | |
CREATE FUNCTION SPLIT_STRING(str VARCHAR(255), delim VARCHAR(12), pos INT) | |
RETURNS VARCHAR(255) | |
DETERMINISTIC | |
RETURN REPLACE(SUBSTRING(SUBSTRING_INDEX(str, delim, pos), | |
LENGTH(SUBSTRING_INDEX(str, delim, pos-1)) + 1), | |
delim, ''); |
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 | |
/** | |
* Sanitize a string. PHP 5.3 or lower version. | |
* | |
* See requirements here: http://www.php.net/manual/en/iconv.requirements.php | |
* | |
* @param string $str string to sanitize | |
* @param array $replace special strings/characters to be replaced with space | |
* @param string $delimiter delimeter character insteand of whitespaces |
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
.roar-body | |
{ | |
position: absolute; | |
font: 12px/14px "Lucida Grande", Arial, Helvetica, Verdana, sans-serif; | |
color: #fff; | |
text-align: left; | |
z-index: 999; | |
} | |
.roar |