Skip to content

Instantly share code, notes, and snippets.

@nosmokingbandit
nosmokingbandit / rtorrent_xmlrpc.py
Created April 18, 2017 23:24 — forked from query/rtorrent_xmlrpc.py
Python module for interacting with rtorrent's XML-RPC interface directly over SCGI.
#!/usr/bin/python
# rtorrent_xmlrpc
# (c) 2011 Roger Que <[email protected]>
#
# Python module for interacting with rtorrent's XML-RPC interface
# directly over SCGI, instead of through an HTTP server intermediary.
# Inspired by Glenn Washburn's xmlrpc2scgi.py [1], but subclasses the
# built-in xmlrpclib classes so that it is compatible with features
# such as MultiCall objects.
@nosmokingbandit
nosmokingbandit / qbitToSickBeard.py
Created August 31, 2017 03:05
Script to start post-processing from QBittorrent for SickRage, SickGear, etc.
#!/usr/bin/env python2
# Author: NoSmokingBandit
#
# This file is an add-on for SickRage, SickGear, and possibly other forks.
#
# This file is provided for free without any warranty or guarantee.
#
# For more information see https://github.com/SickGear/SickGear
#
@nosmokingbandit
nosmokingbandit / WatcherLog.xml
Created October 11, 2017 01:41
Watcher Log language highlighting for Notepad++
<NotepadPlus>
<UserLang name="Watcher Log" ext="" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments"></Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@nosmokingbandit
nosmokingbandit / MoveBit.m1s
Last active March 14, 2018 19:56
BitMover dialog for Mach3
' BitMover dialog. https://gist.github.com/nosmokingbandit/76d2af6743f0c0625da9087cba5a3006
Public XAxisMoveDistance, YAxisMoveDistance, ZAxisMoveDistance As Double
Public Abort, OrigJogMode, MoveAbsolute, MoveRelative As Boolean
Public isImperial, MoveMM, MoveX, MoveY, MoveZ As Integer
Sub Main
OrigJogMode = GetIJMode() '1 for inc, 0 for abs
isImperial = GetSetupUnits() '1 for IN, 0 for MM machine units
Abort = False
@nosmokingbandit
nosmokingbandit / tv_sort.py
Created June 6, 2018 03:34
Simple tv episode sorting script
'''
Requires packages PTN, tvdb_api
Pass path to download dir/file as arg $1
'''
import PTN
from tvdb_api import tvdb_api
import sys
import os
import shutil
@nosmokingbandit
nosmokingbandit / decode.js
Created June 1, 2020 01:46
Nin10News decoder bookmarklet
javascript:
var CryptoJS = CryptoJS || function (u, p) {
var d = {}, l = d.lib = {}, s = function () { }, t = l.Base = { extend: function (a) { s.prototype = this; var c = new s; a && c.mixIn(a); c.hasOwnProperty("init") || (c.init = function () { c.$super.init.apply(this, arguments) }); c.init.prototype = c; c.$super = this; return c }, create: function () { var a = this.extend(); a.init.apply(a, arguments); return a }, init: function () { }, mixIn: function (a) { for (var c in a) a.hasOwnProperty(c) && (this[c] = a[c]); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } },
r = l.WordArray = t.extend({
init: function (a, c) { a = this.words = a || []; this.sigBytes = c != p ? c : 4 * a.length }, toString: function (a) { return (a || v).stringify(this) }, concat: function (a) { var c = this.words, e = a.words, j = this.sigBytes; a = a.sigBytes; this.clamp(); if (j % 4) for (var k = 0; k < a; k++)c[j + k >>> 2]
use crate::Base;
use std::{fmt::Display, ops::Range};
pub struct Day05 {
pub seeds: Vec<isize>,
conversion_charts: Vec<Vec<RangeDelta>>,
}
impl Day05 {
pub fn new() -> Day05 {