Skip to content

Instantly share code, notes, and snippets.

JK Park jkpark

Block or report user

Report or block jkpark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jkpark
jkpark / config.yml
Created Sep 16, 2019
flexget configuration file
View config.yml
templates:
anchors:
transmission:
host: localhost
username: your_transmission_rpc_id
password: your_transmission_rpc_pw
# Global Settings
global:
free_space:
@jkpark
jkpark / transmission_post_download.sh
Created Mar 14, 2019
post work finished download torrent.
View transmission_post_download.sh
#!/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 Mar 14, 2019
update ddns for cloudflare
View ddns-cloudflare.sh
#!/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 Mar 14, 2019
transmission-daemon-settings.json
View 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 Mar 8, 2019
btrfs snapshot script
View btrfs-snapshot.sh
#!/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`
View .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 Mar 22, 2017
Binding Service - Service
View ObverserPtnService.java
/**
* 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 Mar 22, 2017
Binding Service - Activity
View ObverserPtnActivity.java
Messenger mService = null;
boolean bindService = false;
class IncomingHandler extends Handler {
@Override
public void handleMessage(Message msg) {
}
}
@jkpark
jkpark / MDateView.java
Last active Mar 22, 2017
TextView with Date
View MDateView.java
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 = "";
You can’t perform that action at this time.