Skip to content

Instantly share code, notes, and snippets.

/* ==UserStyle==
@name youtube.com full-height theater
@version 20230830.07.59
@namespace nathyong.github.io
@description little tweak that makes player in theater mode take almost entire height of the screen (still with topbar visible)
@author nathyong
@license No License
==/UserStyle== */
@nathyong
nathyong / tt.py
Last active August 29, 2015 14:08 — forked from C0mkid/tt.py
#!/usr/bin/python2.7
from subprocess import check_output, STDOUT, CalledProcessError, call
from sys import argv, stdout, stdin
def run(func):
"""Run a function and capture the output."""
if type(func) != type([]) and type(func) == type(""):
func = func.split(' ')
@nathyong
nathyong / tt.plugin.zsh
Created October 24, 2014 12:56
save into ~/.oh-my-zsh/custom/plugins/tt/tt.plugin.zsh
# lovingly ripped off the _tmux completion module included in zsh
function __tmux-sessions() {
local expl
local -a sessions
sessions=( ${${(f)"$(command tmux 2> /dev/null list-sessions)"}/:[ $'\t']##/:} )
_describe -t sessions 'sessions' sessions "$@"
}
function _tmux-attach-session() {
@nathyong
nathyong / irssi-terminal-notify.pl
Created October 13, 2014 12:18
A short script to link irssi to the OSX Notification Center. Requires terminal-notifier.
##
## Put me in ~/.irssi/scripts, and then execute the following in irssi:
##
## /load perl
## /script load irssi-terminal-notify
##
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);