A Pen by Johanna Ruiz on CodePen.
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
<script> | |
... | |
debugger; | |
... | |
//# sourceURL=name_this_script.js | |
</script> |
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 sanitizeLatin1($input) { | |
$output = ''; | |
$unsupportedChars = []; | |
// Loop through each character in the input string | |
for ($i = 0; $i < mb_strlen($input, 'UTF-8'); $i++) { | |
$char = mb_substr($input, $i, 1, 'UTF-8'); | |
// Convert the character to Latin1 encoding |
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 | |
// Existing array | |
$arr = array(1, 2, 3); | |
// New element to be added at 'zero' => 0 | |
// Create an array using the new element | |
$temp = array('one'); | |
$temp2 = array("hhhhhh"); | |
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
#!/usr/bin/perl | |
use strict; | |
use Mail::IMAPClient; | |
use IO::Socket; | |
use IO::Socket::SSL; | |
use Time::ParseDate; | |
use Data::Dumper; | |
# Config stuff | |
my $mail_hostname = ''; |
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 compare_by_alphabet($str1, $str2) { | |
$alphabet = "AaÀàÁáÂâÅåÃãÄ䯿BbCcÇçDdÐðEeÈèÉéÊêËëFfGgHhIiÌìÍíÎîÏïJjKkLlMmNnÑñOoÒòÓóÔôÕõÖöØøPpQqRrSsߊšTtUuÙùÚúÛûÜüVvWwXxYyŸÿÝýZzŽžÞþ0123456789"; | |
$l1 = mb_strlen($str1); | |
$l2 = mb_strlen($str2); | |
$c = min($l1, $l2); | |
for ($i = 0; $i < $c; $i++) | |
{ | |
$s1 = mb_substr($str1, $i, 1); |
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
/*\ | |
title: $:/boot/boot.js | |
type: application/javascript | |
The main boot kernel for TiddlyWiki. This single file creates a barebones TW environment that is just sufficient to bootstrap the modules containing the main logic of the application. | |
On the server this file is executed directly to boot TiddlyWiki. In the browser, this file is packed into a single HTML file along with other elements: | |
# bootprefix.js | |
# <module definitions> |
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 | |
//php streaming proxy | |
header('Access-Control: allow <*>'); //xdomain ajax ftw | |
set_time_limit(24*3600); | |
$fp = fsockopen("192.168.1.149", 80, $errno, $errstr, 30); | |
if (!$fp) { | |
echo "$errstr ($errno)<br />\n"; | |
} else { |
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
#add another domain | |
certbot --expand -d subdomain.domain.com | |
#add another domain with SSL and 307 redirect | |
certbot --webroot -w /var/www/html certonly -d subdomain.domain.com 307 -d subdomain.NEWdomain.com |
NewerOlder