This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import csv | |
import datetime | |
import signal | |
import sys | |
import time | |
from pythonping import ping | |
PINGURL1 = "sea15s07-in-f78.1e100.net" # A Google server | |
PINGURL2 = "oldschool31.runescape.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Flight management | |
// Copyright Austin Beatty 2013 | |
#include <iostream> | |
#include <list> | |
#include <string> | |
using namespace std; | |
struct Flight |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -i a=47 | |
declare -i n=25 | |
declare -i z=0 | |
while (($n>0)); do | |
z=$a+$z | |
n=$n-1 | |
done | |
echo "The answer is $z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import feedparser | |
import subprocess | |
d = feedparser.parse('http://gdata.youtube.com/feeds/base/users/USER/newsubscriptionvideos') | |
onetoten = range(0, 20) | |
for n in onetoten: | |
print(str(n)+". "+d.entries[n].title+" - "+d.entries[n].author) | |
x = int(input('Which number (0-19)? ')) | |
print(d.entries[x].link) | |
rawurl = subprocess.check_output(['youtube-dl', '-g', '--max-quality=22', '--cookies', '/tmp/ytdl-cookie.txt', d.entries[x].link]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --header="Host: stabyourself.net" --header="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2" --header="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --header="Accept-Language: en-us,en;q=0.5" --header="Accept-Encoding: gzip, deflate" --header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" --header="Connection: keep-alive" --header="Referer: http://stabyourself.net/nottetris2/" --header="Cookie: __utma=2319858.1453359753.1316034880.1316034880.1316744373.2; __utmz=2319858.1316744373.2.2.utmcsr=makeuseof.com|utmccn=(referral)|utmcmd=referral|utmcct=/tag/tetris-2-tetris-anarchists-crossplatform/; PHPSESSID=29abafdfa0e1baf451891c329a73326c; __utmb=2319858.1.10.1316744373; __utmc=2319858" 'http://stabyourself.net/dl.php?file=nottetris2/nottetris2-linux.zip' --content-disposition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
package=`zenity --entry --text="Enter the name of an installed package"` | |
output=`pacman -Ql "$package" | grep /usr/bin` | |
zenity --info --text="$output" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
URL=`xclip -o` | |
RAWURL=`youtube-dl -g --max-quality=22 --cookies /tmp/ytdl-cookie.txt "$URL"` | |
mplayer -cookies -cookies-file /tmp/ytdl-cookie.txt "$RAWURL" |