Skip to content

Instantly share code, notes, and snippets.

@nkmathew
nkmathew / light-blue-google-links.css
Created April 29, 2017 14:31
Restores Google search's links to the subtle light blue colour we're all used to
@nkmathew
nkmathew / reddit-repost-button.user.js
Last active January 26, 2018 09:05
A userscript that adds a button for easily reposting a link from the subreddit frontpage
// ==UserScript==
// @name Reddit Repost Button
// @namespace http://nkmathew.net
// @author nkmathew
// @description Adds a button for easily reposting a link from the sub frontpage
// @icon http://www.reddit.com/favicon.ico
// @icon64 http://www.reddit.com/favicon.ico
// @version 0.1.0
// @include /^https?:\/\/(.+\.)?reddit\.com\/?.*$/
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
@nkmathew
nkmathew / google-translate-copy-button.user.js
Created April 22, 2017 15:08
Adds a button for copying text from the translation source inputbox in Google Translate
// ==UserScript==
// @name Google Translate Copy Button
// @namespace http://nkmathew.net/
// @version 0.1.0
// @description Adds a button for copying text from the translation source inputbox in Google Translate
// @icon http://translate.google.com/favicon.ico
// @icon64 http://translate.google.com/favicon.ico
// @author nkmathew
// @match https://translate.google.com/*
// @grant none
@nkmathew
nkmathew / youtube-watchlater-button.user.js
Last active December 13, 2021 18:30
Tampermonkey script that adds a navigation button for getting to your watch later playlist easily
// ==UserScript==
// @name Youtube WatchLater Button
// @namespace http://nkmathew.net
// @version 0.2.0
// @description Adds a button for getting to your watch later playlist easily
// @icon http://youtube.com/favicon.ico
// @icon64 http://youtube.com/favicon.ico
// @author nkmathew
// @match https://www.youtube.com/*
// @grant none
@nkmathew
nkmathew / ssh-cert.sh
Created March 23, 2017 16:47
Self-signed localhost openssl certificate
#!/usr/bin/env bash
# Generates a self-signed localhost certificate. Don't forget to restart the browser
# if it doesn't work the first time(certificate caching)
sitename=$1
openssl req -config openssl.cnf -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout $sitename.key -out $sitename.crt
@nkmathew
nkmathew / old-stackoverflow-theme.css
Last active June 14, 2018 07:09
Stylish userstyle that restores the old StackOverflow navigation bar theme, more or less
/**
* Stackoverflow decided to change the navigation bar styling on 14th February 2017.
* This userstyle attempts to restore the old navigation bar feel with some of my
* subjective styling preferences thrown in
*
* Userstyles: https://userstyles.org/
* Relevant: http://meta.stackoverflow.com/questions/343653/top-navigation-update
* Original: https://userstyles.org/styles/138640/stack-black-slim-header
*
*
@nkmathew
nkmathew / medium-sane-styling.css
Created February 9, 2017 14:58
Sane styling for Medium.com - Stylish UserStyle
pre {
font-family: Consolas !important;
}
p {
font-family: Helvetica Neue !important;
}
.graf--li {
margin: 0px !important;
@nkmathew
nkmathew / lightshot.py
Last active October 20, 2020 15:55
LightShot Image Extractor: scrapes the jpg screenshot link from a LightShot page
#!/usr/bin/env python3
# coding: utf-8
""" LightShot Image Extractor
Date: 17th December 2016
Author: nkmathew <[email protected]>
Script for scraping the jpg link from a LightShot screenshot page to be used for
hotlinking
@nkmathew
nkmathew / clone.sh
Created November 6, 2016 11:20
Script for cloning repos from GitHub using a username/repo-name combo
#!/usr/bin/env bash
# Script for cloning repos from GitHub using a username/repo-name combo
#
# e.g. cloning last 10 commits:
#
# clone nkmathew/yasi-sexp-indenter 10
#
if [[ -n $1 ]]; then
if [[ $1 =~ ^http[s]*:// ]]; then
@nkmathew
nkmathew / gist-jumper.user.js
Created April 29, 2016 14:54
Greasemonkey script for easily jumping to a user's gist page from the main page using the "gist" link at the top of the page
// ==UserScript==
// @name Gist Jumper
// @description Enables you to go to a users' gist page using the normal 'gist' link
// @author nkmathew
// @namespace http://nkmathew.net
// @include https://github.com/*
// @version 0.1.0
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==