Skip to content

Instantly share code, notes, and snippets.

View PizzaPete's full-sized avatar
🧻

Pieter Bogaerts PizzaPete

🧻
  • Amersfoort, The Netherlands
View GitHub Profile
#!/bin/sh
TORRENTLIST=`transmission-remote --auth=user:password --list | sed -e '1d;$d;s/^ *//' | cut --only-delimited --delimiter=' ' --fields=1`
for TORRENTID in $TORRENTLIST
do
echo "* * * * * Operations on torrent ID $TORRENTID starting. * * * * *"
DL_COMPLETED=`transmission-remote --auth=user:password --torrent $TORRENTID --info | grep "Percent Done: 100%"`
if [ "$DL_COMPLETED" != "" ]; then
echo "Torrent #$TORRENTID is completed."
* * * * * root ../../bin/removecompletedtorrents.sh
*** Settings ***
Library AppiumLibrary run_on_failure=Log Source
*** Variables ***
${REMOTE_URL} http://localhost:4723/wd/hub
*** Test Cases ***
TestStart
[Documentation] Robotframework test
Open Application ${REMOTE_URL} platformName=iOS platformVersion=9.0 deviceName=iPhone 5s app=link/to/your.app automationName=appium appPackage=com.your.app appActivity=MainActivity
@PizzaPete
PizzaPete / karma-ui-router.js
Last active December 2, 2015 12:59
Karma ui-router state testing
/* globals describe, beforeEach, module, inject, it, expect */
'use strict';
// Based on: http://nikas.praninskas.com/angular/2014/09/27/unit-testing-ui-router-configuration/
describe('config', function () {
var $state, $templateCache, $location, $rootScope;
function mockTemplate(templateRoute, tmpl) {
$templateCache.put(templateRoute, tmpl || templateRoute);
@PizzaPete
PizzaPete / karma.conf.js
Last active July 14, 2016 13:40
Karma configuration for testing Angular with ES2015
var browsers = ['Chrome'];
var options = {
basePath: '',
browsers: browsers,
frameworks: ['browserify', 'jasmine'],
autoWatch: true,
singleRun: true,
preprocessors: {
'src/asset/javascript/**/*.js': ['babel', 'browserify'],