Skip to content

Instantly share code, notes, and snippets.

View aluxian's full-sized avatar

Alexandru Rosianu aluxian

View GitHub Profile
@aluxian
aluxian / scriptlets.js
Last active October 31, 2023 16:58
uBlockOrigin
/// FixGitHubFavicon.js
console.log('fixing GitHub favicon');
window.onload = () => {
[...document.querySelectorAll('.js-site-favicon')].forEach(el => {
el.href = 'https://github.com/aluxian/github-hyperspace-logo/blob/main/favicon-2.png?raw=true';
console.log(el.href);
});
};
@aluxian
aluxian / reddit.txt
Last active December 27, 2022 16:20
! Reddit app ad
www.reddit.com##.XPromoPopupRpl
www.reddit.com##xpromo-new-app-selector
www.reddit.com##.bottom-bar, .XPromoBottomBar
www.reddit.com##.useApp,.TopNav__promoButton
www.reddit.com##body:style(pointer-events:auto!important;)
! uBO Annoyances has also this:
! https://github.com/uBlockOrigin/uAssets/issues/6826
reddit.com##.XPromoPopup
@aluxian
aluxian / threadreader.js
Created February 7, 2022 10:47
Bookmarklet for redirecting from tweet to thread reader
// Test case:
// https://mobile.twitter.com/danluu/status/1487228574608211969
// https://threadreaderapp.com/thread/1487228574608211969.html
// Use on twitter.com root tweet page
window.location = `https://threadreaderapp.com/thread/${
/status\/(\d+)/g.exec(document.location.pathname)[1]
}.html`;
@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 / Gruvbox.terminal
Created January 23, 2021 10:18
Terminal.app profiles
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxARElVO
U1JHQlxOU0NvbG9yU3BhY2VWJGNsYXNzTxAnMC4xMTM3MjU0OTAyIDAuMTI1NDkwMTk2
MSAwLjEyOTQxMTc2NDcAEAGAAtIUFRYXWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xv
!function(){"use strict";var e,t;e=window,t=function(){function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(n){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function i(e){return Array.from(new Set(e))}function o(){return navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")}function r(e,t){return e==t}function s(e,t){"template"!==e.tagName.toLowerCase()?console.warn(`Alpine: [${t}] directive should only
function fzf_history_reverse_search --description 'Reverse search the command history'
history -z | fzf --read0 --print0 --height 50% --tiebreak=index --bind=ctrl-r:toggle-sort --no-multi --query (commandline | string collect) | read -lz result
and commandline -- $result
end
function fish_user_key_bindings --description 'Custom key bindings'
bind \cs pet_select
bind \cr fzf_history_reverse_search
end
@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