Skip to content

Instantly share code, notes, and snippets.

View troyp's full-sized avatar

Troy Pracy troyp

  • Lismore, NSW, Australia
View GitHub Profile
@troyp
troyp / redir.md
Created May 8, 2021 06:29 — forked from romainl/redir.md
Redirect the output of a Vim or external command into a scratch buffer

Redirect the output of a Vim or external command into a scratch buffer

Usage (any shell)

Show full output of command :hi in scratch window:

:Redir hi

Show full output of command :!ls -al in scratch window:

// ==UserScript==
// @name word highlight
// @namespace http://ss-o.net/
// @description keywords highlight for Google Search and All
// @include http://*
// @include https://*
// ==/UserScript==
// スクロール中のみハイライトするように変えた。
//console.time("highlight");
(function word_hightlight(loaded){
@troyp
troyp / xreadkeys.c
Created January 18, 2018 01:03 — forked from javiercantero/xreadkeys.c
A X11/Xlib program that reads the KeyPress and KeyRelease events from the window and prints them to the standard output. Used to debug the keyboard within X.
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
Display *display;
Window window;
XEvent event;
int s;
@troyp
troyp / .gitignore
Last active November 12, 2017 00:35 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
user_data.sh
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@troyp
troyp / Bullseye.bookmarklet
Created February 17, 2016 20:32 — forked from ttscoff/Bullseye.bookmarklet
A bookmarklet for grabbing just a piece of a web page and converting it to Markdown using heckyesmarkdown.com.
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading&hellip;</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/6109434/raw/Bullseye.js?x="+(Math.random());})();
@troyp
troyp / grab links.bookmarklet
Created February 17, 2016 20:32 — forked from ttscoff/grab links.bookmarklet
Create a bookmark and paste the code from `grab links.bookmarklet` into the url. Trigger it on a page containing links you want to save and then click the section of the page containing the links. A Markdown list of all links will be generated, and clicking the resulting list will select all for copying.