Skip to content

Instantly share code, notes, and snippets.

View aluxian's full-sized avatar

Alexandru Rosianu aluxian

View GitHub Profile
@aluxian
aluxian / Makefile
Created August 11, 2024 16:30
Makefile
help: ## Print this help menu.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help
bootstrap: ## Install dev tools using Homebrew.
brew install go docker google-cloud-sdk terraform
.PHONY: bootstrap
@aluxian
aluxian / slack-files-downloader.sh
Last active August 9, 2024 09:51 — forked from greird/slack-files-downloader.sh
Download all files from a Slack workspace export folder (using unique file ID)
#!/bin/bash
#
# This script will browse a Slack export folder and download all files in a new /export folder
#
# HOW TO:
# 1. As a Workspace admin, download an export of your Slack history (https://www.slack.com/services/export)
# 2. Make sure you have jq installed (https://stedolan.github.io/jq/)
# 3. Place this file at the root of your Slack export folder, next to channels.json
# 4. Run `bash slack-files-downloader.sh` in your terminal
#
@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