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
Object.prototype.mixin = function(module) { | |
for (method in module.prototype) { | |
if (module.prototype.hasOwnProperty(method)) | |
this.prototype[method] = module.prototype[method] | |
} | |
}; |
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 entityMap = { | |
"&": "&", | |
"<": "<", | |
">": ">", | |
'"': '"', | |
"'": ''', | |
"/": '/' | |
}; | |
var htmlMap = { |
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|https):\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/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
function is_valid_date($value, $format = 'dd.mm.yyyy'){ | |
if(strlen($value) >= 6 && strlen($format) == 10){ | |
// find separator. Remove all other characters from $format | |
$separator_only = str_replace(array('m','d','y'),'', $format); | |
$separator = $separator_only[0]; // separator is first character | |
if($separator && strlen($separator_only) == 2){ | |
// make regex | |
$regexp = str_replace('mm', '(0[1-9]|1[0-2])', $format); |
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
@mixin placeholder{ | |
&.placeholder { @content } | |
&:-moz-placeholder { @content } | |
&::-moz-placeholder { @content } | |
&::-webkit-input-placeholder { @content } | |
&:-ms-input-placeholder{ @content } | |
} |
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> | |
<head> | |
<title>Test Suite</title> | |
<script> | |
(function() { | |
var queue = [], paused = false, results; | |
this.test = function(name, fn) { | |
queue.push(function() { | |
results = document.getElementById("results"); | |
results = assert(true, name).appendChild( |
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> | |
<head> | |
<title>Test Suite</title> | |
</head> | |
<body> | |
<script> | |
(function () { | |
var results = document.createElement("ul"); | |
results.id = "results"; | |
var html = results.outerHTML; |
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
#!/bin/sh | |
#log file for settings done | |
log=logs/log_apache_settings.txt | |
#path to sites config settings file | |
sitesConfigSettingsPath=domains.txt | |
#destination directory - the only path that you | |
# have to change from hosting to hosting | |
path=test | |
#apache settings file path | |
apache_path=C:/wamp/bin/apache/Apache2.2.21/conf/extra/httpd-vhosts.conf |
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
#!/bin/sh | |
#Start vars declaration | |
#default domains.txt format used as input file: | |
#domain_name database_name user_name password hosting_url | |
dbList=domains.txt | |
createLog=logs/create_log.txt | |
rootUser="root" | |
rootPass="win7" | |
#on some vds set user@"%" | |
rootHost="localhost" |
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
#!/bin/sh | |
#Start vars declaration | |
dbList=domains.txt | |
dropLog=droplog.txt | |
#End vars declaration | |
if [ -f "$dbList" ]; then | |
if [ -f "$dropLog" ]; then | |
rm "$dropLog" | |
fi | |
touch "$dropLog" |
NewerOlder