Skip to content

Instantly share code, notes, and snippets.

@vodik
vodik / rez-x
Last active November 23, 2021 20:54
startx alternative
#!/bin/bash
# startx
# Alternative, simpler startx which makes use of the XDG specification
# - assumes dbus is already running
[[ -n "$DISPLAY" ]] && exit 0
[[ -z "$XDG_VTNR" ]] && exit 1
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
@XVilka
XVilka / TrueColour.md
Last active April 14, 2025 13:32
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!

@noborus
noborus / gist:7516369
Last active March 25, 2021 10:06
iBus(1.4)をD-Busで操作する方法

iBus(1.4)をD-Busで操作する方法

iBusはD-Busを通信プロトコルに使用しているため、外からもD-Busで制御することが出来る。 しかしながら、D-Busが一般に使用するSystem Bus と Session Busとは違うBusを使用するため、ちょっと注意が必要になる。

iBus1.5からはデスクトップ環境に統合されることを前提に変更されているため、ここではその変更前のバージョンを対象とする。

iBusのD-Busに接続するための接続情報

iBusのD-Busに接続するための接続するには IBUS_ADDRESSが必要になる。IBUS_ADDRESSは通常 iBusを起動しているユーザーの

@danfinlay
danfinlay / How to download streaming video.md
Last active April 15, 2025 14:37
How to download a streaming video with Google Chrome

How to download streaming video

Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.

Open Developer Tools

From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:

1.  (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@gak
gak / fish-prompt.sh
Last active February 4, 2022 18:34
My custom fish prompt code explained at http://geraldkaszuba.com/tweaking-fish-shell/
function _common_section
printf $c1
printf $argv[1]
printf $c0
printf ":"
printf $c2
printf $argv[2]
printf $argv[3]
printf $c0
printf ", "
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...