Skip to content

Instantly share code, notes, and snippets.

@Hellowlol
Hellowlol / kill_a_stream.py
Last active January 18, 2021 14:37
Plexpy script, kill a plex stream
"""
This is a simple script showing how you can used plexpys notifications system to kill a stream
Possible plexpyargs: -tk {transcode_key} -u {username} -td {transcode_decision} -t 20:20 -ln Secret_tash
Instructions:
1. Save the script somewhere on your computer as kill_a_stream.py.
@Hellowlol
Hellowlol / throttle_nzbclient.py
Last active January 3, 2020 02:48
Simple script to throttle sabnsbd and nzbget
from __future__ import print_function
import argparse
import requests # pip install requests
import sys
from jsonrpclib import jsonrpc # pip install jsonrpclib-pelix
"""
Simple script to throttle nzb clients for plexpy
@scturtle
scturtle / surfingkeys.js
Last active January 8, 2018 00:27
surfingkeys sucks
map('F', 'af');
map('gt', 'R');
map('gT', 'E');
map('<Ctrl-n>', 'R');
map('<Ctrl-p>', 'E');
mapkey('H', '#4Go back in history', function() { history.go(-1); }, {repeatIgnore: true});
mapkey('L', '#4Go forward in history', function() { history.go(1); }, {repeatIgnore: true});
map('d', 'x');
map('u', 'X');
map('I', '<Alt-s>');
@awenner
awenner / mappings.js
Last active November 14, 2016 16:46
SurfingKeys Mappings
// an example to replace `u` with `?`, click `Default mappings` to see how `u` works.
map('?', 'u');
// Add search alias for Wikipedia
addSearchAliasX('w', 'Wikipedia', 'https://en.wikipedia.org/w/index.php?search=', 's', 'https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=', function(response) {
var res = eval(response.text);
Omnibar.listWords(res[1]);
});
// Add search alias for CanLII
#!/usr/bin/python
# Suppose you have, in InoReader, a folder "images" with a bunch of Tumblr streams.
# Suppose you want to skip everything in that stream *except* for large JPEGs which
# you have not seen before.
##
# InoReader doesn't have a feature for that.
# This is how to do it.
#
# This needs an enhanced librssreader, from github.com/smurfix/librssreader

Problem

Yahoo Pipes is closing, downloading http://pipes.yahoo.com/pipes/pipe.info?_out=json&_id= via browser for hundreds of pipes infeasible. There is https://gist.github.com/psychemedia/2351614 but it only works for public pipes and you don't want to make all your pipes public.

Solution

  1. Login to Yahoo Pipes, open debug console (F12 in Chrome/FF), click the "json feed" button to get to a page with this url scheme: http://pipes.yahoo.com/pipes/person.info?_out=json&display=pipes&guid=
  2. In the debug console get the cURL command for the current request (Net/Network tab, copy as cURL)
  3. Execute the command which we will create in the following to download all descriptions of your pipes including their ID
  • Prepend for page in ``seq 1 10``; do to (2.), where you replace 10 by the number of pages you have in your pipes overview
  • After _out=json&display=pipes in (2.) insert &page=$page
  • Append -o pipes_$page.json; done to (2.)
@lambdalisue
lambdalisue / rsync_readynas
Created July 5, 2015 16:23
Cron script for rsync to ReadyNas
#!/bin/bash
NAME="$1"
HOME=$HOME
HOST=0.0.0.0
RSYNC=/usr/bin/rsync
if [[ -z $NAME ]]; then
echo "A name argument is required to be specified."
exit 1
fi
@vspek
vspek / upgrade_laravel4.sh
Last active January 30, 2017 15:52
Codeanywhere shell script to install Laravel 5 on Laravel 4 dev machine
#!/usr/bin/env bash
# make file executable chmod +x upgrade_laravel4.sh
sudo apt-get update
#sudo apt-get upgrade -y
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade -y
sudo /usr/local/bin/composer self-update
@Lytol
Lytol / layer1.kll
Created April 21, 2015 06:23
Lytol's Keyboard Layout for Infinity Keyboard
Name = Layer1;
Version = 0.1.0;
Author = "Brian Smith <[email protected]";
KLL = 0.3;
# Modified Date
Date = 2015-03-05;
# Number row
@CoderPuppy
CoderPuppy / .cvimrc
Last active January 30, 2017 15:52
cVim RC
map j scrollLeft
map k scrollDown
map l scrollUp
map ; scrollRight
map K previousTab
map L nextTab
map J goBack
map I goForward
map C-k scrollPageDown
map C-l scrollPageUp