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
printf "Memory\t\tDisk\t\tCPU\n" | |
MEMORY=$(free -m | awk 'NR==2{printf "%.2f%%\t\t", $3*100/$2 }') | |
DISK=$(df -h | awk '$NF=="/"{printf "%s\t\t", $5}') | |
CPU=$(top -bn1 | grep load | awk '{printf "%.2f%%\t\t\n", $(NF-2)}') | |
echo "$MEMORY\t$DISK\t$CPU" |
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
var striptags = require('striptags') | |
function smartExcerpt (string) { | |
var re = /(^.*?[a-zA-Z0-9\)\”\"]{2,}[.!?])[\s\”\"]+\W*[A-Z]/ | |
var matches = striptags(string).match(re) | |
return matches && matches[1] ? matches[1] : string | |
} |
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
http://www.youtube.com/watch?v=-wtIMTCHWuI | |
http://youtube.com/watch?v=-wtIMTCHWuI | |
http://m.youtube.com/watch?v=-wtIMTCHWuI | |
https://www.youtube.com/watch?v=lalOy8Mbfdc | |
https://youtube.com/watch?v=lalOy8Mbfdc | |
https://m.youtube.com/watch?v=lalOy8Mbfdc | |
http://www.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail | |
http://youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail | |
http://m.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail |
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
class IndexedDBStorage { | |
constructor(dbName = 'localStorageDB', storeName = 'localStorageStore') { | |
this.dbName = dbName; | |
this.storeName = storeName; | |
this._init(); | |
this.cache = {}; | |
} | |
_init() { | |
const request = window.indexedDB.open(this.dbName, 1); |
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 | |
check_malicious_upload(); | |
function check_malicious_upload() { | |
$user_uploads = fetch_uploads(); | |
foreach ($user_uploads as $key => $value) { |
OlderNewer