Skip to content

Instantly share code, notes, and snippets.

Coro Coro365

Block or report user

Report or block Coro365

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
@Coro365
Coro365 / myDays.rb
Last active Aug 29, 2015
Calendar copy to clipboard
View myDays.rb
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]
@Coro365
Coro365 / switch-control.ino
Created May 2, 2015
It receives the serial signals to control the switches.
View switch-control.ino
#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
@Coro365
Coro365 / goNextEpisode.applescript
Last active Feb 26, 2016
This applescript will automatically play the episode of the next iTunes TV show.
View goNextEpisode.applescript
--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
require 'fileutils'
#前回upしたものと同じでなければupする
PATH = ""
NAME = File.basename(PATH)
TEMP_NAME = "#{NAME}.sum"
TEMP_DIR = ""
View mount_nas.sh
#!/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
# mkv to mp4
DIRPATH=$1
for FILE in ${DIRPATH}/*.mkv
do
echo ${FILE}
ffmpeg -i "${FILE}" -vcodec copy "${FILE%.mkv}.mp4"
done
@Coro365
Coro365 / reg_rename.rb
Last active Aug 24, 2016
file name edit in regular expression
View reg_rename.rb
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
@Coro365
Coro365 / auto_encode.rb
Last active Oct 25, 2017
Encode the recorded m2ts file
View auto_encode.rb
require 'fileutils'
require 'shellwords'
WD = File.dirname(File.expand_path(__FILE__))
TSDIR = "path"
MP4DIR = "path"
def recodeing? (ts)
s1 = File.size(ts)
sleep 1
@Coro365
Coro365 / animetick_counter.rb
Created Nov 10, 2017
watch anime count in animetick.net
View animetick_counter.rb
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}"
@Coro365
Coro365 / waifu2x.rb
Last active Jul 14, 2018
This script can process multiple files and directories with waifu2x-converter-cpp
View waifu2x.rb
require "ruby-progressbar"
require "shellwords"
require "find"
include Find
WAIF2X_CONVERTER_CPP_DIR = __dir__
WAIF2X_CONVERTER_CPP = WAIF2X_CONVERTER_CPP_DIR + "/waifu2x-converter-cpp"
def waifu2x
files = get_file_list(ARGV, ["jpeg","jpg"])
You can’t perform that action at this time.