Skip to content

Instantly share code, notes, and snippets.

diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py
index 5890a62..8f5d73e 100644
--- a/Contents/Code/__init__.py
+++ b/Contents/Code/__init__.py
@@ -206,9 +206,9 @@ def GetVideoObject(url, video_type, title=None, summary=None, thumb_url=None):
thumb = Resource.ContentsOfURLWithFallback(url=thumb_url, fallback=PLUGIN_ICON_DEFAULT)
if video_type == "episode":
- return EpisodeObject(key=Callback(VideoDetails, url), rating_key=url, items=video_items(url), title=tit
+ return EpisodeObject(key=Callback(VideoDetails, url=url), rating_key=url, items=video_items(url), title
Sep 24, 2012 12:11:53 [0xb0081000] DEBUG - Request: GET /system/services/url/lookup?url=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fvideo%2Fstreaming%2Fmini-mode.html%3Fasin%3DB000H4QD1O [127.0.0.1:53165] (1 live)
Sep 24, 2012 12:11:53 [0xb0081000] DEBUG - * url => http://www.amazon.com/gp/video/streaming/mini-mode.html?asin=B000H4QD1O
Sep 24, 2012 12:11:53 [0xb0081000] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/services/url/lookup?url=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fvideo%2Fstreaming%2Fmini-mode.html%3Fasin%3DB000H4QD1O
Sep 24, 2012 12:11:53 [0xb0081000] DEBUG - HTTP requesting to: http://127.0.0.1:53087/system/services/url/lookup?url=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fvideo%2Fstreaming%2Fmini-mode.html%3Fasin%3DB000H4QD1O
Sep 24, 2012 12:11:53 [0xb0081000] DEBUG - [com.plexapp.system] HTTP reply status 404, with 0 bytes of content.
@jk0
jk0 / gist:3813155
Created October 1, 2012 17:22
RouterOS DynDNS Script
:local username "username"
:local password "password"
:local hostname "hostname"
:global forceUpdate
:global previousIP
:local currentIP [/ip address get [find interface="ether1-gateway"] address];
:for i from=([:len $currentIP] - 1) to=0 do={
air:python-openstackclient jkearney$ os compute flavor-list
+------+--------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+------+--------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| 1 | m1.tiny | 512 | 0 | N/A | 0 | 1 | | N/A | {} |
| 2 | m1.small | 2048 | 20 | N/A | 0 | 1 | | N/A | {} |
| 3 | m1.medium | 4096 | 40 | N/A | 0 | 2 | | N/A | {} |
| 4 | m1.large | 8192 | 80 | N/A | 0 | 4 | | N/A | {} |
| 5 | m1.xlarge | 16384 | 160 | N/A | 0 | 8 | | N/A | {} |
| 1000 | Grid testing | 4048 | 160 | N/A | 0 | 2 | |
air:~ jkearney$ os compute flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | {} |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | {} |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | {} |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | {} |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
@jk0
jk0 / gist:3983068
Created October 30, 2012 21:07
Pyhole Jenkins Plugin
# Copyright 2012 Josh Kearney
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@jk0
jk0 / gist:6553389
Created September 13, 2013 17:12
Rsync Backup Script
#!/bin/bash
DRY_RUN=false
REMOTE_HOST="<HOST>"
REMOTE_PATH="<ABSOLUTE PATH>"
LOCAL_PATH="<ABSOLUTE PATH>"
RSYNC_OPTIONS=(
-a # archive mode
import XenAPI
XENAPI_SESSION = None
def get_session():
xen_api_url = "http://0.0.0.0"
xen_username = "username"
xen_password = "password"
@jk0
jk0 / gist:b4a6040cc8ec66060051
Last active August 29, 2015 14:13
Replace 'response = h.request(req)'
begin
if response.nil?
h.request(req) do |r|
response = r
h.finish
end
end
rescue
retry
end
@jk0
jk0 / gist:127b5d503c67fbea7c33
Last active July 18, 2023 15:09
Synology DSM 5.1 and Tripp Lite SMART500RT1U
Ubuntu 10.04 (32bit)
==========================
apt-get update
apt-get upgrade -y
apt-get install -y autoconf automake build-essential git-core libglib2.0-0 libglib2.0-dev libusb-dev libtool pkg-config vim
git clone [email protected]:networkupstools/nut.git
cd nut