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/bash | |
| TOKEN="Get token from https://cloud.digitalocean.com/settings/applications" | |
| DOMAIN=example.com | |
| RECORD_ID=12345 | |
| IP=`curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+'` | |
| # to get record id: | |
| # curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $TOKEN" "https://api.digitalocean.com/v2/domains/$DOMAIN/records" |
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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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 targetBlank() { | |
| // remove subdomain of current site's url and setup regex | |
| var internal = location.host.replace("www.", ""); | |
| internal = new RegExp(internal, "i"); | |
| var a = document.getElementsByTagName('a'); // then, grab every link on the page | |
| for (var i = 0; i < a.length; i++) { | |
| var href = a[i].host; // set the host of each link | |
| if( !internal.test(href) ) { // make sure the href doesn't contain current site's host | |
| a[i].setAttribute('target', '_blank'); // if it doesn't, set attributes |
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 colorArray = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6', | |
| '#E6B333', '#3366E6', '#999966', '#99FF99', '#B34D4D', | |
| '#80B300', '#809900', '#E6B3B3', '#6680B3', '#66991A', | |
| '#FF99E6', '#CCFF1A', '#FF1A66', '#E6331A', '#33FFCC', | |
| '#66994D', '#B366CC', '#4D8000', '#B33300', '#CC80CC', | |
| '#66664D', '#991AFF', '#E666FF', '#4DB3FF', '#1AB399', | |
| '#E666B3', '#33991A', '#CC9999', '#B3B31A', '#00E680', | |
| '#4D8066', '#809980', '#E6FF80', '#1AFF33', '#999933', | |
| '#FF3380', '#CCCC00', '#66E64D', '#4D80CC', '#9900B3', | |
| '#E64D66', '#4DB380', '#FF4D4D', '#99E6E6', '#6666FF']; |
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 slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
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 | |
| function strip_word_html($text, $allowed_tags = '<b><i><sup><sub><em><strong><u><br>') | |
| { | |
| mb_regex_encoding('UTF-8'); | |
| //replace MS special characters first | |
| $search = array('/‘/u', '/’/u', '/“/u', '/”/u', '/—/u'); | |
| $replace = array('\'', '\'', '"', '"', '-'); | |
| $text = preg_replace($search, $replace, $text); | |
| //make sure _all_ html entities are converted to the plain ascii equivalents - it appears | |
| //in some MS headers, some html entities are encoded and some aren't |
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
| ּ_בּ | |
| בּ_בּ | |
| טּ_טּ | |
| כּ‗כּ | |
| לּ_לּ | |
| מּ_מּ | |
| סּ_סּ | |
| תּ_תּ | |
| ٩(×̯×)۶ | |
| ٩(̾●̮̮̃̾•̃̾)۶ |
NewerOlder