Skip to content

Instantly share code, notes, and snippets.

@libraplanet
libraplanet / grive.service
Created February 27, 2017 11:32
sync google drive using grive2 with white list.
[Unit]
Description=grive sync service
After=network.target
[Service]
User=grive
Group=grive
Type=simple
ExecStart=~/grive.sh "samle"
KillMode=control-group
@libraplanet
libraplanet / using 7zip.bat
Last active January 17, 2017 15:29
create sfx droplet.
@SETLOCAL
@SET _7ZIP_HOME=C:\Program Files\7-Zip
@REM ----------------------------------------------------------------------------------------------
@REM param init
@REM ----------------------------------------------------------------------------------------------
@SET IN_FILE=%~1
@SET OUT_FILE=%~dpn1.exe
@REM ----------------------------------------------------------------------------------------------
@libraplanet
libraplanet / grive.service
Last active September 28, 2016 18:55
sync google drive using grive2.
[Unit]
Description=grive sync service
After=network.target
[Service]
User=grive
Group=grive
Type=simple
ExecStart=~/grive.sh
KillMode=control-group
@libraplanet
libraplanet / PermutationBowlCount
Last active September 1, 2016 15:06
count, if total is 24 at all line in permutation.
count, if total is 24 at all line in permutation.
@libraplanet
libraplanet / main.gs
Last active August 7, 2016 13:04
movie file on google drive using google apps script.
/**
* entry point.
*/
function main() {
/* src dir id. */
var srcFolderId = '*****';
/* tgt dir id. */
var tgtFolderId = '*****';
var srcFolder = DriveApp.getFolderById(srcFolderId);
@libraplanet
libraplanet / collect.bat
Last active April 29, 2016 15:42
move files recursive to directory from directory, keeping sub directory tree.
@SETLOCAL
@GOTO :sub_main
@REM ----------------------------------------------------------------------------------------------
@REM -- sub_list
@REM -- arg[1] : dir path
@REM ----------------------------------------------------------------------------------------------
:sub_list
@SET BASE_DIR=%~1
@libraplanet
libraplanet / recorder.sh
Created February 24, 2016 19:56
recording RTMP to local using ffmpeg.
#!/bin/sh
#------------------
# arguments
#------------------
BASE_DIR="$1"
REC_SEC="$2"
REC_TYPE="$3"
@libraplanet
libraplanet / icecast.service
Created January 4, 2016 16:52
icecast.service
[Unit]
Description=Icecast2 service
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/icecast -c /etc/icecast.xml
ExecReload=/bin/kill -HUP $MAINPID
User=icecast
Group=icecast
@libraplanet
libraplanet / ffmpegdemux.bat
Last active December 2, 2015 16:31
demux to Icecast2 from RTMP using ffmpeg on windows.
@SETLOCAL
@SET FFMPEG_HOME=C:\ffmpeg-20151130-git-7b11eea-win64-static\bin
@SET PATH=%FFMPEG_HOME%;%PATH%
@REM ----------------------------------------------------------------------------------------------
@REM settings
@REM ----------------------------------------------------------------------------------------------
@REM [input rtmp url]
@SET RTMP_URL=rtmp://****/****/****
@libraplanet
libraplanet / vlctranscode.bat
Created December 1, 2015 14:51
transcode to Icecast2 from RTMP using vlc.
@SETLOCAL
@SET VLC_HOME=C:\Program Files (x86)\VideoLAN\VLC
@SET PATH=%VLC_HOME%;%PATH%
@REM ----------------------------------------------------------------------------------------------
@REM settings
@REM ----------------------------------------------------------------------------------------------
@REM [input rtmp url]
@SET RTMP_URL=rtmp://****/****/****