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
# aliceorder | |
30 1 * * 1 sh ~/workspace/radio/radiko/src/rec_radiko.sh QRR 31 ~/workspace/radio/radiko/data radio_order | |
# sumipe | |
0 0 * * 0 sh ~/workspace/radio/radiko/src/rec_radiko.sh QRR 31 ~/workspace/radio/radiko/data heart |
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 ( | |
"fmt" | |
"math" | |
) | |
func Sqrt_10(x float64) float64 { | |
i := 0 | |
z := 1.0 |
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 | |
IP_ADDR=$1 | |
while true; do | |
sleep 1 | |
result=`/sbin/ping -q -c 1 $IP_ADDR 2>&1` | |
if [ $? -eq 2 ]; then | |
echo $result | |
terminal-notifier -message "packet to ${IP_ADDR} is lost!" |
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
class Person | |
def has_holiday_in?(year, month) | |
calendar = new Calendar(year, month) | |
calendar.has_holiday? ? true : false | |
end | |
end | |
class Person | |
def has_holiday_in?(calendar) | |
calendar.has_holiday? ? true : false |
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
# -*- encoding: utf-8 -*- | |
# vim: set filetype=ruby expandtab tabstop=4 shiftwidth=4 autoindent smartindent: | |
require 'net/telnet' | |
require 'yaml' | |
routers = YAML.load_file(ARGV[0]) | |
routers.each do |router| | |
begin |
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
builder_name = '' | |
image_name = '' | |
publish_port = '' | |
expose_port = '' | |
tag = "#{builder_name}/#{image_name}" | |
if ENV['version'] | |
tag += ":#{ENV['version']}" | |
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
#!/bin/bash | |
VENDOR="vendor" | |
cd $HOME | |
mkdir -p $VENDOR | |
cd $VENDOR | |
# advpng |
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 ( | |
"code.google.com/p/go-tour/pic" | |
"image" | |
"image/color" | |
) | |
type Image struct { | |
Width, Height int |
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 ( | |
"net/http" | |
"fmt" | |
) | |
type String string | |
func (s String) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
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 ( | |
"fmt" | |
"math" | |
) | |
type ErrNegativeSqrt float64 | |
func (e ErrNegativeSqrt) Error() string { |