Skip to content

Instantly share code, notes, and snippets.

View Ellpeck's full-sized avatar
🏳️‍🌈

Ell Ellpeck

🏳️‍🌈
View GitHub Profile
@davidedmundson
davidedmundson / PlasmaNested.sh
Last active July 15, 2024 02:34
Run plasma from within gamescope
#!/bin/sh
# Remove the performance overlay, it meddles with some tasks
unset LD_PRELOAD
## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper
## whilst being launched by plasma-session
mkdir $XDG_RUNTIME_DIR/nested_plasma -p
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
#!/bin/sh
@OliverBalfour
OliverBalfour / README.md
Last active May 22, 2024 04:45
Obsidian custom checkbox snippet

Custom checkboxes for Obsidian! It's like deathau's snippet except updated to work really well in Live Preview mode in Obsidian 1.0.

Simply edit the x inside checkboxes to >, ?, etc. to see styling like below!

Editing Live Preview Viewing
image image image

Installation:

  • Download the checkbox.css file on this page
@maybemkl
maybemkl / remove_links.py
Created September 6, 2021 23:00
Remove markdown wiki-link brackets during pandoc exports
@kepano
kepano / obsidian-web-clipper.js
Last active July 28, 2024 19:48
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@kherge
kherge / Stylus.css
Last active May 17, 2023 18:11
Google Calendar Dark Mode
/* calendar.google.com */
:root {
--base-bg-color: #111111;
--base-fg-color: #eeeeee;
--border-color: #202020;
--button-hover-bg-color: #333333;
--button-hover-border-color: #404040;
@mzfr
mzfr / findtraitor.py
Created June 11, 2019 13:39
Find users who unstarred your repository
"""Help you find users who unstared your repository
"""
import os
import sys
import requests_cache
import argparse
URL = "https://api.github.com/repos/{}/{}/stargazers?per_page=100&page={}"
@xoppa
xoppa / outline.fragment.glsl
Created October 12, 2015 20:42
very basic outline shader
#ifdef GL_ES
#define LOWP lowp
precision mediump float;
#else
#define LOWP
#endif
const float offset = 1.0 / 128.0;
varying vec2 v_texCoords;
uniform sampler2D u_texture;
@polo2ro
polo2ro / dump-imap.py
Last active July 12, 2024 16:28 — forked from FiloSottile/dump-imap.py
Simple script to dump an IMAP folder into eml files, store email using the message-id
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import imaplib
import argparse
import email
import re
argparser = argparse.ArgumentParser(description="Dump a IMAP folder into .eml files")
argparser.add_argument('-s', dest='host', help="IMAP host, like imap.gmail.com", required=True)
@mjackson
mjackson / color-conversion-algorithms.js
Last active July 29, 2024 17:50
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation