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 | |
| # | |
| # Remap the built-in keyboard's "§" key (left of the digit row) to ` / ~ | |
| # | |
| # The MacBook has an ISO keyboard, so the key left of "1" natively types §/±. | |
| # We swap HID usages 0x35 (grave) and 0x64 (ISO non-US backslash) so that key | |
| # types `/~ again, and § moves to the key left of Z. | |
| # | |
| # NOTE: /usr/bin/hidutil must be granted Input Monitoring or this silently | |
| # fails -- see the MANUAL STEP below. Character-key remaps need TCC; modifier |
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/env bash | |
| # Run a libpq tool against the DigitalOcean database through the HTTP proxy. | |
| # | |
| # Direct connections are throttled by Russian DPI (clean ICMP, but long-lived | |
| # TLS sessions stall). This wrapper opens a socat tunnel through the HTTP CONNECT | |
| # proxy in $http_proxy and exports PG* env vars so the wrapped command connects | |
| # to it automatically. Pass only the tool and its non-connection flags: | |
| # | |
| # with-pg-proxy psql | |
| # with-pg-proxy pg_dump --table=public.sometable > sometable.sql |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <buzz>Buzz</buzz> |
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
| let error | |
| function stackoverflow() { | |
| try { | |
| stackoverflow() | |
| } catch(e) { | |
| try { | |
| [1,2,3] // try commenting this line | |
| } catch(e) { | |
| error = e |
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 delay(fn) { | |
| return function(...args) { | |
| return [fn, args] | |
| } | |
| } | |
| function a(arg) { | |
| // performs some IO operation that have to be mocked for testing | |
| return arg + 10 | |
| } |
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> | |
| <head> | |
| <title>Random Health Advice</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <style> | |
| #coin { | |
| width: 100px; | |
| height: 100px; | |
| background-image: url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAH8AfwMBIgACEQEDEQH/xAAbAAACAgMBAAAAAAAAAAAAAAAFBgMEAAECB//EAEEQAAIBAwIDBQUEBwYHAQAAAAECAwAEEQUhBhIxEyJBUWEUMnGBkQcVQqEjUpKiscHwM2JygrLRJENzo7PS8Rb/xAAZAQADAQEBAAAAAAAAAAAAAAABAgMEAAX/xAAkEQACAgICAwACAwEAAAAAAAAAAQIRAyExQQQSUTJSIkJxE//aAAwDAQACEQMRAD8A9xrKysrjjKyuXdUUsx5QBkk9BSRr/G3LKbTR8Fzt27EAHPQjOwHqQc4PKrDeg5JcjRi5PQ33l/a2Kq11MsfN7qndm+AG5+VLF7xvF2jRadaPcODjJPQ/Bc/vFaUL2G6FyWuyt1I0TyyrJIVV+XHdyc8/U+9t5AVYlhmivY5rNZWicRFFRsIgB7ysucbqdttip8cVnlmb4NUfHiuQrLxBxHdAGNUt18sqh/hJ/EVRTUtauOzxrW8jKqheY5LKWG4K+AJ6USjieUkQxu2PAAnFUN |
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
| {"type": "module"} |
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
| const assert = require('assert') | |
| /* | |
| Blueprint 1: | |
| Each ore robot costs 4 ore. | |
| Each clay robot costs 2 ore. | |
| Each obsidian robot costs 3 ore and 14 clay. | |
| Each geode robot costs 2 ore and 7 obsidian. | |
| */ | |
| const bp_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
| <script type='module'> | |
| async function* fromEvent(el, event){ | |
| let resolve | |
| el.addEventListener(event, e => resolve(e)) | |
| while(true){ | |
| let promise = new Promise(_resolve => resolve = _resolve) | |
| yield await promise | |
| } | |
| } |
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
| import sys, json | |
| from substrateinterface import SubstrateInterface, Keypair | |
| from scalecodec.base import ScaleDecoder, RuntimeConfiguration, ScaleBytes | |
| from scalecodec.type_registry import load_type_registry_preset | |
| import requests | |
| URL = 'wss://fullnode-relay.chachacha.centrifuge.io' | |
| keysencoded = '...your keys from rotate keys here...' |
NewerOlder