Skip to content

Instantly share code, notes, and snippets.

@usrme
usrme / INSTALL.md
Last active Mar 24, 2021
Steps to set up a fresh machine with customizations
View INSTALL.md

TODO: Add info about current machine BIOS settings

TODO: Add info about setting system-wide fonts

TODO: Add info about Firefox settings

OS installation

@usrme
usrme / LOADING_MESSAGES.md
Last active Jan 14, 2021
Our precious Slack loading messages
View LOADING_MESSAGES.md

Loading messages

kano

  • 97% of statistics found in loading messages are false
  • It was the ¯_(ツ)/¯ of times, it was the ¯_(ツ)/¯ of times
  • Boob game strong
  • I bet you don't even have the lung capacity to blow a whistle!
  • I'm having nightmares that I forgot to back up my system
  • You look like someone starved a virgin to death
@usrme
usrme / ONELINERS.md
Last active Jul 27, 2021
Various oneliners from various languages/tools
View ONELINERS.md

Oneliners

Bash

  • Basic for loop to iterate over lines in a file:
for pkg in $(cat pkgs.txt); do sudo apt purge "$pkg" -y; done
@usrme
usrme / create-listener.sh
Last active Feb 10, 2019
Small script to create multiple listeners with 'nc'
View create-listener.sh
#!/bin/bash
#
# Small script to create multiple listeners with 'nc'
#
# Execute script with 'nohup' into the background and forward
# output to /dev/null for minimal interference in console:
# nohup sudo ./create_listener.sh "4005 4006 4007 4008 4009" >/dev/null 2>&1 &
#
# Using quotes is only necessary for multiple listening ports!
#
@usrme
usrme / CLLV Download Finder
Last active Apr 22, 2020
Grab embedded MixStep URL location from playback widget; won't work with multiple iFrames
View CLLV Download Finder
// ==UserScript==
// @name CLLV Download Finder
// @include http*://*cllv.in/music*
// @namespace https://github.com/usrme
// @description Grab embedded MixStep URL location from playback widget; won't work with multiple iFrames
// @version 1
// @grant none
// ==/UserScript==
var iframe_uri = document.getElementsByTagName('iframe')[0].src,
@usrme
usrme / ldap-search-filter.sh
Last active Oct 21, 2016
Non-PCRE-compliant one-liner/script for forming an LDAP UID search filter, supporting UID prefixes such as "p-" and "v-"
View ldap-search-filter.sh
#!/usr/bin/env bash
# Üllar Seerme
#
# The input file should consist of LDAP UIDs on every line in the
# form of firstname.lastname. This input produces an output like:
# "(|(uid=first.last)(uid=first.last))" to STDOUT
#
# The pipe in the beginning denotes a boolean OR-operator, which
# specifies that at least one specified filter must be true. This
# kind of output is useful for constructing an LDAP search query
@usrme
usrme / remove-amp.js
Last active Sep 2, 2016
[GreaseMonkey] Remove AMP from URI for native desktop design
View remove-amp.js
// ==UserScript==
// @name Remove AMP
// @namespace https://github.com/usrme
// @description Remove AMP from URI for native desktop design
// @include http*://*techcrunch.com/*
// @include http*://*theregister.co.uk/*
// @include http*://*theverge.com/*
// @include http*://*vox.com/*
// @include http*://*css-tricks.com/*
// @include http*://*howtogeek.com/*
@usrme
usrme / force-mobile.js
Last active Aug 6, 2016
[GreaseMonkey] Force Wikipedia Mobile View
View force-mobile.js
// ==UserScript==
// @name Force Wikipedia Mobile View
// @namespace https://github.com/usrme
// @description Forces mobile view on desktop for a better reading experience
// @include http*://*wikipedia.org*
// @version 1
// @grant none
// ==/UserScript==
let uri = window.location.href;