Skip to content

Instantly share code, notes, and snippets.

View tubbo's full-sized avatar
😎
losing my sight, losing my mind, go to the general to save some time

Tom Scott tubbo

😎
losing my sight, losing my mind, go to the general to save some time
View GitHub Profile
@fryfrog
fryfrog / radarr_cleanup_packed_torrent.sh
Last active March 29, 2023 17:21
A Radarr post processing script to remove the video file from packed torrents, modified version of subzero79/87a347a07964390884c9
#!/bin/bash
# Examples for testing
# radarr_moviefile_sourcefolder="/data/torrent/movies/Justice.League.2017.1080p.HDRip.X264.AAC-m2g" radarr_moviefile_sourcepath="/data/torrent/movies/Justice.League.2017.1080p.HDRip.X264.AAC-m2g/Justice.League.2017.1080p.HDRip.X264.AAC-m2g.mkv"
# Instructions
# Put this script somewhere on your file system like /usr/local/bin and make it executable.
#
# In Radarr, Settings -> Connect add a Custom Script
# On Grab: No
@mttdffy
mttdffy / unvalidate.rb
Last active November 17, 2017 19:59
RoR/Mongoid module for removing validations from a model
module Mongoid
module Unvalidate
extend ActiveSupport::Concern
module ClassMethods
# Removes specified validations from existing models for a given field
#
# @param [Symbol] field the field to remove validations from
# @param [Array<Symbol> | Symbol] validations validations to remove from field
QUnit.config.testTimeout = 4000;
/*global $ App*/
Ember.onLoad('application', function(application) {
//application.deferReadiness();
});
Ember.onLoad('Ember.Application', function(Application) {
Application.initializer({
name: 'tests',
@gaspanik
gaspanik / capture.js
Last active November 6, 2018 06:19
Take screenshot at single viewport size using CasperJS
var screenshotUrl = 'http://example.com/'
var casper = require("casper").create({
viewportSize: {
width: 1024,
height: 768
}
});
if (casper.cli.args.length < 1) {
@tubbo
tubbo / macvim_drawer.rb
Created July 9, 2012 12:56
macvim-drawer homebrew formula
require 'formula'
class MacvimDrawer < Formula
homepage 'https://github.com/alloy/macvim'
head 'git://github.com/alloy/macvim.git', :branch => 'split-browser'
def options
[
# Building custom icons fails for many users, so off by default.
["--custom-icons", "Try to generate custom document icons."],
@tubbo
tubbo / stock.rb
Created November 24, 2011 18:03
A stock price fetcher and dividend yield calculator for humans.
#!/usr/bin/env ruby
#
# = Stock
#
# Given a key/value pair of a stock symbol and how many shares you own, this
# program will spit out the yearly dividend amounts you will yield from holding
# it. Based on data from Yahoo! Finance.
#
# == Installation
# Install to ~/bin and run
@c4milo
c4milo / yourservice.conf
Created April 25, 2011 18:05
upstart example script
# Ubuntu upstart file at /etc/init/yourservice.conf
pre-start script
mkdir -p /var/log/yourcompany/
end script
respawn
respawn limit 15 5
start on runlevel [2345]