I hereby claim:
- I am fent on github.
- I am fent (https://keybase.io/fent) on keybase.
- I have a public key ASApFIKpv-SF5rAxV6-JbE4elpe4Xo_i8cipgJx8cQbfjQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// ==UserScript== | |
// @name offsite links new tab | |
// @namespace fent | |
// @version 0.1.1 | |
// @description Opens offsite links in a new tab. | |
// @include /https?:\/\// | |
// ==/UserScript== | |
var originalHost = window.location.host; | |
document.body.addEventListener('click', function(e) { |
If you watch a lot of videos, you may find these useful.
Use this one for youtube: https://greasyfork.org/en/scripts/811-resize-yt-to-window-size
If you want to control the youtube and twitch players with keyboard shortcuts, I also have these https://github.com/fent/dotfiles/tree/master/Scripts
To move videos to another "player" window as they are opened, and pause any playing videos, https://github.com/fent/chrome-vsnap
#!/bin/bash | |
h=$1 | |
if [ -z $1 ] | |
then | |
echo "Usage: `basename $0` <host pattern>" | |
exit 1 | |
fi | |
ec2-host | grep $h | awk '{split($0, a, "\t"); print a[2]}' | awk '{x = (!x) ? $0 : x "\n" $0;} END {print x;}' |
# If in a playlist, play the next video. | |
tell application "Google Chrome" | |
repeat with t in tabs of windows | |
tell t | |
if URL starts with "http://www.youtube.com/watch" or URL starts with "https://www.youtube.com/watch" then | |
execute javascript " | |
var player = | |
document.getElementById('movie_player') || | |
document.getElementsByTagName('embed')[0]; | |
var next = document.getElementsByClassName('yt-uix-button-icon-playlist-bar-next')[0]; |
var RandExp = require('randexp'); // must require on node | |
// supports grouping and piping | |
new RandExp(/hello+ (world|to you)/).gen(); | |
// => hellooooooooooooooooooo world | |
// custom character sets and ranges and references | |
new RandExp(/<([a-z]\w{0,20})>foo<\1>/).gen(); | |
// => <m5xhdg>foo<m5xhdg> |