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 <iostream> | |
#include <algorithm> | |
#include <vector> | |
#include <set> | |
#include <tuple> | |
#include <utility> | |
#include "helpers.h" | |
#include <assert.h> |
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
-- https://gist.github.com/nyergler/7056c61174194a9af9b4d5d727f1b566 | |
-- Magnet replacement bindings | |
hs.hotkey.bind({"ctrl", "alt"}, "left", function() | |
-- size focused window to left half of display | |
local win = hs.window.focusedWindow() | |
local f = win:frame() | |
local screen = win:screen() | |
local max = screen:frame() |
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
"use strict"; | |
// https://stackoverflow.com/questions/45285129/any-difference-between-await-promise-all-and-multiple-await | |
// also https://jsfiddle.net/znup6vLj/ | |
//console.clear(); | |
function delay(ms: number) { | |
return new Promise(resolve => { | |
setTimeout(resolve, ms); | |
}); |
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
package main | |
import ( | |
"fmt" | |
"html" | |
"log" | |
"net/http" | |
) | |
func main() { |
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
data:text/html;charset=utf-8,<title>TextEditor</title><style>body{background:#fbfbfb;color:#333;margin:0%50auto;width:100%}textarea{background:#fbfbfb;border:0;color:#333;font-family:sans-serif;font-size:2rem;height:98%;line-height:1.4;margin:0%20auto;outline:0;padding:4rem;width:100%}button{background-color:#fbfbfb;border:1px%20#ccc%20solid;color:#999;cursor:pointer;float:right;margin:10px%200;padding:5px%2010px}@media%20(max-width:100%){body{width:100%;padding:0}textarea{padding:10px}button{float:none}}</style><body><button%20onclick="sM();%20return%20false">Email%20this</button><textarea%20contenteditable%20id=TE%20spellcheck=false%20placeholder=Write...%20autofocus></textarea><script>function%20sM(){var%20a="mailto:?subject="+escape("Text%20from%20TextEditor")+"&body="+escape(document.getElementById("TE").value);window.location.href=a};</script> |
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
[1,1] | |
[2,2] | |
[3,3] | |
[4,4] | |
[5,5] |
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 re | |
# countries.sql https://gist.github.com/adhipg/1600028 | |
# countries table https://riptutorial.com/sql/example/9933/countries-table | |
statements = [ "SELECT * FROM countries", | |
"SELECT * FROM countries;", | |
"SELECT a.* FROM countries", | |
"SELECT capital FROM countries", | |
"SELECT capital, phonecode FROM countries", |
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
{ | |
"name": "2021.11.23.sqlite.book.page.assignments", | |
"version": "0.0.1", | |
"description": "", | |
"main": "index.js", | |
"scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"better-sqlite3": "^7.4.5" |
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
autoload -U colors && colors | |
# matches the style of bashrc with `username@host:dir$` | |
# see https://zsh-prompt-generator.site/ and https://stackoverflow.com/questions/689765/how-can-i-change-the-color-of-my-prompt-in-zsh-different-from-normal-text | |
PROMPT="%{$fg[green]%}%n@%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$ " |
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
[0], 0 | |
[1], 1 | |
[1], 1 | |
[0], 0 | |
[1,2,3,0,0,0], 3 | |
[4,5,6], 3 | |
[4,5,6,0,0,0], 3 |
NewerOlder