Skip to content

Instantly share code, notes, and snippets.

View mainakibui's full-sized avatar

@mainakibui mainakibui

View GitHub Profile
@mainakibui
mainakibui / generate-ssh-key.sh
Created January 31, 2018 08:02 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@mainakibui
mainakibui / inotify-trigger.sh
Created May 25, 2018 07:40 — forked from amorken/inotify-trigger.sh
Triggering a command when a file tree is changed using inotify
#!/bin/bash
# Watch a directory and run a script every time inotify reports that something
# changed, followed by 10 seconds of no changes. Handy for responding to incoming
# rsync jobs or the like.
#
# Requires that inotify-tools is installed.
WATCHDIR=${1:./}
TRIGGERCOMMAND=${2:-echo fired}
@mainakibui
mainakibui / unfollow.js
Created April 22, 2021 18:58 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// Last Updated: 09 April 2020
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
" Buffers: shared hit=55070798 read=303167"
" I/O Timings: read=113222.552"
"Planning:"
" Buffers: shared hit=52 read=3"
" I/O Timings: read=11.635"
"Planning Time: 12.147 ms"
"Execution Time: 430756.466 ms"