Skip to content

Instantly share code, notes, and snippets.

View psygo's full-sized avatar
🎯
focusing

Philippe Fanaro psygo

🎯
focusing
View GitHub Profile
@ThimoDEV
ThimoDEV / clear-planetscale-db-drizzle.ts
Created November 6, 2023 09:59
A simple script to clear all the data of your planetscale DB (force-reset from PrismaORM)
// db.ts
import * as schema from "./schema"
export const db = drizzle(connection, { schema })
//reset.ts
async function reset() {
const tableSchema = db._.schema
if (!tableSchema) {
throw new Error("No table schema found")
@psygo
psygo / scrabble.tex
Last active November 6, 2021 22:11
Scrabble on 19x19, as a background for a Goban
\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{shapes.geometric}
\def\lettertoscrabblescore#1{%
\def\tmp{#1}%
\expandafter\count\expandafter0\expandafter`#1\relax\advance\count0 by-65\relax%
\ifcase\count0\relax%
1\or3\or3\or2\or1\or4\or2\or4\or1\or8\or5\or1\or3\or1\or1\or3\or10\or1\or1\or1\or1\or4\or4\or8\or4\or10\else\fi}
% It comes from here: https://tex.stackexchange.com/a/194797/64441
% And here: https://forums.online-go.com/t/board-backgrounds-library/29388/80
@psygo
psygo / ogs_custom_diamond_stones.js
Created November 5, 2021 18:34
OGS Custom Diamond Stones from Greasy Fork
// ==UserScript==
// @name ogs custom stones
// @version 0.1
// @description custom stones on OGS
// @author michiakig
// @match https://online-go.com/*
// @run-at document-idle
// @namespace https://greasyfork.org/users/592542
// ==/UserScript==
export default class EventEmitter
{
constructor()
{
this.callbacks = {}
this.callbacks.base = {}
}
on(_names, callback)
{
@Gavinok
Gavinok / config.py
Last active August 11, 2024 16:09
This is a simplified version of my qutebrowser config
import subprocess
import os
from qutebrowser.api import interceptor
"""
qutebrowser settings for video
for more settings check out
https://qutebrowser.org/doc/help/settings.html
"""
@graninas
graninas / haskeller_competency_matrix.md
Last active November 18, 2024 08:12
Haskeller competency matrix
@lyleg
lyleg / Danaher Closed
Last active April 17, 2023 19:46
Danaher Closed
Most important theme - all attacks are significantly easier if opponent is in one of the 6 most vulnerable positions
- elbow across center line (side scissor position)
- The top lock
- THe trap triangle -> inside wrist position
- hand on the floor -> clamp position
- opponent stands up inside closed guard, second step leads to overhead sweep
- hips on the mat
Four fundamental sweeps
- hip sweep
@graninas
graninas / haskell_approaches_comparison_table.md
Last active November 6, 2024 13:47
Haskell Approaches Comparison Table

An Opinionated Comparison of Software Design Approaches in Haskell

| | Raw IO | Free Monads; Church Encoded Free Monads | Final Tagless / mtl | Effect Systems | ReaderT

@micrub
micrub / xmonad-default-key-bindings.md
Last active October 25, 2024 18:39
Xmonad default key bindings

xmonad default key bindings

Action key bindings

Key binding Action
mod - shift - slash Run xmessage with a summary of the default keybindings (useful for beginners)
mod - shift - return Launch terminal
mod - p Launch dmenu
mod - shift - p Launch gmrun
@Robbepop
Robbepop / .rustfmt.toml
Created March 16, 2017 18:19
.rustfmt.toml with all configs, descriptions, parameters and defaults for version 0.7.1 of rustfmt.
# ----------------------------------------------------------------------------------
# r u s t f m t - C O N F I G
# ==================================================================================
#
# Version: 0.7.1
# Author : Robbepop <[email protected]>
#
# A predefined .rustfmt.toml file with all configuration options and their
# associated description, possible values and default values for use in other
# projects.