This file contains 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
------ Minimal definitions for questions; extracted from DTP logic ------ | |
variable A B : Set | |
-- Conjunction corresponds to product/pair types: | |
data _×_ (A B : Set) : Set where | |
_,_ : A → B → A × B | |
infix 3 _×_ |
This file contains 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 { WebSocketServer } from 'ws' | |
import net from 'net' | |
const wss = new WebSocketServer({ | |
port: 5566, | |
}) | |
let lastWs = null | |
wss.on('connection', ws => { |
This file contains 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
@font-face{ | |
font-family: 'Fira Mono'; | |
src: url('https://rawcdn.githack.com/mozilla/Fira/e1b58cc66962d24caaa7ebe2e2e9a50125f20d51/woff2/FiraMono-Regular.woff2') format('woff2'); | |
font-weight: 400; | |
font-style: normal; | |
} | |
@font-face{ | |
font-family: 'Fira Mono'; | |
src: url('https://rawcdn.githack.com/mozilla/Fira/e1b58cc66962d24caaa7ebe2e2e9a50125f20d51/woff2/FiraMono-Bold.woff2') format('woff2'); |
This file contains 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 | |
import json | |
import openstep_plist | |
with open(sys.argv[1], 'r') as fp: | |
data = openstep_plist.load(fp, use_numbers=True) | |
text = json.dumps(data, sort_keys=True, indent=2) | |
print(text) |
This file contains 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 <stdint.h> | |
#include <stdbool.h> | |
// fill x with the bit pattern 0...01...10...0, | |
// where i-th bit is set iff i is in [a, b] | |
void ppu_setWindowPattern(uint8_t x[32], int a, int b) { | |
for (int i = 0; i < 32; i++) { | |
int begin = i * 8; | |
int end = begin + 8; |
This file contains 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
// [PackageDev] target_format: plist, ext: tmLanguage | |
{ "name": "Cryptoline", | |
"scopeName": "source.cryptoline", | |
"fileTypes": [".cl"], | |
"uuid": "af276db7-b1e4-4fe4-b0f6-712121d6f4c2", | |
"patterns": [ | |
{ "include": "#common" }, | |
{ "include": "#constant-decl" }, | |
{ "include": "#proc-decl" }, |
This file contains 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 | |
# FYI: https://askubuntu.com/questions/1104726/bose-revolve-soundlink-usb-output-no-sound | |
# usage: ./bose-activate.sh [VOLUME] | |
CARDS=$(LANG= aplay -l) | |
HAS_BOSE=$(echo "$CARDS" | grep "card 1: SoundLink \[Bose Revolve SoundLink\]") | |
echo $HAS_BOSE |
This file contains 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
body { | |
font-size: .8rem; | |
} | |
.container { | |
max-width: 1140px; | |
margin-left: auto; | |
margin-right: auto; | |
} |
This file contains 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 fs = require('fs') | |
const htmlparser2 = require('htmlparser2') | |
const { WritableStream } = require("htmlparser2/lib/WritableStream") | |
class Store { | |
constructor() { | |
Object.assign(this, { fragments: [], content: null }) | |
} | |
add(frag) { | |
this.fragments.push(frag) |