View export-howlong.php
<?php
$USER="username";
$PASSWORD="secret";
$curl = curl_init ("https://howlongtobeat.com/login.php?t=in");
curl_setopt_array ($curl, array (
CURLOPT_ENCODING => "",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
View feedups.php
<?php
$token = "9D4277FBE0DDC988";
error_reporting (E_ALL);
ini_set ("display_errors", true);
$BASE = strtok (basename ($_SERVER["SCRIPT_NAME"], ".php"), "-");
function clear_dates ($str) {
return preg_replace ("/(\<updated\>)[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}\:[0-9]{2}\:[0-9]{2}\+[0-9]{2}\:[0-9]{2}(\<\/updated\>)/m", "\\1\\2", $str);
View export-airtable.sh
#!/bin/bash
app=appid
key=apikey
path=/var/local/moli
for table in example table names foo bar ; do
page=1
while : ; do
View transmission-proxy.php
<?php
$auth = "username:password";
$url = "http://hostname:9091/transmission/rpc";
ini_set ("display_errors", false);
ini_set ("log_errors", true);
error_reporting (E_ALL);
if (!isset ($_SERVER["PHP_AUTH_USER"]) || !isset ($_SERVER["PHP_AUTH_PW"])) {
header ('WWW-Authenticate: Basic realm="transmission-proxy"', true);
View flickr-download.sh
#!/bin/bash
photoset=72157657937398483
flickcurl photosets.getPhotos "$photoset" | grep -E '^photo with URI .+ ID [0-9]+ and [0-9]+ tags$' | grep -Eo '[0-9]{11,}' | sort --random-sort | while read -r flickrid ; do
if [ "$flickrid" -eq "$flickrid" ] 2>/dev/null ; then
url=$(flickcurl photos.getSizes $flickrid | grep -Ei '^ source http.+[o]\.jpg$' | grep -Eoi 'http.+\.jpg$' | head -1)
if [[ "$url" =~ ^http.+\.[jJ][pP][gG]$ ]] ; then
wget --quiet "$url"
fi
View feedrarbg.php
<?php
error_reporting (E_ALL);
ini_set ("display_errors", true);
$BASE = strtok (basename ($_SERVER["SCRIPT_NAME"], ".php"), "-");
libxml_use_internal_errors (true);
function clear_dates ($str) {
return preg_replace ("/(\<updated\>)[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}\:[0-9]{2}\:[0-9]{2}\+[0-9]{2}\:[0-9]{2}(\<\/updated\>)/m", "\\1\\2", $str);
View feedimdb.php
<?php
error_reporting (E_ALL);
ini_set ("display_errors", true);
$BASE = strtok (basename ($_SERVER["SCRIPT_NAME"], ".php"), "-");
function clear_dates ($str) {
return preg_replace ("/(\<updated\>)[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}\:[0-9]{2}\:[0-9]{2}\+[0-9]{2}\:[0-9]{2}(\<\/updated\>)/m", "\\1\\2", $str);
}
View logchk.php
<?php
ini_set ("display_errors", true);
if (!empty ($_SERVER["argv"][1])) $name = $_SERVER["argv"][1];
if (empty ($name)) $name = substr ($_SERVER["PWD"], strrpos($_SERVER["PWD"], "/")+1);
$last = 0;
if (file_exists ("logchk-$name.date")) {
$last = file ("logchk-$name.date");
$last = trim ($last[0]);
View ddns-curl.sh
#!/bin/bash
#run from crontab:
#*/5 * * * * ~/bin/ddns-curl.sh
host="example.myvnc.com"
if [ $EUID -ne 0 ] ; then echo 'you are not root' >&2 ; exit 1 ; fi
oldip=$(cat /var/cache/user/ip.txt 2>/dev/null)
View export-imdb.php
<?php
define ("id", 'secretkey');
$USER="123456789";
$curl = curl_init ("https://www.imdb.com/user/ur$USER/ratings/export");
curl_setopt_array ($curl, array (
CURLOPT_ENCODING => "",
CURLOPT_COOKIE => "id=".constant("id"),
CURLOPT_RETURNTRANSFER => true,