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 January 12, 2024 11:02
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 April 25, 2024 20:48
Haskeller competency matrix

Haskeller Competency Matrix

See also List of materials about Software Design in Haskell

Junior Middle Senior Architect
Haskell level Basic Haskell Intermediate Haskell Advanced Haskell Language-agnostic
Haskell knowledge scope Learn you a Haskell Get programming with Haskell Haskell in Depth Knows several languages from different categories
Get programming with Haskell Haskell in Depth Functional Design and Architecture
[Other books on Software Engineering in Haskell](https://github.com/graninas/software-design-in-haskell#B
@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 April 25, 2024 20:49
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 March 28, 2024 15:06
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 <robbepop@web.de>
#
# A predefined .rustfmt.toml file with all configuration options and their
# associated description, possible values and default values for use in other
# projects.