class CopyCommand
attr_reader :destination, :source
def initialize(source, destination)
@source = source
@destination = destination
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
#!/usr/bin/env ruby | |
require 'net/https' | |
require 'json' | |
require 'uri' | |
require 'pp' | |
@netatmo_config = { | |
client_id: 'XXXXXXXXXXXXXXXXXXXXXXXXX', | |
client_secret: 'XXXXXXXXXXXXXXXXXXXXXXXXX', |
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 | |
sudo yum -y install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel | |
mkdir /tmp | |
#Yasm | |
cd /tmp | |
git clone --depth 1 git://github.com/yasm/yasm.git | |
cd yasm | |
autoreconf -fiv |
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/bash | |
set -x | |
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7` | |
# 引数で配布先のbucketを分けたい | |
if [ $#$ -ne 1 ]; then | |
export SL_COLOR="danger" | |
export SL_TEXT="Sync failure: Not enough args in CircleCI: $S3 - ${CIRCLE_BRANCH} (<${CIRCLE_COMPARE_URL}|${SHA1}>) by ${CIRCLE_USERNAME} !!" | |
export SL_ICON="http://cdn.dev.classmethod.jp/wp-content/uploads/2014/05/aws_icon-s3_white-200x200.png" |
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
#/usr/bin/env ruby | |
require 'fileutils' | |
DIR = "./content/post/" | |
Dir.chdir(DIR) | |
# FIX: date format | |
# find ./content/post/ -type f -exec sed -i "" -e 's/date: \([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\) \([0-9]\{2\}:[0-9]\{2\}\).*$/date: \1T\2:00+09:00/g' {} \; |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"html/template" | |
) | |
func main() { | |
type PersonalData struct { |
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
package main | |
import ( | |
"archive/zip" | |
"os" | |
"path" | |
"github.com/k0kubun/pp" | |
) |
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 'rubygems' | |
require 'rake' | |
require 'rspec/core/rake_task' | |
require 'json' | |
require 'chef/run_list' | |
json_files = Dir::glob("../chef/nodes/*.json") | |
Chef::Config[:cookbook_path] = '../chef/site-cookbooks/' | |
Chef::Config[:role_path] = '../chef/roles/' |
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
#!/usr/bin/env ruby | |
require 'net/https' | |
require 'json' | |
require 'string-irc' | |
require 'time' | |
ika_url = 'http://localhost/privmsg' | |
ika_port = PORT | |
ika_channel = CHANNEL |
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
#!/usr/bin/env ruby | |
# -*- encoding: utf-8 -*- | |
require 'cinch' | |
require 'weather_jp' | |
bot = Cinch::Bot.new do | |
configure do |c| | |
c.server = IPADDR |