View myDays.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
year = ARGV[0].to_i | |
mounth = ARGV[1].to_i | |
number = ARGV[2].to_i | |
#week set | |
week = ["Sum","Mon","Tue","Wed","Thu","Fri","Sta"] | |
#last day set | |
limits = [31,28,31,30,31,30,31,31,30,31,30,31] | |
limit = limits[mounth - 1] |
View switch-control.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
#define BUTTON1_PIN 7 | |
#define BUTTON2_PIN 8 | |
#define SERVO1_PIN 9 | |
#define SERVO2_PIN 10 | |
#define ACTION_NUM 4 | |
//servo set | |
#define RIGHT 135 |
View goNextEpisode.applescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Version 20150808 | |
--This applescript will automatically play the episode of the next iTunes TV show. | |
--Please select Japanese or English. (comment out "--") | |
--Please export application format. (File > Export > File type > Application > Save) | |
--This version does not support the jump from the last episode to within three minutes of the place. | |
--Author is coro (http://coro3.net) | |
on run {} | |
tell application "iTunes" to activate | |
repeat |
View diff_upload.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
#前回upしたものと同じでなければupする | |
PATH = "" | |
NAME = File.basename(PATH) | |
TEMP_NAME = "#{NAME}.sum" | |
TEMP_DIR = "" |
View mount_nas.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mount(){ | |
USER="NAS_USER_NAME" | |
ADDRESS="readynas104.local" | |
PASSWD="PASSWD" | |
for server_path in $@ | |
do | |
mount_path=/Volumes/${server_path} |
View mkvToMp4.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mkv to mp4 | |
DIRPATH=$1 | |
for FILE in ${DIRPATH}/*.mkv | |
do | |
echo ${FILE} | |
ffmpeg -i "${FILE}" -vcodec copy "${FILE%.mkv}.mp4" | |
done |
View reg_rename.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "find" | |
Dir[File.dirname(__FILE__) + "/com_lib/*.rb"].each {|file| require file} | |
def yesno?(ms = "") | |
blue "#{ms}\nPlease press y/n\n> " | |
i = STDIN.gets | |
if /^y$|^Y$|^yes$|^Yes$|^YES$/ =~ i | |
return true | |
elsif /^n$|^N$|^no$|^No$|^NO$/ =~ i |
View auto_encode.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'shellwords' | |
WD = File.dirname(File.expand_path(__FILE__)) | |
TSDIR = "path" | |
MP4DIR = "path" | |
def recodeing? (ts) | |
s1 = File.size(ts) | |
sleep 1 |
View animetick_counter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "pp" | |
require "open-uri" | |
require "nokogiri" | |
@userid = "Coro365" | |
@crawl_page_number = 26 | |
@animetick_subscribes = Array.new | |
def animetick_crawl(page_number) | |
url = "http://animetick.net/users/#{@userid}?page=#{page_number}" |
View waifu2x-wrapper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dipendency waifu2x and imagemagic | |
require 'Open3' | |
require 'fileutils' | |
require 'ruby-progressbar' | |
require "#{__dir__}/get_files_from_ARGV.rb" | |
require "#{__dir__}/natural_sort.rb" | |
include Natural_sort |
OlderNewer