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
FROM debian:sid-slim | |
ENV THROW_AWAY=0005 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN set -ex && apt update --fix-missing && apt install -y curl build-essential protobuf-compiler && rm -rf /var/lib/apt/ | |
RUN curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y | |
ENV PATH="/root/.cargo/bin:${PATH}" | |
RUN cargo install --git https://github.com/ankitects/anki.git --tag 23.12 anki-sync-server |
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 postgres::{Client, NoTls}; | |
use rand::{ | |
distributions::{Alphanumeric, DistString}, | |
Rng, | |
}; | |
use sea_query::*; | |
use sea_query_postgres::PostgresBinder; | |
use std::{hint::black_box, time::Instant}; | |
#[derive(Iden)] |
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 { createContext, useContext, useEffect, useState } from "react"; | |
import { type SpotlightActionData } from "@mantine/spotlight"; | |
type ContextValue = Array<SpotlightActionData>; | |
type ContextType = [ | |
ContextValue, | |
React.Dispatch<React.SetStateAction<ContextValue>> | |
]; | |
const Context = createContext<ContextType>([[], () => {}]); |
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
root@c546e96dead5:/app# bun --revision | |
1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a | |
root@c546e96dead5:/app# which node bun | |
/root/.bun/bin/bun | |
root@c546e96dead5:/app# gdb `which bun` frontend/core | |
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 | |
Copyright (C) 2022 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. |
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
// ==UserScript== | |
// @name Monkeytype results | |
// @version 0.1 | |
// @description Monkeytype results | |
// @author You | |
// @match https://monkeytype.com/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// ==/UserScript== |
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 QMK_KEYBOARD_H | |
enum custom_keycodes { | |
REP = SAFE_RANGE | |
}; | |
// use REP in the layout | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = ... | |
uint16_t key = 0; |
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
s + Dup | say | |
---|---|---|
y + b | by | |
y + Dup | why | |
n + Dup | no | |
n + f | find | |
l + f | life | |
l + p | people | |
l + s + p | spell | |
l + n | line | |
l + n + p | plant |
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
// Note: This assumes for iOS AnkiMobile that a midCenter tap advances to the answer side) | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
// see https://gist.github.com/sartak/581d3564dc42b689b604 | |
if (window.anki && window.sendMessage) { | |
// delay to give Anki a chance to continue processing | |
setTimeout(function () { | |
window.sendMessage("ankitap", "midCenter"); | |
}, 100); |
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
[].__proto__.__proto__ = new Proxy({}, { get: (_, n) => n < 0 ? [] : [...[][n-1], n] }) | |
// Proxy {} | |
[][5] | |
// (6) ["0", "1", "2", "3", "4", "5"] | |
[][42] | |
// (43) ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42"] | |
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
{ | |
"ACL" : [ | |
{ | |
"GroupDomain" : "SystemInternal", | |
"GroupType" : "Privileged", | |
"ObjectId" : 1, | |
"ObjectType" : "RT::System", | |
"PrincipalType" : "Group", | |
"RightName" : "ShowApprovalsTab" | |
}, |
NewerOlder