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
| <a href="javascript:(function(){Array.from(document.querySelectorAll('textarea')).map(function(b){var a=document.createElement('div');var d=document.createElement('button');d.textContent='↑';d.addEventListener('click',function(f){f.preventDefault();b.value=b.value.split('\n').sort().join('\n')});var c=document.createElement('button');c.textContent='↓';c.addEventListener('click',function(f){f.preventDefault();b.value=b.value.split('\n').sort().reverse().join('\n')});a.appendChild(d);a.appendChild(c);b.parentNode.insertBefore(a,b)})})();">Sort textareas</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
| javascript:(function(){ | |
| var container = document.createElement('div'); | |
| container.setAttribute('style', 'position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9999'); | |
| var textarea = document.createElement('textarea'); | |
| textarea.setAttribute('style', 'width:99%; height: 20em'); | |
| var close = document.createElement('button'); | |
| close.textContent = 'Close' | |
| close.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
| #!/bin/bash | |
| set -e | |
| INPUT=$(realpath "$1") | |
| INPUT_PATH=$(dirname "$INPUT") | |
| TMP_DIR=$(mktemp -d -t tar-extract-XXXXX) | |
| SRC_TMP_DIR="$TMP_DIR/in" | |
| DST_TMP_DIR="$TMP_DIR/out" |
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> | |
| <head> | |
| <style> | |
| .main { | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| #preview { | |
| margin-top: 1em; | |
| white-space: pre; |
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
| copy(Array.prototype.slice.call(document.querySelectorAll("a")) | |
| .filter(link => link.text && !link.href.startsWith(window.location.href.substr(0, 10))) | |
| .map(link => `${link.href}\t${link.text}`) | |
| .join("\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
| copy(r.records.reduce((a, row) => { | |
| let line = [ | |
| row['name'] + '.', | |
| row['ttl'], | |
| 'IN', | |
| row['type'], | |
| '"' + row['data'] + '"', | |
| ].join("\t"); | |
| a.push(line); | |
| return 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
| package main | |
| import ( | |
| "reflect" | |
| "sort" | |
| "testing" | |
| ) | |
| type item struct { | |
| from int |
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
| // This snippet hides all watched videos from the subscriptions list | |
| let nodes = document.querySelectorAll('ytd-thumbnail-overlay-playback-status-renderer'); | |
| [].map.call(nodes, (el) => { | |
| el.parentNode.parentNode.parentNode.parentNode.parentNode.setAttribute('hidden', 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
| 0xadC78F169718ED920f1C7d1Cf364D280876Dc715 |
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 REPL with initialized Prestashop environment | |
| // | |
| // Inspired by https://gist.github.com/Vinai/5579309 | |
| // | |
| $configFile = '../config/config.inc.php'; |