Skip to content

Instantly share code, notes, and snippets.

View kdbruin's full-sized avatar

Kees de Bruin kdbruin

View GitHub Profile
@bulljit
bulljit / removecompletedtorrents.sh
Created January 22, 2011 23:17
Transmission-Daemon: Remove Completed Torrents
#!/bin/sh
# script to check for complete torrents in transmission folder, then stop and move them
# either hard-code the MOVEDIR variable here…
MOVEDIR=/home/mjdescy/media # the folder to move completed downloads to
# …or set MOVEDIR using the first command-line argument
# MOVEDIR=%1
# use transmission-remote to get torrent list from transmission-remote list
# use sed to delete first / last line of output, and remove leading spaces
# use cut to get first field from each line
@alex-cellcity
alex-cellcity / Version.m
Created May 30, 2011 04:55
Runtime iOS Version Checking
/*
* System Versioning Preprocessor Macros
*/
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
@kyv
kyv / photos_tag.rb
Last active January 12, 2021 21:10 — forked from sukima/photos_tag.rb
Gallery Tag for Jekyll/Octopress Using extended version of bootstrap carousel
# Title: Gallery Tag for Jekyll
# Authors: Kevin Brown
# Description: gallery using extended bootstrap carousel. Uses a CDN if needed.
#
# Adaption of "Photos tag for Jekyll" by Devin Weaver
# Using bootstrap carosel-extended instead of fancybox: "http://bootsnipp.com/snipps/carousel-extended"
# We have also left out the photo tag and are using solly the gallery function
#
# ** This only covers the markup. Not the integration of carousel-extended **
#
@jazzsequence
jazzsequence / bootstrap_link_pages.php
Created October 3, 2013 17:58
Bootstrapping wp_link_pages - a wp_link_pages alternative for Twitter Bootstrap support. Based on code found here: http://wordpress.stackexchange.com/questions/14406/how-to-style-current-page-number-wp-link-pages
@140am
140am / pytumblr_example.py
Created January 23, 2014 06:24
Example of using the Python Tumblr API v2 Client
""" Tumblr API Example - Python CLI
"""
import oauth2
import urlparse
import pytumblr
REQUEST_TOKEN_URL = 'http://www.tumblr.com/oauth/request_token'
AUTHORIZATION_URL = 'http://www.tumblr.com/oauth/authorize'
ACCESS_TOKEN_URL = 'http://www.tumblr.com/oauth/access_token'
@kutyel
kutyel / iban.filter.js
Last active May 1, 2018 12:40
AngularJS filter to format IBAN accounts
(function() {
'use strict';
/**
* Formats a string and returns a valid IBAN account string
* @param {string} input example: 'ES0123456789012345678901'
* @return {string} output example: 'ES01 2345 6789 0123 4567 8901'
* @example <caption>{{'ES0123456789012345678901' | IBAN}}</caption>
*/
angular.module('app').filter('IBAN', () => iban => iban ? iban.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim() : '');
@btroncone
btroncone / ngrxintro.md
Last active June 26, 2024 08:27
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

#!/usr/bin/python3
"""
#------------------------------------------------------------------------------------------------
#-- Movie Tag Updater for Radarr
#--------------------------------------------------------------------------------------------------
# Program : Radarr_tagarr
# To Complie : n/a
#
# Purpose : Add tags and profiles to radarr movies. Tags are retreived from Radarr.
# Say Y to add a tag. N to skip a tag. N for all tags will remove all tags.
#!/usr/bin/python
#--------------------------------------------------------------------------------------------------
#-- Series Tag Updater for Sonarr
#--------------------------------------------------------------------------------------------------
# Program : SonarrTagarr
# To Complie : n/a
#
# Purpose : Add tags to Sonarr series. Tags are retreived from Sonarr.
# Say Y to add a tag. N to skip a tag. N for all tags will remove all tags.
#
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.duplicati.server</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Duplicati.app/Contents/MacOS/duplicati-server</string>
<string>--webservice-port=8200</string>