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
copyText (textToCopy) { | |
this.copied = false | |
// Create textarea element | |
const textarea = document.createElement('textarea') | |
// Set the value of the text | |
textarea.value = textToCopy | |
// Make sure we cant change the text of the textarea |
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 | |
$url = 'http://foo.com/path with spaces/index.php?something=something else#foo-29 32'; | |
$reencode_url = function ($url) { | |
$url_parts = parse_url($url); | |
// Add scheme | |
$scheme = array_key_exists('scheme', $url_parts)? $url_parts['scheme']: 'http'; | |
$new_url = "$scheme://"; |
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
/** | |
* Continents and Countries MySQL Tables compiled from Wikipedia, Braintree Payments documentation | |
* and a couple other places I don't recall at the moment. This data is compatible with the Braintree | |
* Payment API as of Dec 2011 | |
* | |
* Compiled by Steve Kamerman, 2011 | |
*/ | |
SET FOREIGN_KEY_CHECKS=0; | |
-- ---------------------------- |