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] |
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 |
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 = "" |
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 |
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 |
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 |
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} |
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 |
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}" |
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
# initialize | |
INFLUXDBADRR="http://hostname.local:8086/write?db=server" | |
hostname=`hostname | tr '[:upper:]' '[:lower:]'` | |
cpu_name="Marvell\ Armada\ 370/XP" | |
fan_name="main\ fan" | |
# get cpu temperature and fan RPM | |
cpu_temp=`sensors | grep CPU | sed -r "s/CPU.*?\+([0-9\.]*?)°C/\1/" | sed -e "s/[ \t]*$//"` | |
fan_rpm=`sensors | grep System | sed -r "s/System.*?\s([0-9]+)\ RPM.*?$/\1/"` |
OlderNewer