Skip to content

Instantly share code, notes, and snippets.

Toshiharu Takematsu toshi3221

Block or report user

Report or block toshi3221

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
@toshi3221
toshi3221 / GithubActions.md
Last active Dec 9, 2019
Github Actionsの概要とRSpecテストフローサンプル
View GithubActions.md

Github Actions

(2019/12/9現在)

概要

  • Githubが提供するCI/CD
  • CircleCIとほぼ同じ事が出来るが2019/11/14に正式版になったことを発表したばかりでCacheなどBeta機能もある
  • Linux/MacOS/Windowsの実行を提供
    • 各OS共、2core CPU / 7GB RAM / 14GB SSD
@toshi3221
toshi3221 / README.md
Last active Jan 9, 2018
init.d向けinspircdサービス設定ファイル
View README.md

サービスに登録する手順

@toshi3221
toshi3221 / gist:ce8c4ce90e4e8749802d
Last active Aug 29, 2015
ffmpegにかける為、連番にするスクリプト
View gist:ce8c4ce90e4e8749802d
i=0 ; for f in $(ls -1 *.JPG | sort -t'-' -k2h)
do
mv "$f" $(printf "out/%04d.jpg" $i)
$((i++)) > /dev/null
done
@toshi3221
toshi3221 / gist:53816d60947e2bf91e7b
Created Mar 2, 2015
Rails翻訳依頼のためのHTML変換スクリプト
View gist:53816d60947e2bf91e7b
require 'yaml'
def to_html hash, html='', prefix_key=''
hash.each do |key, value|
html = if value.is_a? String
html+"<tr><td>#{prefix_key[0..-1]+key}</td><td>#{value}</td></tr>\n"
else
to_html value, html, prefix_key+key+'.'
end
end
View gist:d92a3691084eb45dd8c3
require 'active_support/core_ext'
require 'yaml'
require "rexml/document"
# YAML→XML
open('ja.xml', 'w') do |f|
f.write YAML.load_file('ja.yml').to_xml
end
# XML→YAML
View RICOH THETAで撮った写真をPTP-IP(Ruby)で取得する
RICOH THETAで撮った写真をPTP-IPで取得する - stoikheia(@3xv)の日記 http://d.hatena.ne.jp/stoikheia/20131201
ここにあるサンプル、Socketが生書きなのでラッピングをこころみてる
@toshi3221
toshi3221 / Amazon.css
Last active Jul 25, 2019
Stylish拡張機能用twitterカスタマイズCSS。ドメインURLをtwitter.comにしてとりこむ
View Amazon.css
#nav-link-prime,
.nav-prime-1 .nav-logo-tagline,
.nav-right #nav-swmslot,
#PrimeMusicAdoptionUpsell,
#PrimePhotos,
.adcenterRowWrapper,
.billboardRowWrapper,
.displayAd, .issuance-banner,
.nav-link[href*='Prime'], .nav-link[href*='dmusic'], a[href*='prime'], a[href*='AC-student'],
input[value='exp-jp-timed'], input[value='scheduled-delivery-jp'],
View gist:5743827
<!DOCTYPE html>
<html>
<head>
<script src="http://simplewebrtc.com/latest.js"></script>
</head>
<body>
<div id="localVideo"></div>
<div id="remotesVideos"></div>
<script>
var webrtc = new WebRTC({
@toshi3221
toshi3221 / gist:3776052
Created Sep 24, 2012
EM::Iterator sample
View gist:3776052
def em
EM.run do
EM::Iterator.new(0..10, 3).each(proc{ |num, iter|
(0..(rand(100))).inject(0){|sum,i| sum+=i}
puts num.inspect
iter.next
}, proc{|responses|
puts 'complete!'
EM.stop
})
You can’t perform that action at this time.