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
#!/home/werewolf/PhantomJS/phantomjs/bin/phantomjs | |
var fs = require('fs'); | |
var page = require('webpage').create(); | |
var now = new Date().getTime(); | |
page.onConsoleMessage = function(msg) { | |
fs.write("data.log", now + "\t" + msg + '\n', 'a'); | |
}; |
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
<html> | |
<style> | |
.γΉγΏγ€γ« { | |
position: absolute; | |
top: 0; | |
right: 3%; | |
font-size: 70px; | |
color: #e75297; | |
font-family: 'Nunito', sans-serif; | |
text-shadow: #fff 1px 1px 0px, #fff -1px 1px 0px, #fff 1px -1px 0px, #fff -1px -1px 0px; |
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
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.com |
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
String.prototype.format = String.prototype.f = function(arg){ | |
var is_object = typeof arg === 'object', | |
keys = is_object ? Object.keys(arg) : (function(l){for(i=0,a=[];i<l;i++)a[i]=i;return a;})(arguments.length), | |
args = is_object ? arg : arguments; | |
return this.replace( new RegExp('\\{(keys)\\}'.replace('keys', keys.join('|')), 'gm'), function(match, key){return args[key];}); | |
} |
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
String.prototype.f = function(arg){ | |
var args = typeof arg === 'object' ? arg : arguments, | |
keys = Object.keys(args).map(function(s){return s.replace(/\\|\(|\)|\|/g,'\\$&');}).join('|'); | |
return this.replace(new RegExp('\\{('+keys+')\\}', 'gm'), function(match, key){return args[key];}); | |
} |
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 type_for_mysql = function(data) { | |
if (data === null) | |
return 'NULL'; | |
var type = typeof data; | |
if (type === 'boolean') | |
return 'BOOLEAN'; | |
else if (type === 'number') | |
return 'INTEGER'; | |
else if (type === '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
function readable_size(size){ | |
var units = ['B', 'KB', 'MB', 'GB', 'TB']; | |
var i = Math.floor(Math.log(size)/Math.log(1024)); | |
return Math.floor(size/Math.pow(1024, i)) + units[i]; | |
} |
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
sudo apt install ubuntu-wallpapers-* |
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
SQL_MODES = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'.split(',') | |
if 'STRICT_TRANS_TABLES' in SQL_MODES: | |
SQL_MODES.remove('STRICT_TRANS_TABLES') | |
','.join(SQL_MODES) |
OlderNewer