Skip to content

Instantly share code, notes, and snippets.

View statico's full-sized avatar

Ian Langworth ☠ statico

View GitHub Profile
@csandman
csandman / debounce-swr.js
Last active November 17, 2023 09:12
Debounce useSwr
// originally from: https://github.com/vercel/swr/issues/110#issuecomment-552637429
import useSWR from 'swr';
import useDebounce from 'hooks/use-debounce';
const App = () => {
const [search, setSearch] = useState('');
const debouncedSearch = useDebounce(search, 1000);
const { data: res, isValidating } = useSWR(
() => debouncedSearch ? `/api/suggestion?value=${debouncedSearch}` : null,
Api.fetcher,
@statico
statico / 00_statico.link_README.md
Last active September 24, 2023 12:15
Ian's Personal Short Link Bookmark Service
15:39 <@rjbs> Last night, I dreamed I was a rapper.
15:39 <@rjbs> I was asked to come to the funeral of a fan I had never met and eulogize her.
15:40 <@arcanez> did you?
15:40 <@autarch> and you laid down some mad rhymez there?
15:41 <@rjbs> No, I did my best to do a good job. I think I was part of a duo and my counterpart did not take things as seriously.
15:41 <@hanekomu> certainly repressed sexual desires or traumatic events, as Freud would say. :)
15:42 * rjbs watches the cornfield out the window.
15:42 < daxelrod> Nah, he would chalk it up to repressed sexual desires *for* traumatic events
15:47 * stevan would totally take a rjbs/stevan rap duo seriously
15:47 <@stevan> the Moose-Tang Clan
@nealey
nealey / slack-emoji-bulk-delete.js
Last active May 25, 2023 23:09
Bulk delete every custom emoji in Slack
//
// I just found out that we have a bunch of NSFW emoji in our bulk-imported set of >4000 emoji.
// Rather than weed them out, I want to start with a blank slate. This code does that.
//
// Navigate to your "Custom Emoji" page, the one with all the delete buttons.
// Delete one of them and acknowledge that it's going away forever.
// Then open the JavaScript console and paste this in.
//
// At some point your JavaScript console will start spewing errors.
// Reload the Emoji page, delete one emoji by hand again, and paste this in again to resume.
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 17, 2024 21:19 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@algesten
algesten / tmux.conf
Created May 14, 2017 08:30
A tmux.conf with pbcopy
# propagate titles to the window
set -g set-titles on
# Minimalist window title "0:bash"
set -g set-titles-string "#I:#W"
# show colors
set -g default-terminal "screen-256color"
@dogeared
dogeared / 00_README
Last active November 24, 2020 23:47 — forked from lmarkus/README.MD
Extracting / Exporting custom emoji from Slack
This builds off the excellent work of @lmarkus.
The scripts below can be used in conjunction with the Slack Emoji Tools Google Chrome extension to export emojis from
one Slack team and import into another team.
Original work here: https://gist.github.com/lmarkus/8722f56baf8c47045621
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@fuxingloh
fuxingloh / app.js
Last active February 24, 2023 16:16
How to use express.js and passport.js with G Suite SAML Apps SSO
const express = require('express')
const SamlStrategy = require('passport-saml').Strategy
const passport = require('passport')
const cookieSession = require('cookie-session')
const cookieParser = require('cookie-parser')
// Create express instance
const app = express()

top (the UNIX process inspector) cheat sheet

This is a list of the most helpful keyboard commands I use within top.

The basics

h shows help on interactive commands. Also see the top manual page

q to quit the program.