Skip to content

Instantly share code, notes, and snippets.

View r14n's full-sized avatar

Richard r14n

View GitHub Profile
@mwunsch
mwunsch / emoji_image_replace.js
Last active August 13, 2023 21:44
Detect emoji unicode on a page, replace it with images (supplied by GitHub, for now). Goes great in your ~/.js
/**
*
* Here's a thing that will look through all the text nodes of a document, and
* upon encountering an emoji codepoint, will replace it with an image.
* For now, those images are pulled from GitHub, which isn't very nice, so I
* need to find a more suitable host.
*
* Much of this code was gleaned from staring at the minified GitHub JS.
*
* Copyright (c) 2013 Mark Wunsch. Licensed under the MIT License.
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@tomkdickinson
tomkdickinson / instagram_followers.py
Created January 5, 2017 20:19
Followers Extraction Instagram
import json
import requests
import logging as log
log.basicConfig(level=log.DEBUG)
class FollowerExtractor():
"""
Extracts followers for a given profile
"""
@ammarshah
ammarshah / all_email_provider_domains.txt
Last active October 22, 2025 20:07
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
#!/bin/bash
xrandr --output VGA1 --auto --left-of LVDS1
# default monitor is LVDS1
MONITOR=LVDS1
# functions to switch from LVDS1 to VGA and vice versa
function ActivateVGA {
echo "Switching to VGA1"
@pykler
pykler / wink_relay_publish.py
Last active September 26, 2023 13:32
Script to publish mqtt discovery for wink relay running with https://github.com/jimpastos/wink-relay-manager
import json
import logging
import getpass
import argparse
import paho.mqtt.client as mqtt # paho-mqtt
payloads = {
"homeassistant/device_automation/B0C1/%MQTT_PREFIX%/config": {
"automation_type":"trigger",
"topic": "%MQTT_PREFIX%/buttons/0/click/1",
@jwbee
jwbee / jq.md
Last active July 15, 2025 12:12
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is