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
set image_ext_list to {"jpg", "jpeg", "png"} | |
set size_list to {"64", "48", "32", "24", "16"} | |
set source_path to (choose folder "Select the folder with the base images" without invisbles) as text | |
set dest_path to (choose folder "Select the destination folder" without invisbles) as text | |
with timeout of 86400 seconds | |
tell application "Finder" | |
set image_files to (files of entire contents of (source_path as alias) whose name extension is in image_ext_list) as alias list | |
end tell | |
end timeout |
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
/** | |
* Method that tests a string to check if it's value can be assumed as a (bool), regardless of being true/false. | |
* Note: If the string is empty, this function will return false since there's "no value" to be tested. | |
* @examples: | |
* "1".isBool() // returns true | |
* "yEs".isBool() // returns true | |
* "off".isBool() // returns true | |
* "".isBool() // returns false | |
* " ".isBool() // returns false | |
* |
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
-- Mirror the request to multiple endpoints | |
-- Used to propagate HelpScout webhooks | |
if request.method == 'POST' then | |
-- List here the url for each Mailbox's webhook listener | |
local urlMailbox = { | |
Mailbox1 = 'https://www.endpoin1.test/endpoint', | |
Mailbox2 = 'https://www.endpoin2.test/endpoint', | |
} | |
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
# From: http://stackoverflow.com/questions/18497564/assigning-vhosts-to-docker-ports | |
# start the reverse proxy | |
docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy | |
# start a first container for http://tutum.test.local | |
docker run -d -e "VIRTUAL_HOST=tutum.test.local" tutum/hello-world | |
# start a second container for http://deis.test.local | |
docker run -d -e "VIRTUAL_HOST=deis.test.local" deis/helloworld |
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
# From: http://stackoverflow.com/questions/18497564/assigning-vhosts-to-docker-ports | |
# start the reverse proxy | |
docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy | |
# start a first container for http://tutum.test.local | |
docker run -d -e "VIRTUAL_HOST=tutum.test.local" tutum/hello-world | |
# start a second container for http://deis.test.local | |
docker run -d -e "VIRTUAL_HOST=deis.test.local" deis/helloworld |
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
deny 178.238.234.1; | |
deny 76.90.254.19; | |
deny 85.17.26.68; # spammy comments - Leaseweb | |
deny 85.17.230.23; # spammy comments - Leaseweb | |
deny 173.234.11.105; # junk referrers | |
deny 173.234.31.9; # junk referrers - Ubiquityservers | |
deny 173.234.38.25; # spammy comments | |
deny 173.234.153.30; # junk referrers | |
deny 173.234.153.106; # spammy comments - Ubiquityservers | |
deny 173.234.175.68; # spammy comments |
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
/** | |
* @package MyPlugin | |
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL | |
*/ | |
/* global Wistia */ | |
Wistia.plugin('myplugin', function(video) { | |
// Wait for the video element to be fully loaded | |
interval = setInterval(function() { | |
// Your magic goes here |
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
$json_errors = array( | |
JSON_ERROR_NONE => 'No error has occurred', | |
JSON_ERROR_DEPTH => 'The maximum stack depth has been exceeded', | |
JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON', | |
JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded', | |
JSON_ERROR_SYNTAX => 'Syntax error', | |
JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded (PHP 5.3.3)', | |
JSON_ERROR_RECURSION => 'One or more recursive references in the value to be encoded (PHP 5.5.0)', | |
JSON_ERROR_INF_OR_NAN => 'One or more NAN or INF values in the value to be encoded (PHP 5.5.0)', | |
JSON_ERROR_UNSUPPORTED_TYPE => 'A value of a type that cannot be encoded was given (PHP 5.5.0)' |
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
SELECT m.id, m.title, | |
@tmp_search := '"menu-meta_description":"' AS tmp_search, | |
@tmp_search_len := LENGTH(@tmp_search) AS tmp_search_len, | |
@start := LOCATE(@tmp_search, m.params) AS tmp_start, | |
@end := LOCATE('"', m.params, @start + @tmp_search_len) AS tmp_end, | |
SUBSTRING(m.params, @start + @tmp_search_len, @end - @start - @tmp_search_len) AS metadesc, | |
@tmp_search := '"page_title":"' AS tmp_search, | |
@tmp_search_len := LENGTH(@tmp_search) AS tmp_search_len, | |
@start := LOCATE(@tmp_search, m.params) AS tmp_start, |
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
#!/bin/sh | |
################################################################################ | |
# DEFAULT VARIABLES | |
################################################################################ | |
LOCAL_PATH=/var/www | |
LOCAL_DOMAIN=mylocaltest.dev | |
LOCAL_DB_NAME=myuser | |
LOCAL_DB_USER=root | |
LOCAL_DB_PASSWORD=myrootpassword |