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
# ---------------------------------------- | |
# R scirpt to draw a map of Japan. (Okianwa Division Ver.) | |
# ---------------------------------------- | |
# ライブラリの読み込み | |
library(gpclib) | |
library(ggplot2) | |
library(maptools) | |
# ---------------------------------------- | |
print("**** 各種設定") |
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/local/bin/ruby | |
# coding: utf-8 | |
# | |
# Ruby script to get tweet statuses by twitter-stream gem library. | |
# | |
require 'json' | |
require 'twitter/json_stream' | |
# Twitter OAuth keys | |
CONS_KEY = "<your_consumer_key>" |
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/local/bin/ruby | |
# coding: utf-8 | |
# --------------------------------------------------------- | |
# Ruby script to get tweet statuses by tweetstream library. | |
# --------------------------------------------------------- | |
# | |
require 'tweetstream' | |
# Twitter OAuth keys ( from environment variables ) | |
CONS_KEY = ENV['TW_CONS_KEY'] |
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/local/bin/ruby | |
# coding: utf-8 | |
#= Twitter アカウント登録済みチェック | |
# | |
# date name version | |
# 2014.12.07 mk-mode.com 1.00 新規作成 | |
# | |
# Copyright(C) 2014 mk-mode.com All Rights Reserved. | |
#--------------------------------------------------------------------------------- | |
# 引数 : なし |
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/local/bin/ruby | |
# coding: utf-8 | |
#= Checking HTML difference | |
# | |
# date name version | |
# 2014.12.11 mk-mode 1.00 新規作成 | |
# | |
# Copyright(C) 2014 mk-mode.com All Rights Reserved. | |
#--------------------------------------------------------------------------------- | |
# 引数 : なし |
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/local/bin/ruby | |
# coding: utf-8 | |
# -------------------------------------- | |
# Calculate Xth prime number | |
# -------------------------------------- | |
class PrimeNumber2 | |
def exec(no) | |
n, i = 2, 0 | |
loop do |
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/local/bin/ruby | |
# coding: utf-8 | |
# -------------------------------------- | |
# Prime numbers list | |
# -------------------------------------- | |
class PrimeNumber | |
def exec(nums) | |
(1..nums).each do |n| | |
puts "#{n}: #{is_prime(n) ? 'PRIME' : '----- '}" |
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 | |
# 各種定数 | |
GRD_SRC="ETOPO1_Bed_g_gmt4.grd" | |
F_NAME="JAPAN_ETOPO1" | |
RANGE=126/149/25/46 | |
SIZE=12c | |
# 用紙サイズ | |
gmtset PS_MEDIA = Custom_18cx20c |
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/local/bin/ruby | |
# coding: utf-8 | |
# | |
# ======================== | |
# Twitter settings | |
# ======================== | |
# | |
require 'twitter' | |
require 'oauth' |
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/local/bin/ruby | |
# coding: utf-8 | |
#********************************************* | |
# Ruby script to read geometric datas from shapefile. | |
#********************************************* | |
# | |
require 'georuby' | |
require 'geo_ruby/shp' | |
include GeoRuby::Shp4r |