Skip to content

Instantly share code, notes, and snippets.

View tondol's full-sized avatar

tondol tondol

View GitHub Profile
require 'fileutils'
require 'pathname'
require 'pp'
nas_path = Pathname.new('/Volumes/photo')
card_path = Pathname.new(ARGV[0])
card_path.glob("DCIM/[0-9][0-9][0-9]CANON/*.{JPG,CR3}") {|path|
src_path = card_path / path
sday = File.birthtime(src_path).strftime('%Y%m%d')
@tondol
tondol / fastled_font.ino
Last active October 19, 2020 17:11
教育漢字を含む日本語・英語文字列をスクロール
// https://github.com/FastLED/FastLED
#include <FastLED.h>
// https://github.com/Tamakichi/Arduino-misakiUTF16
#include <misakiUTF16.h>
#define FPS 45
const int DATA_PIN = 32;
const int NUM_LEDS = 256;
CRGB leds[NUM_LEDS];
@tondol
tondol / hello_fastled.ino
Last active October 19, 2020 16:43
ウタエヤ オドレヤ
// https://github.com/FastLED/FastLED
#include <FastLED.h>
#define FPS 45
const int DATA_PIN = 32;
const int NUM_LEDS = 256;
CRGB leds[NUM_LEDS];
const int CW = 6;
@tondol
tondol / Gemfile
Created January 23, 2020 04:04
日の丸自動車学校の予約キャンセルを検知するLINE BOT
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "watir"
gem "selenium-webdriver", "~> 3.7.0"
gem "line-bot-api", "~> 1.13.0"
gem "mechanize"
@tondol
tondol / entry.rb
Created April 12, 2012 17:30
Markov Twitter Bot
# -*- coding: utf-8 -*-
require_relative 'twitterbot'
Twitter.configure {|config|
config.consumer_key = 'consumer key'
config.consumer_secret = 'consumer secret'
config.oauth_token = 'oauth token'
config.oauth_token_secret = 'oauth token secret'
}
@tondol
tondol / nicovideo_rtmpe.md
Last active June 9, 2018 02:50
ニコニコ公式アニメポータルのrtmpeプロトコル動画をダウンロードする覚え書き

はじめに

http://www.nicovideo.jp/watch/1380872606

上記の動画を例にDL方法を解説する。

パラメータの取得

@tondol
tondol / fizzbuzz.ruby
Created December 1, 2017 14:27
fizzbuzz.ruby
ピギャアアア!!!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギ~……ピギャアアア!!!⌒°( ・ω・)°⌒ピギッピギ~……ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギィ!ピギャアアア!!!╭°( ・ω・)°╮ピギ~……ピギャアアア!!!ピギィ!ピギ~……⌒°( ・ω・)°⌒ピギッピギャアアア!!!ピギャアアア!!!ピギィ!ピギ~……ピギ~……ピギャアアア!!!⌒°( ・ω・)°⌒ピギッピギャアアア!!!ピギャアアア!!!ピギィ!ピギャアアア!!!ピギィ!ピギ~……ピギ~……ピギ~……╭°( ・ω・)°╮ピギ~……ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!⌒°( ・ω・)°⌒ピギッピギ~……ピギ~……ピギ~……ピギィ!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!╭°( ・ω・)°╮ピギ~……ピギ~……ピギ~……ピギ~……ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギィ!ピギィ!ピギィ!ピギ~……ピギ~……ピギ~……ピギ~……ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギィ!⌒°( ・ω・)°⌒ピギ~……ピギ~……ピギ~……⌒°( ・ω・)°⌒ピギッピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギィ!ピギャアアア!!!ピギィ!ピギ~……ピギ~……ピギ~……ピギ~……ピギ~……╭°( ・ω・)°╮ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!⌒°( ・ω・)°⌒ピギッピギ~……ピギ~……ピギ~……ピギ~……ピギ~……ピギィ!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!╭°( ・ω・)°╮ピギ~……ピギ~……ピギ~……ピギ~……⌒°( ・ω・)°⌒ピギッピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギィ!ピギャアアア!!!ピギィ!ピギ~……ピギ~……ピギ~……ピギ~……ピギ~……╭°( ・ω・)°╮ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!ピギャアアア!!!⌒°( ・ω・)°⌒ピギッピギ~……ピギ~……ピギ~……ピギ~……ピギ~……ピギィ!ピギ
@tondol
tondol / Gemfile
Created October 30, 2017 16:54
プン吉の動画をアレするスクリプト
source "https://rubygems.org"
gem "watir"
@tondol
tondol / acme-challenge.rb
Created September 1, 2017 18:11
tondol.com: ruby script for renewal certifications w/ Let's Encrypt
#!/usr/local/bin/ruby
# -*- coding: utf-8 -*-
puts <<'EOS'
$challenges = array(
EOS
File.read(ARGV[0]).each_line {|line|
line.chomp!