Skip to content

Instantly share code, notes, and snippets.

@bake
bake / lemonbar.fish
Last active November 19, 2015 01:09
i3 workspace indicators in lemonbar
#!/usr/bin/fish
set normal '%{F#ffffff}'
set urgent '%{F#e8586e}'
set good '%{F#00ff00}'
set inactive '%{F#616161}'
set separator $inactive' / '$normal
function workspace
set -l length (i3-msg -t get_workspaces | jq -r '. | length')
@Cacodaimon
Cacodaimon / .bashrc
Last active December 7, 2020 22:33
A powerline inspired bashrc
#!/bin/bash
[ -z "$PS1" ] && return
# ~/.local/share/fonts/
# https://github.com/powerline/fonts
color_black_black='\[\e[0;30m\]'
color_black_red='\[\e[0;31m\]'
color_black_green='\[\e[0;32m\]'
@bikz05
bikz05 / rgb2Lab.py
Created November 3, 2014 12:26
Python Script to convert color from RGB ColorSpace to CIE Lab Color Space
import numpy as np
def func(t):
if (t > 0.008856):
return np.power(t, 1/3.0);
else:
return 7.787 * t + 16 / 116.0;
#Conversion Matrix
matrix = [[0.412453, 0.357580, 0.180423],
@Lazza
Lazza / README.md
Last active October 16, 2024 08:17
VPNGate Python script

This script is NOT MAINTAINED

This snippet of code was posted in 2014 and slightly revised in 2016 and 2017. It was more of a quick'n'dirty script than a polished tool. It is made only for Linux and in Python 2, which has since become outdated.

I currently do not use it, and I suggest you avoid it as well. Please do not expect support for using this script.

🔥 If you need an alternative, @glaucocustodio has kindly suggested EasyVPN in this comment.

The rest of the README is left for historical purposed.

@rdb
rdb / js_linux.py
Last active November 23, 2024 13:51
Access joysticks/game controllers from Python in Linux via the joystick driver. See https://discourse.panda3d.org/t/game-controllers-on-linux-without-pygame/14128
# Released by rdb under the Unlicense (unlicense.org)
# Based on information from:
# https://www.kernel.org/doc/Documentation/input/joystick-api.txt
import os, struct, array
from fcntl import ioctl
# Iterate over the joystick devices.
print('Available devices:')
@XVilka
XVilka / TrueColour.md
Last active April 27, 2025 10:17
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!