Skip to content

Instantly share code, notes, and snippets.

View usrme's full-sized avatar
🌱

usrme

🌱
View GitHub Profile
@usrme
usrme / force-mobile.js
Last active August 6, 2016 12:10
[GreaseMonkey] Force Wikipedia Mobile View
// ==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;
@usrme
usrme / remove-amp.js
Last active September 2, 2016 06:34
[GreaseMonkey] Remove AMP from URI for native desktop design
// ==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 / ldap-search-filter.sh
Last active October 21, 2016 08:11
Non-PCRE-compliant one-liner/script for forming an LDAP UID search filter, supporting UID prefixes such as "p-" and "v-"
#!/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 / CLLV Download Finder
Last active April 22, 2020 08:29
Grab embedded MixStep URL location from playback widget; won't work with multiple iFrames
// ==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 / create-listener.sh
Last active February 10, 2019 08:36
Small script to create multiple listeners with 'nc'
#!/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 / ONELINERS.md
Last active April 19, 2023 06:37
Various oneliners from various languages/tools

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 / LOADING_MESSAGES.md
Last active July 25, 2023 06:25
Our precious Slack loading messages

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 / INSTALL.md
Last active October 4, 2023 12:46
Steps to set up a fresh machine with customizations

Install

Tested with:

  • Fedora 36
  • Fedora 37
  • Fedora 38
    • Unable to install due to hard requirement on kernel version 6.0.18-300, which isn't built for Fedora 38

OS installation