Skip to content

Instantly share code, notes, and snippets.

@cirrusUK
cirrusUK / tv.sh
Last active April 27, 2024 06:41
watch live TV in VLC/MPV/Mplayer etc (#UK IP & account over at http://tvcatchup.com required.) moar info > http://cirrusminor.info/2013/10/19/uk-linux-users-watch-tv-in-vlc-mplayer/
#!/bin/bash
clear
ua="BlackBerry9000/4.6.0.167 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/102"
username="username from http://tvcatchup.com" #before using this script you will need an acc at http://tvcatchup.com
password="password from http://tvcatchup.com" #before using this script you will need an acc at http://tvcatchup.com
player="mpv" #can edit to prefered player
dati=`wget -U "$ua" --no-check-certificate --save-cookies=cookie.txt -q --keep-session-cookies "http://m.tvcatchup.com" -O-`
hash=`echo "$dati" | grep -o "&hash=[^&]*" | cut -d"=" -f2`
list=`echo "$dati" | grep -o '<a href="#" onclick="javascript:loadChannel([^)]*' | cut -d'(' -f2 | sed "s#, '#) #g" | sed "s#'##g"`
check=`wget -U "$ua" --save-cookies=cookie.txt --load-cookies=cookie.txt --keep-session-cookies --no-check-certificate --header "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" --header "X-Requested-With: XMLHttpRequest" --header "Referer: http://m.tvcatchup.com/" --post-data="username=${username}&hash=${ha
@cirrusUK
cirrusUK / weechat.txt
Created November 21, 2013 22:31
reference file for my weechat config
/server add geekshed irc.geekshed.net/6667
/server del freenode
/mouse enable|disable|toggle [<delay>]
/set weechat.look.mouse on
/set irc.server.geekshed.autoconnect on
/set irc.server.geekshed.command "/msg nickserv identify ********"
/set irc.server.geekshed.autojoin "#bleepingcomputer,#jupiterbroadcasting,#cirrus"
/set irc.server.freenode.username "cirrus"
@cirrusUK
cirrusUK / tpb.sh
Created November 26, 2013 18:04
shell script for use with transmission-cli to search the pirate bay torrents via TUI.
#!/bin/sh
#
# by Sairon Istyar, 2012
# distributed under the GPLv3 license
# http://www.opensource.org/licenses/gpl-3.0.html
#
### CONFIGURATION ###
# program to use for torrent download
# magnet link to torrent will be appended
@maartenbosteels
maartenbosteels / sh
Created November 28, 2023 08:22
monitor memory and cpu usage of a single process
PID=$1
echo "Monitoring CPU usage of process with PID ${PID}"
ps -ef | grep $PID
OUTPUT_FOLDER=~/.process_stats
mkdir -p ${OUTPUT_FOLDER}
MEM_STATS=${OUTPUT_FOLDER}/mem_${PID}.txt
@cirrusUK
cirrusUK / pms.py
Created December 4, 2013 19:49
standalone python script for searching,streaming,downloading mp3's from www.pleer.com script author https://github.com/np1/pms #python script 'poor mans spotify'
#!/usr/bin/python
''' pms
Copyright (C) 2013 nagev
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
#!/usr/bin/env python
"""
pms-youtube.
https://github.com/np1/pms-youtube
Copyright (C) 2014 nagev
This program is free software: you can redistribute it and/or modify
@cirrusUK
cirrusUK / iplayer
Last active April 27, 2024 06:36
Lists, Records and Streams BBC iPlayer TV and Radio programmes + other Programmes via 3rd-party plugins. Requires a UK IP
#!/usr/bin/env perl
#
# get_iplayer - Lists, Records and Streams BBC iPlayer TV and Radio programmes + other Programmes via 3rd-party plugins
#
# Copyright (C) 2008-2010 Phil Lewis
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@Sh4yy
Sh4yy / clx.go
Created April 25, 2024 20:39
Generate CLI commands for common tasks.
package main
import (
"context"
"errors"
"fmt"
"io"
"log"
"os"
"runtime"
@cirrusUK
cirrusUK / livestreamer-alias
Created April 25, 2014 23:18
zsh aliases for livestreamer
##Video Streams
alias las="mpv http://videocdn-us.geocdn.scaleengine.net/jblive-iphone/live/jblive.stream/playlist.m3u8"
alias fam="livestreamer -p mpv justin.tv/entertainment_tv119 best"
alias crime="livestreamer -p mpv justin.tv/xcrimecentralxx source"
alias skynews="mplayer mms://live1.wm.skynews.servecast.net/skynews_wmlz_live300k"
alias sport="mplayer rtmp://178.22.217.150/tv/live/5.sdp"
alias sport1="mplayer mms://cht-cdn220-is-2.se.bptvlive.ngcdn.telstra.com/bp_online_tvn_med"
alias eurosport="mplayer http://esioslive2-i.akamaihd.net/hls/live/200728/AL_ESP1_UK_ENG/playlist_2500.m3u8"
alias animal="mplayer rtmp://178.22.217.150/tv/live/4.sdp"
alias first48="livestreamer -p mpv justin.tv/firstfourtyeight7#/w/6716687520/16 best"
mplayer rtmp://stream.smcloud.net/live2/vox/vox_360p #vox
mplayer http://usa.fankytv.com/live/espn.stream/playlist.m3u8 #espn
mplayer http://195.244.40.230:8001/1:0:1:274C:7FC:2:11A0000:0:0:0: #sky sports 5
mplayer http://202.75.23.37:1400/live/ch21/03.m3u8 ##Eurosport_HD_Eng
mplayer rtsp://a627.l2479952251.c24799.g.lm.akamaistream.net/D/627/24799/v0001/reflector:52251 #Bloomberg