Skip to content

Instantly share code, notes, and snippets.

@anhedonix
anhedonix / Emacs List all Font names
Created December 22, 2021 10:18
List all the available font names from emacs
(dolist (font (x-list-fonts "*"))
(insert (format "%s\n" font)))
@Jacajack
Jacajack / polyblep.dsp
Last active January 1, 2023 12:39
PolyBLEP oscillators vs Faust standard library oscillators
import("stdfaust.lib");
//----------`(os.)polyblep`----------
// PolyBLEP residual function - used for smoothing steps in the audio signal.
//
// #### Usage
//
// ```
// polyblep(Q, phase) : _
// ```
@y56
y56 / to adjust wine font size
Created December 27, 2019 02:40
to adjust wine font size
# wine regedit
Search for "LogPixels" there. You will see something like this:
"LogPixels"=dword:00000060
Change 60 to something more suitable. For example this is what I use with my
two displays (one with resolution 1680x1050 and another one with 1280x1024):
"LogPixels"=dword:00000095
/*! webpack/index.js | Webpack configuration */
// devDependencies required
import fs from 'fs'
import { resolve } from 'path'
// Webpack devDependencies required
import webpack from 'webpack'
import DotenvWebpack from 'dotenv-webpack'
import { CleanWebpackPlugin } from 'clean-webpack-plugin'
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active December 8, 2025 09:47
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@orazdow
orazdow / ORazdow_resum.docx
Last active January 5, 2021 23:03
resume - click Raw to download
@elkraneo
elkraneo / noise.glsl
Created May 19, 2019 16:49
Gradient Noise by Inigo Quilez - iq/2013 https://www.shadertoy.com/view/XdXGW8
float noise(vec2 st) {
vec2 i = floor(st);
vec2 f = fract(st);
vec2 u = f * f * (3.0 - 2.0 * f);
return mix( mix( dot( random2(i + vec2(0.0, 0.0) ), f - vec2(0.0, 0.0) ),
dot( random2(i + vec2(1.0, 0.0) ), f - vec2(1.0, 0.0) ), u.x),
mix( dot( random2(i + vec2(0.0, 1.0) ), f - vec2(0.0, 1.0) ),
dot( random2(i + vec2(1.0, 1.0) ), f - vec2(1.0, 1.0) ), u.x), u.y);
@qpwo
qpwo / monte_carlo_tree_search.py
Last active November 4, 2025 16:42
Monte Carlo tree search (MCTS) minimal implementation in Python 3, with a tic-tac-toe example gameplay
"""
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3
Luke Harold Miles, July 2019, Public Domain Dedication
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1
"""
from abc import ABC, abstractmethod
from collections import defaultdict
import math
@berndbausch
berndbausch / LXD-cheat-sheet.md
Last active October 12, 2025 09:13
LXD cheat sheet

Useful LXD commands

Summarized from https://stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/.

Interestingly, the LXD command line client is named.... lxc!

List available containers

lxc image list ubuntu:        # ubuntu: is officially supported image source
lxc image list images:        # images: is an unsupported source
lxc image alias list images:  # lists user-friendly names
@patricknelson
patricknelson / Quaternion.shader
Last active April 13, 2025 11:21 — forked from nkint/pointTowards.vertex
Shader functions to facilitate rotation of vertex around point with a quaternion (Unity / HLSL / Cg)
// Full shader example demonstrating how to use a quaterionion to rotate a vertex around a specific point. Note that this is just a plain
// vanilla unlit shader which includes the necessary functions (see section below) and example code in the vertex shader.
//
// Forked from https://gist.github.com/nkint/7449c893fb7d6b5fa83118b8474d7dcb
// Converted from GLSL to Cg. For help with that, see https://alastaira.wordpress.com/2015/08/07/unity-shadertoys-a-k-a-converting-glsl-shaders-to-cghlsl/
//
// quaternion code from https://github.com/stackgl/gl-quat
// rotation from https://twistedpairdevelopment.wordpress.com/2013/02/11/rotating-a-vector-by-a-quaternion-in-glsl/
Shader "Unlit/Quaternion"