Skip to content

Instantly share code, notes, and snippets.

View vdakalov's full-sized avatar

Viktor vdakalov

View GitHub Profile
@lee2sman
lee2sman / setting-up-i3-for-dvorak.md
Last active September 30, 2023 02:12
I cobbled together a method to install i3 window manager for Dvorak

Setting up i3 when you use Dvorak

The process to set up i3 for use by Dvorak users is maddening and works unlike any other window manager or software I've used previously. It's especially difficult for me since I don't remember QWERTY anymore (it's been 14 years for me) and I have Dvorak positioned keys on my keyboard.

Anyway, here is the unpleasant process to get it to work at a bare minimum. I haven't found this documented in a single place elsewhere, and the steps usually assume that you understand how to do something in i3 already.

Download and install i3. I read you need these other packages as well. I'm coming from Ubuntu.

sudo apt install i3 i3status dmenu i3lock xbacklight feh
@levlaz
levlaz / types_and_roles_demo.sql
Created March 28, 2016 19:11
Create Types and Roles If Not Exist in PostgreSQL
BEGIN;
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'task_status') THEN
create type task_status AS ENUM ('todo', 'doing', 'blocked', 'done');
END IF;
END
$$;
CREATE TABLE IF NOT EXISTS
@tomasperezv
tomasperezv / gist:5175807
Created March 16, 2013 10:14
Example of listening to local storage changes
if (window.addEventListener) {
window.addEventListener("storage", onStorage, false);
} else {
window.attachEvent("onstorage", onStorage);
};
var onStorage = function(data) {
// Receive changes in the localStorage
}
@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)