Skip to content

Instantly share code, notes, and snippets.

View omnster's full-sized avatar
💭
:)

Andrey Rakhubovsky omnster

💭
:)
View GitHub Profile
@mattmc3
mattmc3 / optparsing_demo.zsh
Last active October 1, 2025 15:52
Zsh option parsing example
# Manual opt parsing example
#
# Features:
# - supports short and long flags (ie: -v|--verbose)
# - supports short and long key/value options (ie: -f <file> | --filename <file>)
# - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>)
# - does NOT support short option chaining (ie: -vh)
# - everything after -- is positional even if it looks like an option (ie: -f)
# - once we hit an arg that isn't an option flag, everything after that is considered positional
function optparsing_demo() {
@mattmight
mattmight / hide-gmail-inbox.js
Created August 6, 2021 22:14
A Tampermonkey script to hide the gmail inbox to prevent being distracted
// ==UserScript==
// @name Temporarily hide gmail inbox at first
// @namespace http://matt.might.net/
// @version 0.1
// @description Intended to prevent being distracted by your inbox if you meant to send an email or search your inbox. Mouse over the Gmail in upper left to make it re-appear.
// @author Matt Might
// @match https://mail.google.com/mail/u/0/
// @icon https://www.google.com/s2/favicons?domain=google.com
// @grant none
// ==/UserScript==
@sgarciav
sgarciav / pass.md
Last active October 21, 2025 19:57
Initialize your password store

About

Summarizing the instructions of the pass tool (as seen on its website).

Getting Started

Installation

Execute: $ sudo apt install pass

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@gullyn
gullyn / flappy.html
Last active January 24, 2025 00:41
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>

DISCLAIMER: This post is still in a draft!

Falsehoods programmers believe about quantum computing

Preamble

Quantum computing has captured broad attention and fascination over the past few years, but with that interest has come a large number of well-intentioned misunderstandings. In this post, I'll lay out a few of these falsehoods in the tradition of other wonderful falsehood lists, and in the hopes of spurring more exploration into this new and fascinating way of solving hard problems.

As a brief housekeeping note, these falsehoods are ordered by theme and topic, not in order of complexity, so don't worry if some of these points seem a bit intimidating. If you're looking to learn more about quantum computing in the first place, check out Learn Quantum Computing with Python and Q# (Manning Publications, October 2020) by Sarah Kaiser and myself.

Special thanks to everyone that made

@novoid
novoid / vkorgheadingstats.sh
Created May 2, 2020 09:08
A shell script that derives basic statistics on one or more Org mode files
#!/bin/sh
FILES="${@}"
USERTAG="@KarlVoit"
no_files_found()
{
echo "No files found. Please do give me some Org-mode files as parameter" >&2
exit 1
}
# This is heavily based in the code here:
# https://gist.github.com/enpassant/0496e3db19e32e110edca03647c36541
# Special thank you to the user enpassant for starting it https://github.com/enpassant
#!/bin/bash
SYNTAX="$2"
EXTENSION="$3"
OUTPUTDIR="$4"
INPUT="$5"
@gmolveau
gmolveau / firefox_dark_background.md
Last active September 22, 2025 05:13
Firefox dark background / theme for new tab and loading screen

Firefox Dark Background

  • How to change the background on Firefox to a dark one on new tab / loading screen ?

Procedure

  • Type about:config in the URL bar
  • Search toolkit.legacyUserProfileCustomizations.stylesheets and double-click the field to set it to true
  • Type about:support in the URL bar
  • Look for Profile folder field and click on the open button next to it.
@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active September 8, 2025 11:02
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR