Skip to content

Instantly share code, notes, and snippets.

View mjsilva's full-sized avatar

Manuel Silva mjsilva

View GitHub Profile
@mjsilva
mjsilva / deletenodatatorrents.php
Created December 14, 2016 09:28
Using transmission-cli remove all torrents with "Error: No data found!"
<?php
$torrents = shell_exec("transmission-remote -n 'transmission:transmission' -l");
$torrents = explode("\n", $torrents);
$torrents = array_map(function($value)
{
$value = str_replace(" ", " ", trim($value));
return explode(" ", $value);
#!/bin/bash
#-----------------------------------------------------------------------
#
DEBUG=0
HOST="127.0.0.1"
PORT="9091"
TRURL="http://$HOST:$PORT/transmission/rpc"
USER=""
@mjsilva
mjsilva / svn-remove-stale-branches.sh
Created November 30, 2012 14:25
Remove branches that belong to closed tickets
#!/bin/bash
if (($# == 0)); then
echo ""
echo "Available flags:"
echo "-s svn url"
echo "-j jira url"
echo "-v venture project code"
echo "-u jira/svn user"
echo "-p jira/svn password"