Skip to content

Instantly share code, notes, and snippets.

View andyeff's full-sized avatar

Andy F andyeff

View GitHub Profile
@andyeff
andyeff / dashtube-cygwin
Last active December 30, 2015 04:59
Dashtube in Cygwin
#!/bin/bash
id_pre=$(youtube-dl --no-playlist --get-id -- $1)
if [[ $? -ne 0 ]]; then
exit $?
fi
id=$(echo $id_pre | tr -d '\r')
@andyeff
andyeff / dashtube-dl.sh
Last active January 2, 2016 09:09
Dashtube (bash)
#!/bin/bash
id=$(youtube-dl --no-playlist --get-id -- $1 | tr -d '\r')
if [[ $? -ne 0 ]]; then
exit $?
fi
desc=$(youtube-dl --no-playlist --get-title -- $1 | tr -cd '[:alnum:][:space:]' | tr -d '\r')
echo "id is ${id}"
@andyeff
andyeff / livestream-batch
Last active August 29, 2015 14:01
Livestreamer - Windows batch
@echo off
set stream=%1
set quality=%2
if [%stream%]==[] goto :eof
if [%quality%]==[] set quality=source
livestreamer twitch.tv/%stream% %quality%
@andyeff
andyeff / livestream-bash
Created May 17, 2014 18:23
Livestreamer - Bash shellscript
#!/bin/bash
stream=$1
quality=$2
# livestreamer twitch.tv/${stream} ${quality:-source}
livestreamer twitch.tv/${stream} ${quality:-source}
@andyeff
andyeff / st3-keybind-user
Created May 20, 2014 12:08
Sublime Text user keybinds
[
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]
@andyeff
andyeff / st3-prefs-user
Created May 20, 2014 12:08
Sublime Text user prefs
{
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"default_line_ending": "unix",
"font_size": 10,
"ignored_packages":
[
"Vintage"
],
"scroll_speed": 0,
"tab_completion": true,
@andyeff
andyeff / .screenrc
Created July 31, 2014 13:25
ScreenRC
# Fixes resizing in putty
termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
# Allows scrollback in putty without using screens copy mode (for ref: Ctrl-A, esc to enter copy mode)
termcapinfo xterm ti@:te@
@andyeff
andyeff / skybot-example-config
Created September 26, 2014 17:43
Skybot example config
{
"connections":
{
"local irc":
{
"server": "irc.quakenet.org",
"nick": "botnick",
"channels": ["#mychan"],
"qserv_username": "qservnick",
"qserv_password": "qservpass",
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
{u'contributors': None,
u'coordinates': None,
u'created_at': u'Tue Feb 10 13:58:51 +0000 2015',
u'entities': {u'hashtags': [],
u'media': [{u'display_url': u'pic.twitter.com/lc2bccnSaj',
u'expanded_url': u'http://twitter.com/Polydere/status/565147890293952512/photo/1',
u'id': 565147889316286464L,
u'id_str': u'565147889316286464',
u'indices': [0, 22],
u'media_url': u'http://pbs.twimg.com/tweet_video_thumb/B9fPAtRCUAAzKMa.png',