Skip to content

Instantly share code, notes, and snippets.

@metainfa
metainfa / SetWinTitle.ahk
Created July 1, 2019 17:59
Change the text of Window Titles
/*
SetWinTitle.ahk - Windows Title Changer
A.N.Suresh Kumar aka Goyyah - 12-May-2006
http://www.autohotkey.com/forum/viewtopic.php?p=59692#59692
*/
^#F2::GoSub, GetTitle
@metainfa
metainfa / capslock_remap_alt.ahk
Created July 1, 2019 08:59 — forked from Danik/capslock_remap_alt.ahk
Autohotkey Capslock Remapping Script. Makes Capslock function as a modifier key to get cursor keys etc. on the left side of the keyboard, so you never have to move your hand to the right.
; Autohotkey Capslock Remapping Script
; Danik
; More info at http://danikgames.com/blog/?p=714
; danikgames.com
;
; Functionality:
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
; Cursor keys - J, K, L, I
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted
'use strict'
var express = require('express');
var app = express();
var mcache = require('memory-cache');
app.set('view engine', 'jade');
var cache = (duration) => {
return (req, res, next) => {
@metainfa
metainfa / postgres-notify-trigger.sql
Created July 22, 2017 23:29 — forked from bithavoc/postgres-notify-trigger.sql
I used this trigger to notify table changes via NOTIFY (migrating off RethinkDB)
CREATE OR REPLACE FUNCTION notify_trigger() RETURNS trigger AS $$
DECLARE
channel_name varchar DEFAULT (TG_TABLE_NAME || '_changes');
BEGIN
IF TG_OP = 'INSERT' THEN
PERFORM pg_notify(channel_name, '{"id": "' || NEW.id || '"}');
RETURN NEW;
END IF;
IF TG_OP = 'DELETE' THEN
PERFORM pg_notify(channel_name, '{"id": "' || OLD.id || '"}');
#!/bin/bash
# watching while changing
# $ dconf watch /
# list all schemas
# $ gsettings list-schemas
# check keys in a schema
# $ gsettings list-recursively org.gnome.Terminal.Legacy.Settings
#!/bin/bash
dir="$(dirname "$0")"
source $dir/functions/configure-data/animations
source $dir/functions/configure-data/button-layout
source $dir/functions/configure-data/nautilus-extensions
source $dir/functions/configure-data/preferences
# Show start-up applications
#!/usr/bin/env bash
# install numix icons
sudo apt-add-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-icon-theme-circle
# set gnome shell config
gsettings set org.gnome.desktop.interface clock-show-date true &&
echo -e "Shell clock will show date.\n" ||
#!/bin/bash
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
source ${SOURCE_DIR}/print_functions.sh
info "Background & Screensaver"
gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/gnome/Road.jpg'
gsettings set org.gnome.desktop.background primary-color '#ffffff'
#!/bin/sh
set -e
unset CDPATH
unset IFS
echo -n "Configuring Ubuntu keybindings... "
gsettings_set_org_gnome_settings_daemon_plugins_media_keys() {
n="$1"