Skip to content

Instantly share code, notes, and snippets.

View taylor224's full-sized avatar

Taylor Hoshino taylor224

View GitHub Profile
@taylor224
taylor224 / script.js
Last active February 14, 2020 02:32
Amazon aws Bulk SG IP add script
var script = document.createElement('script');
script.onload = function() {
jQuery.noConflict();
if (callback) {
callback(jQuery);
}
};
script.src = "https://code.jquery.com/jquery-2.1.1.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
@taylor224
taylor224 / README.md
Last active July 5, 2018 12:32
MariaDB Auto Backup Script

MariaDB Auto Backup Script

without DB lock

@taylor224
taylor224 / README.md
Last active March 22, 2024 12:24
티스토리 블로그 백업하기 & 워드프레스로 이사하기

티스토리 블로그 백업하기 & 워드프레스로 이사하기

Tistory 블로그 백업 기능이 삭제 되어 백업할수 없는 분들을 위한 백업 스크립트 및 워드프레스로의 이전 방법입니다.

우선 tistory 의 스킨을 [사용중TickTalk(사용자 수정/업로드) ver.1.0(사용자 수정/업로드)] 으로 변경하시기 바랍니다. 본 스크립트와 설명은 이 스킨을 기반으로 제작되었습니다. 또한 환경설정 - 기본정보 - 블로그 정보 - 주소설정 에서 주소방식을 [숫자 (http://notice.tistory.com/123)] 로 변경하시기 바랍니다. 워드프레스를 미리 설치하신 후 워드프레스 블로그의 url 및 기타 설정을 미리 진행하셔야 합니다. 본 사항을 미리 수행하지 않을경우 스크립트가 동작하지 않을수 있습니다.

진행하기 전 모든 부분에 대해서 읽어보신 후 진행하시기 바랍니다. 사전작업이 필요할 수 있습니다.

@taylor224
taylor224 / cv.py
Created February 27, 2017 10:55
ffmpeg stream to UStream with python
command = "ffmpeg -f avfoundation -i \":0\" -f rawvideo -pix_fmt bgr24 -s 1280x720 -i - -deinterlace -vb 2000k -vcodec libx264 -preset ultrafast -g 60 -threads 4 -acodec libmp3lame -ab 128k -ar 22050 -bufsize 512k -f flv \"rtmp://1.1234567.fme.ustream.tv/ustreamVideo/id/streamkey\"
videopipe = subprocess.Popen(pipecommand, shell=True, stdin=subprocess.PIPE)
videopipe.stdin.write(frame.tostring()) # OpenCV Frame Data
@taylor224
taylor224 / 2cpu_application_list.js
Created February 2, 2017 17:22
2CPU [신청] 자 추출 스크립트
var a=$("#commentContents>table");
var list = [];
var text = '';
$.each(a, function(i,v) {
if (v.innerText.indexOf("[신청]") >= 0) {
list.push($(v).find("a[class='sideview']")[0].innerText);
}
});
console.log("총 " + list.length + " 명 입니다.");
@taylor224
taylor224 / auto_convert.sh
Last active November 20, 2016 16:35
Automatic SMI to SRT convert script
#!/bin/sh
# Find SMI file recursively script by Taylor Starfield
FindRoot=/top/directory/to/convert
find $FindRoot -name '[^.]*.smi' | while read line; do
if [ -f "${line%.smi}.srt" ]; then
continue
fi
python convert.py "$line"
@taylor224
taylor224 / tooltip.html
Created November 13, 2016 08:19
NVD3 Default Multiple Line Chart with Focus Tooltip HTML Code
<table>
<thead>
<tr>
<td colspan="3">
<strong class="x-value">2016-12-01</strong>
</td>
</tr>
</thead>
<tbody>
<tr>
@taylor224
taylor224 / run.py
Last active May 10, 2017 22:52
rclone Automatic Upload Script
#-*- coding: utf-8 -*-
import os
import subprocess
ROOT_DIR = '/home/user/data/'
REMOTE_ROOT_DIR = '/Documents/data/'
for dir in os.listdir(ROOT_DIR):
if not os.path.isdir(os.path.join(ROOT_DIR, dir)):
@taylor224
taylor224 / vss.py
Created September 17, 2015 07:51
Vehicle Sound System
import subprocess
import time
import fcntl, os
#p = subprocess.Popen(['mplayer', '-slave', '-quiet', 'motor_start.wav'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
#while(True):
# speedstr = raw_input('rpm: ')
# print '\r\n'
# speednum = int(speedstr)
@taylor224
taylor224 / edrs.py
Last active September 16, 2015 05:53
ECU Data Recording System
import obd
import json
import time
import os
import sys
from obd import OBDCommand
from obd.utils import unhex
def rpm(_hex):
v = unhex(_hex) # helper function to convert hex to int