Skip to content

Instantly share code, notes, and snippets.

View bash's full-sized avatar

Tau Gärtli bash

View GitHub Profile
@aditya-r-m
aditya-r-m / crgb.cc
Last active April 13, 2025 15:21
Custom Trident Z DRAM RGB Turndown
// Pieces extracted & trimmed from https://gitlab.com/CalcProgrammer1/OpenRGB
// Basic usage : g++ crgb.cc -o ledoff && ./ledoff
// For turning off RAM LEDs at startup : compile in root home directory & add "@reboot /root/ledoff" to "sudo crontab -e"
#include <cstring>
#include <iostream>
#include <linux/i2c-dev.h>
#include <linux/i2c.h>
#include <sys/ioctl.h>
@anthrotype
anthrotype / svg2glif.py
Created September 8, 2017 13:02
svg2glif: convert SVG paths to UFO glyphs
#!/usr/bin/env python
""" Convert SVG paths to UFO glyphs.
"""
# Author: Cosimo Lupo
# Email: [email protected]
# License: Apache Software License 2.0
from __future__ import print_function, absolute_import
__requires__ = ["svg.path", "ufoLib", "FontTools"]
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 12, 2025 06:26
Hyperlinks in Terminal Emulators
@HaleTom
HaleTom / print256colours.sh
Last active April 15, 2025 20:48
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@vi
vi / formatunicode.pl
Last active February 21, 2024 16:55
Simple converter from markdown-style _annotations_ to Unicode combining characters.
#!/usr/bin/perl -C63
# Converts
# The -quick- _brown_ =fox= ^jumps^ +over+ ~the~ @lazy@ dog.
# into
# The q̶u̶i̶c̶k̶ b̲r̲o̲w̲n̲ f̳o̳x̳ j̅u̅m̅p̅s̅ o̱v̱e̱ṟ t̴h̴e̴ l̿a̿z̿y̿ dog.
#
# Implemented by Vitaly "_Vi" Shukela in 2016. Public domain / CC-0.
use strict;
@KonradIT
KonradIT / readme.md
Last active July 11, 2024 20:46
GoPro Studio for Linux
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@iamnewton
iamnewton / bash-colors.md
Last active March 29, 2025 07:38
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@laser
laser / concurrent_sync.js
Last active June 10, 2016 23:56
Modifying "sync" to do parallel stuff
function sync(gen) {
var iterable, resume, check, vals, ops;
vals = [];
ops = 0;
check = function() {
if (vals.length == ops) {
if (ops == 1) {
iterable.next(vals[0]);
@parshap
parshap / Vagrantfile
Created December 8, 2013 23:49
Vagrant hooks
class Plugin < ::Vagrant.plugin("2")
name "build"
action_hook('build') do |hook|
hook.after(Vagrant::Action::Builtin::Provision, 2) do
system("bash build.sh")
end
end
end