Skip to content

Instantly share code, notes, and snippets.

View BachoSeven's full-sized avatar
🎩
thinking

Francesco Minnocci BachoSeven

🎩
thinking
View GitHub Profile

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]}
@cmetz
cmetz / nebula_usb.py
Created December 14, 2020 11:02
Python Durgod K320 Nebula Hacks
import usb.core
import usb.util
import array
import time
import random
import math
import webcolors
import random
from collections import OrderedDict, namedtuple
from sys import exit
@gullyn
gullyn / flappy.html
Last active May 4, 2024 15:35
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>
@Phate6660
Phate6660 / rust recommendations and alternatives.md
Last active September 1, 2023 16:49
My growing list of Rust programs to use.
@Cardoso1994
Cardoso1994 / Xresources_gruvbox_material
Created October 9, 2020 06:07
Xresources file for Gruvbox Material Theme
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Gruvbox Material Light
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! hard *background: #f9f5d7
! medium
*background: #fbf1c7
! soft *background: #f2e5bc
*foreground: #654735
@aziis98
aziis98 / !README.md
Last active November 20, 2021 13:42
Stylus Theme - If Donald Knuth had designed Wikipedia
import React, { useState } from "react"
import PropTypes from 'prop-types'
import "./input.css"
import TypingIndicator from "./TypingIndicator"
const input = (props) => {
const styles = ["plank", "staggered", "split"]
const [stateIsFocused, setStateIsFocused] = useState(false)
@AlecsFerra
AlecsFerra / animated_wallpaper.c
Last active May 14, 2024 19:40
POC for simple animated wallpapers in Xorg
#define _POSIX_C_SOURCE 199309L
//#define DEBUG
#include <Imlib2.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@bulletmark
bulletmark / wifi-switcher
Last active January 2, 2024 03:06
Small program to switch wifi off/on when wired connection goes on/off
#!/usr/bin/env python3
# If you are using Linux NetworkManager then this program toggles your
# wifi connection off->ON whenever your wired connection goes ON->off,
# and vice-versa. Simply copy this to
# /etc/NetworkManager/dispatcher.d/99-wifi and ensure it is executable.
# No configuration is required. Get the latest version from
# https://gist.github.com/bulletmark/8e051a0a9ffdce689d86988c528e7764
# Author: Mark Blakeney, Jun 2020.
from __future__ import annotations
import subprocess
@vn-ki
vn-ki / Instructions.md
Last active February 29, 2024 13:48
Use ranger as chrome file chooser

Use ranger as chrome file chooser

  1. Copy the contents of kdialog to /usr/local/bin/kdialog
  2. Copy the contents of chrome_chooser.py to ~/.config/ranger/plugins/chrome_chooser.py
  3. Optionally map appropriately
  4. Run chrome with XDG_CURRENT_DESKTOP=KDE