Skip to content

Instantly share code, notes, and snippets.

import { T_IO_STATE } from '@interval/sdk/dist/ioSchema'
export default class CursorPagination {
cursors: string[] = []
lastOffset: number = 0
lastQueryTerm: string | undefined
lastSortColumn: string | undefined
lastSortDirection: string | undefined
update(newState: T_IO_STATE<'DISPLAY_TABLE'>) {
@jacobmischka
jacobmischka / cmd-h-to-cmd-g-nvim-gtk.json
Created March 8, 2022 19:49
Karabiner cmd+h to cmd+g in nvim-gtk
{
"title": "Cmd+h to Cmd+g in nvim-gtk",
"rules": [
{
"description": "Cmd+h to cmd+g in nvim-gtk",
"manipulators": [
{
"type": "basic",
"description": "",
"from": {
@Phate6660
Phate6660 / rust recommendations and alternatives.md
Last active May 29, 2024 12:35
My growing list of Rust programs to use.
@GabrielVGuedes
GabrielVGuedes / workaround.txt
Created October 22, 2020 19:56
Final Fantasy XIV Online Workaround for Ubuntu 20.04
I tried to follow @Proton Girl, and other people instructions here, and also some youtube videos, and almost all of them worked, except for the intro video lock.
Here's what I did to get it working:
1: Installed the LAUNCHER only through steam;
2: Hit "Play" once, so it would process the vulkan shaders (but the launcher won't work already)
3: I already had the game downloaded, on a Windows version, so i copied the contents of the Windows version, to my Ubuntu version folder (merged, and replaced everything)
4: Then i followed other people instructions here, about the FFXIV_BOOT.cfg file
4.1: The quoted: "Set "Browser" to "1" instead of "2" in "FFXIV_BOOT.cfg" or the launcher will crash." instruction from @Proton Girl, worked to open the launcher.
4.2: The quoted: "Set "StartupCompleted" to "1" in "FFXIV_BOOT.cfg" if the launcher gives a java error when updating the game."from @Proton Girl also "must have" worked, cause I didn't experience any Java error.
4.3: The quoted: "Set "Cutscene
@cjxgm
cjxgm / remove-gnome-extensions-app.hook
Created May 8, 2020 22:09
Prevent GNOME Shell from checking extension updates, and disable automatic extension updates. Requires GNOME Shell 3.36.1+. Works on Arch Linux.
# Put this into /etc/pacman.d/hooks/
#
# In GNOME Shell 3.36.1 or later versions, if the extensions app (the GUI)
# does not exist, auto updates to extensions will be disabled.
# The check for existence of the extensions app is by checking its .desktop file.
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = gnome-shell

finally-polyfill

A tiny ~150-byte polyfill for Promise.prototype.finally.

Useful for browsers that support Promise but not the .finally() method.

Usage

npm install finally-polyfill

@dsafreno
dsafreno / firebase-hook.js
Created January 14, 2020 16:52
React Hooks for loading Firebase Data
import React, { useReducer, useEffect, useRef } from 'react';
import firebase from 'firebase/app';
import equal from 'deep-equal';
function filterKeys(raw, allowed) {
if (!raw) {
return raw;
}
let s = new Set(allowed);
return Object.keys(raw)
@IanColdwater
IanColdwater / twittermute.txt
Last active October 13, 2024 04:40
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
theory
Consensus_Demo
imports
Network
begin
datatype 'val msg
= Propose 'val
| Accept 'val
@kestred
kestred / juniper-example-sync-batching.rs
Last active March 1, 2019 21:46
Example juniper batching in synchronous call
// use other::stuff::{not_a_working_example};
use std::cell::RefCell;
use std::rc::Rc;
graphql_object!(Queries: () |&self| {
field many_rules() -> Vec<ProductRules> {
// ....
}
});