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
new Promise( ( resolve, reject ) => { | |
resolve('result'); | |
}) | |
.then(() => {console.log('resolved');}, () => {console.log('rejected');}) | |
.catch(() => {console.log('error thrown');}); | |
// resolved | |
new Promise( ( resolve, reject ) => { | |
reject('error'); | |
}) |
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 | |
namespace App\Services; | |
use GuzzleHttp\Psr7\Request; | |
/** | |
* Generates the Authorization header for OAuth 1.0 signed requests | |
* | |
* Heavily based off of the request signing code in Abraham\TwitterOAuth. Built generically, but |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Title</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w==" crossorigin="anonymous" /> | |
</head> | |
<body> | |
// | |
</body> |
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 | |
// Provide a success response early | |
// Modified from: https://stackoverflow.com/a/42245266 | |
function respondEarly() { | |
if(session_id()) {session_write_close();} | |
if(is_callable('fastcgi_finish_request')) { | |
fastcgi_finish_request(); | |
return; |
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 promptPromise(message) { | |
return new Promise(function(resolve, reject) { | |
// Open the modal and pass it message, resolve, and reject | |
// Have the modal call resolve(<response if you need one>) on confirm, reject() on cancel | |
}); | |
} | |
var button = document.getElementById('action'); | |
button.addEventListener('click', function() { |
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
/** | |
* Converts dollar signs to bell symbols | |
* Tom Nook prefers it this way | |
*/ | |
var node, | |
nodes = [], | |
walk = document.createTreeWalker( | |
document.body, | |
NodeFilter.SHOW_TEXT, | |
null, |
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/php | |
<?php | |
// Load the content | |
$content = file_get_contents('junit.xml'); | |
$xml = simplexml_load_string($content); | |
// Include: Tablesort | |
echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/tablesort/5.1.0/tablesort.min.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
// Go to Extensions > Developer Mode On > Authy Details > main.html Console | |
// Once you're there, open the main browswer and decrypt Authy | |
console.clear(); | |
console.warn('TOTP QR Codes. Authenticate Authy if nothing appears. Copied to clipboard.'); | |
output = ''; | |
appManager.getModel().forEach(function(i){ | |
if(i.markedForDeletion === false){ | |
//output += '"' + i.name + '",' + i.decryptedSeed; // Just the Secret, no QR Code | |
output += '"' + i.name + '",' + 'https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/'+encodeURIComponent(i.name)+'%3fsecret='+i.decryptedSeed+'%26issuer='+i.accountType+"\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
:: Put into .bat file, right click, Run as Administrator | |
:: Dev Notes: | |
:: @ Don't print this command | |
:: echo off Don't print any further commands, but leave their output | |
:: >nul Hide this command's output | |
:: &:: The command has ended ("&") and the rest of the line is a comment ("::") | |
@echo off |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Title</title> | |
</head> | |
<body> | |
Content | |
</body> | |
</html> |
NewerOlder