Skip to content

Instantly share code, notes, and snippets.

View aluxian's full-sized avatar

Alexandru Rosianu aluxian

View GitHub Profile
@aluxian
aluxian / disable_youtube_autoplay.js
Last active August 2, 2021 08:27 — forked from jeffmbellucci/disable_youtube_autoplay.js
Turn off/disable YouTube autoplay feature
// ==UserScript==
// @name Disable YouTube Autoplay
// @version 1.0
// @match *://www.youtube.com/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function () {
"use strict";
@aluxian
aluxian / accounting.sql
Created April 14, 2020 07:04 — forked from 001101/accounting.sql
Basic double-entry bookkeeping system, for PostgreSQL.
CREATE TABLE accounts(
id serial PRIMARY KEY,
name VARCHAR(256) NOT NULL
);
CREATE TABLE entries(
id serial PRIMARY KEY,
description VARCHAR(1024) NOT NULL,
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0),
-- Every entry is a credit to one account...
@aluxian
aluxian / Install.txt
Created March 30, 2020 19:59 — forked from soderlind/Install.txt
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@aluxian
aluxian / git_fzf_key_bindings.fish
Last active December 9, 2023 19:34 — forked from junegunn/functions.sh
Key bindings for git+fzf ported to Fish shell https://junegunn.kr/2016/07/fzf-git/
function __git_fzf_is_in_git_repo
command -s -q git
and git rev-parse HEAD >/dev/null 2>&1
end
function __git_fzf_git_status
__git_fzf_is_in_git_repo; or return
git -c color.status=always status --short | \
fzf -m --ansi --preview 'git diff --color=always HEAD -- {-1} | head -500' | \
cut -c4- | \