Skip to content

Instantly share code, notes, and snippets.

@noromanba
noromanba / t-um-block.user.js
Last active September 29, 2021 11:24
remove t.umblr.com redirector from links on Tumblr for UserScript/Content Scripts
// ==UserScript==
// @name t.um block
// @namespace http://noromanba.flavors.me
// @description remove t.umblr.com redirector from links on Tumblr for UserScript/Content Scripts
// @include http://*.tld/*
// @include https://*.tumblr.com/*
// @grant none
// @noframes
// @run-at document-body
// @version 2018.2.12.0
# autojump
function autojump-peco() {
local cd_history_path="~/.local/share/autojump/autojump.txt"
local SELECTED=$(eval more $cd_history_path | peco | cut -f2)
if [ 0 -ne ${#SELECTED} ]; then
eval echo "cd $SELECTED"
eval cd $SELECTED
fi
}
zle -N autojump-peco
@hirogasa
hirogasa / NicovideoPlayingFavicon.user.js
Last active December 20, 2015 14:29
ニコニコ動画の再生中ページのFaviconを変更するUserScript
// ==UserScript==
// @name NicovideoPlayingFavicon
// @namespace https://twitter.com/hirogasa/
// @match http://www.nicovideo.jp/watch/*
// @description ニコニコ動画の再生中ページのFaviconを変更します。
// @version 1.0
// ==/UserScript==
(function(){
var isPlaying = false;
@tmaeda
tmaeda / beep_if_long_time_past
Last active December 19, 2015 03:29
.bashrc に書いておくと、コマンドの終了までに10秒以上かかったら growl で通知してくれるよ。
beep_if_long_time_past() {
LAST_COMMAND_DURATION=$(($(date +%s) - ${LAST_COMMAND_TIME}))
LAST_COMMAND=${BASH_COMMAND}
[[ ${LAST_COMMAND_DURATION} -gt 10 ]] && { growlnotify -a Terminal -t "job finished" -m "${LAST_COMMAND_DURATION} seconds for ${LAST_COMMAND}!"; }
export LAST_COMMAND_TIME=
}
export PROMPT_COMMAND=beep_if_long_time_past
trap '[ -z ${LAST_COMMAND_TIME} ] && export LAST_COMMAND_TIME=$(date +%s)' DEBUG
@maripo
maripo / wikipedia_language_labels.user.js
Created October 21, 2012 02:25
Enhance links to other languages on Wikipedia
// ==UserScript==
// @name Wikipedia Language Labels
// @namespace org.maripo.neta
// @description Enhance links to other languages (e.g. Change "Français" to "Étoile (Français)" on http://en.wikipedia.org/wiki/Star )
// @include http://*.wikipedia.org/wiki/*
// @grant none
// @version 1
// ==/UserScript==
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git