- /etc/init.d/inspircdを作成 * (CentOS6まで)自作のサービスをchkconfigで登録するを参考にchkconfigに登録出来るようにサービス設定を書いておく必要がある
- chkconfigに登録
- sudo chkconfig --add inspircd
- 自動起動を有効にする
- sudo chkconfig inspircd on
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
RICOH THETAで撮った写真をPTP-IPで取得する - stoikheia(@3xv)の日記 http://d.hatena.ne.jp/stoikheia/20131201 | |
ここにあるサンプル、Socketが生書きなのでラッピングをこころみてる |
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 '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 |
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 '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 |
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
i=0 ; for f in $(ls -1 *.JPG | sort -t'-' -k2h) | |
do | |
mv "$f" $(printf "out/%04d.jpg" $i) | |
$((i++)) > /dev/null | |
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
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 | |
}) |
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
puts 'hello Ruby!' |
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
<!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({ |
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
#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'], |