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
| (cors) { | |
| @cors_preflight method OPTIONS | |
| header { | |
| Access-Control-Allow-Origin "{header.origin}" | |
| Vary Origin | |
| Access-Control-Expose-Headers "Authorization" | |
| Access-Control-Allow-Credentials "true" | |
| } |
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 | |
| // Use HTTP Basic Authentication for verification | |
| $username = 'admin'; | |
| $password = 'Passw0rd!'; // Please use your own password!! | |
| // Check if the client has provided correct credentials | |
| if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] !== $username || $_SERVER['PHP_AUTH_PW'] !== $password) { | |
| // Send authentication request headers | |
| header('WWW-Authenticate: Basic realm="Restricted Area"'); | |
| header('HTTP/1.0 401 Unauthorized'); |
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 | |
| // copied from python code at https://stackoverflow.com/a/23221582/3103058 | |
| function base32_decode($key) { | |
| // https://www.php.net/manual/en/function.base-convert.php#122221 | |
| $key = strtoupper($key); | |
| list($t, $b, $r) = array("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", "", ""); | |
| foreach(str_split($key) as $c) | |
| $b = $b . sprintf("%05b", strpos($t, $c)); | |
| foreach(str_split($b, 8) as $c) | |
| $r = $r . chr(bindec($c)); |
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
| // ==UserScript== | |
| // @name load jQuery and yaml on 越南商店 | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://sites.google.com/view/nicsolas/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com | |
| // @require http://code.jquery.com/jquery-3.4.1.min.js | |
| // @require https://github.com/plohoj/userscript-requirejs/releases/download/0.0.2/userscript-require.js |
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 -e | |
| #git-cache-meta -- simple file meta data caching and applying. | |
| #Simpler than etckeeper, metastore, setgitperms, etc. | |
| # 2014-02-25 change filetime from accessed time to modifpeied time by cojad | |
| # 2012-03-05 - added filetime, andris9 | |
| #modified by n1k | |
| # - save all files metadata not only from other users | |
| # - save numeric uid and gid | |
| #from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694 |
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
| cscript //B "%windir%\system32\slmgr.vbs" /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX | |
| cscript //B "%windir%\system32\slmgr.vbs" /skms zh.us.to | |
| wscript "%windir%\system32\slmgr.vbs" /ato | |
| cd "C:\Program Files (x86)\Microsoft Office\Office16" | |
| cscript OSPP.VBS /sethst:zh.us.to | |
| cscript OSPP.VBS /act |
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 | |
| $postdata = array( | |
| 'type' => 'A', | |
| 'name' => 'a.xxx.tw', //你的domain name | |
| 'content' => '123.123.123.123' // 你要更新的對應ip地址 | |
| ); | |
| $opts = array('http' => | |
| array( | |
| 'method' => 'PUT', | |
| 'header' => "X-Auth-Email: 你的信箱@gmail.com\r\n" . |
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
| javascript: (window.jQuery) ? console.log('jQuery '+jQuery.fn.jquery+' already loaded!') : (function(e, s) { | |
| e.src = s;e.onload = function() {/*jQuery.noConflict();*/ | |
| console.log('jQuery '+jQuery.fn.jquery+' injected'); | |
| }; | |
| document.head.appendChild(e); | |
| })(document.createElement('script'), 'http://code.jquery.com/jquery-2.2.4.min.js'); | |
| jQuery("<h1>test</h1>").attr("style","position:fixed;z-index:9999;width:100%;background-color:rgba(0,255,0,.5);text-align:center").appendTo(document.body).fadeOut( 1500 ).queue(function() { jQuery(this).remove(); }); |
NewerOlder