Skip to content

Instantly share code, notes, and snippets.

transmission:
host: localhost
user: _USERNAME_
pass: _PASSWORD_
folder:
root: "/public/"
down_path: "media/"
@jkpark
jkpark / config.yml
Last active January 8, 2021 04:12
flexget configuration file
# refer : https://github.com/Jonybat/flexget_config/blob/master/config.yml
variables: secrets.yml
templates:
anchors:
_transmission-settings: &transmission-settings
host: "{? transmission.host ?}"
port: 9091
username: "{? transmission.user ?}"
password: "{? transmission.pass ?}"
@jkpark
jkpark / transmission_post_download.sh
Created March 14, 2019 12:14
post work finished download torrent.
#!/bin/sh
# Transmission script to remove torrent from lists
# The file for logging events from this script
LOGFILE=/var/log/transmission_post_download.log
# Remote login details.
TR_HOST="9091 --auth=transmission_rpc_id:transmission_rpc_pw"
echo "`date +%Y.%m.%d_%H.%M.%S` auto removed : $TR_TORRENT_NAME" >> $LOGFILE
@jkpark
jkpark / ddns-cloudflare.sh
Created March 14, 2019 10:56
update ddns for cloudflare
#!/bin/bash
# 2019-03-07 | jkpark | Created
# Account and Domain
EMAIL=email@address.com
KEY=df8e92___your_global_api_key___bd5526
DOMAIN=exsample.com
A_RECORD_LIST=exsample.com,cloud.exsample.com
@jkpark
jkpark / transmission-daemon-settings.json
Last active December 29, 2022 18:09
transmission-daemon-settings.json
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
@jkpark
jkpark / btrfs-snapshot.sh
Created March 8, 2019 02:19
btrfs snapshot script
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "No subvolume is supplied."
exit 1
fi
btrfs subvolume snapshot /mnt/hdd1_btrfs/@$1 /mnt/hdd1_btrfs/snapshots/$1/@$1_`date +%Y.%m.%d_%H.%M.%S`
@jkpark
jkpark / .vimrc
Created December 28, 2018 09:10
my .vimrc
" 2018-12-28 jkpark (https://jkpark.github.io)
call plug#begin('~/.vim/plugged')
Plug 'junegunn/seoul256.vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" for vim-airline
let g:airline#extensions#tabline#enabled = 1 " turn on buffer list
let g:airline_theme='hybrid'
@jkpark
jkpark / ObverserPtnService.java
Created March 22, 2017 14:53
Binding Service - Service
/**
* Command to the service to register a client, receiving callbacks
* from the service. The Message's replyTo field must be a Messenger of
* the client where callbacks should be sent.
*/
public final static int MSG_REGISTER_CLIENT = 1;
/**
* Command to the service to unregister a client, ot stop receiving callbacks
* from the service. The Message's replyTo field must be a Messenger of
* the client as previously given with MSG_REGISTER_CLIENT.
@jkpark
jkpark / ObverserPtnActivity.java
Created March 22, 2017 14:51
Binding Service - Activity
Messenger mService = null;
boolean bindService = false;
class IncomingHandler extends Handler {
@Override
public void handleMessage(Message msg) {
}
}
@jkpark
jkpark / MDateView.java
Last active March 22, 2017 13:35
TextView with Date
public class MDateView extends View {
private final static String FORMAT_DEFULAT = "yyyy.MM.dd";
private boolean isTickable = false;
private boolean isColon = true;
private Calendar mCalendar;
private Runnable mTickerRunnable;
private Handler mHandler;
private String mFormat = FORMAT_DEFULAT;
private String mDateString = "", mTimeString = "";