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
| // https://gist.github.com/ejoubaud/7d7c57cda1c10a4fae8c | |
| Podium = {}; | |
| Podium.keypress = function(k) { | |
| var oEvent = document.createEvent('KeyboardEvent'); | |
| // Chromium Hack | |
| Object.defineProperty(oEvent, 'keyCode', { | |
| get : function() { | |
| return this.keyCodeVal; |
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: [ | |
| (() => [ | |
| '[', document.title, ']', '(', window.location.href, ')', '\n', | |
| (window.getSelection().toString().trim()) | |
| ? window.getSelection() | |
| .toString() | |
| .trim() | |
| .split('\n') | |
| .filter((line) => line.trim() !== '') |
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 NETSCAPE-Bookmark-file-1> | |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
| <TITLE>Bookmarks</TITLE> | |
| <H1>Bookmarks</H1> | |
| <DL><p> | |
| <DT><H3 ADD_DATE="1661226783" LAST_MODIFIED="1661226843">🥕</H3> | |
| <DL><p> | |
| <DT><A HREF="javascript:(() => setTimeout(() => document.title='💖'+document.title))()" ADD_DATE="1661226843">💖</A> | |
| <DT><A HREF="javascript:(() => setTimeout(() => document.title='💚'+document.title))()" ADD_DATE="1661226843">💚</A> | |
| <DT><A HREF="javascript:(() => setTimeout(() => document.title='💛'+document.title))()" ADD_DATE="1661226843">💛</A> |
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
| // Usage: | |
| // node randcat.js -p 8765 -- starts http server | |
| // node randcat.js -- generates bookmarklet | |
| if (typeof process !== 'undefined' && process.exit) | |
| (async () => { | |
| const [, , portK, portV] = process.argv; | |
| const mode = (portK === '-p' && portV) ? 'server' : 'bookmarklet'; | |
| const fs = require('fs').promises; | |
| let cont = (await fs.readFile(__filename)).toString(); | |
| cont = cont.replace(/^.+?(?=\(\(d\) => \{)/s, ''); |
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
| if (typeof process !== 'undefined' && process.exit) | |
| (async () => { | |
| const fs = require('fs').promises; | |
| let cont = (await fs.readFile(__filename)).toString(); | |
| cont = cont.replace(/^.+?(?=\(\(d\) => \{)/s, ''); | |
| cont = cont.replace(/(?<!(?:function|typeof|const|let))\s+(?=(?:[^\'"]*[\'"][^\'"]*[\'"])*[^\'"]*$)/gs, ''); | |
| console.log('javascript:' + cont); | |
| process.exit(0); | |
| })(); | |
| 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
| /** | |
| * The following doc describes one way how to path Promise to return it's state | |
| * * https://stackoverflow.com/questions/21485545/is-there-a-way-to-tell-if-an-es6-promise-is-fulfilled-rejected-resolved | |
| * * https://ourcodeworld.com/articles/read/317/how-to-check-if-a-javascript-promise-has-been-fulfilled-rejected-or-resolved | |
| * | |
| * I personally do not like monkey-path approach, on the one hand... and it simply | |
| * does not work on the other hand. | |
| * | |
| * Solution that works for me is to make an explicit wrapper. | |
| * |
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
| #include <iostream> | |
| #include <cpprest/http_listener.h> | |
| #include <cpprest/json.h> | |
| using http_listener = web::http::experimental::listener::http_listener; | |
| using methods = web::http::methods; | |
| using http_request = web::http::http_request; | |
| using status_codes = web::http::status_codes; | |
| using http_response = web::http::http_response; |
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
| data:text/html,<script>setInterval(() => document.body.innerHTML = ["Europe/Amsterdam", "America/Los_Angeles"].map(tz => { return {tz: tz, d: new Date().toLocaleString("en-US", {timeZone: tz}).toLocaleString()}}).reduce((p, {tz, d}) => p + `<h1>${tz}: <b>${d}</b></h1>`, ''), 1000)</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
| data:text/html;charset=utf-8;base64,PGxpbmsgcmVsPSJpY29uIiBocmVmPSJkYXRhOmltYWdlL2dpZjtiYXNlNjQsUjBsR09EbGhFQUFRQVBJQUFBQUFBUDlxQVArN0FQeWZxT1BqNC8vLy93QUFBQUFBQUNINUJBa3lBQVlBSWY4TFRrVlVVME5CVUVVeUxqQURBUUFBQUN3QUFBQUFFQUFRQUFBRDZtaG1abWJHR0dPTU1jWVlZNHd4Z0dFWWhtRVlobUVZaG1FQUFtQVlobUVZaG1FWWhnRUlBZ0hBWURBWURBYUR3UUFBQkFBQUFjQmdNQmdNQm9NQkVBZ0VBZ0VBd0dBd0FBQUdnd0VRQ0FRQ2dVQUFZQUFRQUFZRElCQW9GQW9CQVFFQkFBUUVBQVlHQUFFQkJRQUZBUUVCQVFFRUJBQUdCZ0FEQVFVRkJRRUFBQUVCQkFRQUJnWUFBQUVCQVFFQUJBQUJBQUFFQUFZR0FBTUJBUUVCQkFRQUFRQUdBQUFHQmdZQUFRRUJBUUFBQUFFQUJnWUdCZ1lHQmdBQUFRRUJBQUFBQmdZR0JnWUdCZ1lHQmdBQUFBQUdCZ1lHQmdZR0JnWUdCZ1lHQmdZTUdEQmd3SUFCQXdZU0FBQWgrUVFKTWdBR0FDd0FBQUFBRUFBUUFBQUQ2bWhtWm1iR0dHT01NY1lZWTR3QmhtRVlobUVZaG1FWWhnRUlnR0VZaG1FWWhtRVloZ0VJQW9EQllEQVlEQWFEd1FBQUJBQUFBY0JnTUJnTUJvTUJFQWdFQWdFQXdHQXdHQXdHZ3dFUUNBUUNnVUFBWURBQUFBWURJQkFvRkFvQkFRRUJBQUFFQUFZR0FBRUJCUUFGQVFFQkFRRUVCQUFHQmdBREFRVUZCUUFBQVFFQkJBUUFCZ1lBQUFFQkFRRUVBQUVCQUFRRUFBWUdBQU1CQVFFQkJBQUJBUUFBQkFBR0JnWUFBUUVCQVFBQUFRRUFCZ0FBQmdZR0JnQUFBUUVC |
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
| // https://babeljs.io/en/repl | |
| // http://www.typescriptlang.org/play/ | |
| // 001 Code | |
| let x = [1, 2, 3]; | |
| if (typeof x === 'object') { | |
| } |
NewerOlder