Skip to content

Instantly share code, notes, and snippets.

@pepsin
pepsin / merger.rb
Last active March 17, 2017 08:57
Simple CMB CSV Merger and Organizer script
#If you don't have colorize gem, do install it via 'gem install colorize'
#Update
#Add cache categories function
require 'csv'
require 'readline'
require 'colorize'
require 'json'
CACHED_CATEGORIES_FILE = "cache_categories.json"
cache_categories = JSON.parse(File.open(CACHED_CATEGORIES_FILE).read) rescue {}
@pepsin
pepsin / y.js
Created December 12, 2015 12:29
Y = function(lep) {
return (function (f) {
return f(f);
})(function(f){
return lep(function(x){
return f(f)(x);
});
});
}
require 'net/http'
require "cairo"
def get_url time, x, y
str = "http://himawari8-dl.nict.go.jp/himawari8/img/D531106/20d/550/#{time}00_#{x}_#{y}.png"
end
def merge time
puts "Start image process"
w = 20
module Annotations
def annotations(meth=nil)
return @__annotations__[meth] if meth
@__annotations__
end
private
def method_added(m)
(@__annotations__ ||= {})[m] = @__last_annotation__ if @__last_annotation__
@pepsin
pepsin / gist:2652780
Created May 10, 2012 12:34
Error while install gs(ghostscript).
BigBrain: Pepsin$ brew install gs
==> Downloading http://fossies.org/unix/misc/ghostscript-9.05.tar.gz/
######################################################################## 100.0%
Error: No such file or directory - jpeg or jpeg_local
BigBrain: Pepsin$ ls $(brew --cellar jpeg)
8d
BigBrain: Pepsin$ brew info jpeg
jpeg 8d
http://www.ijg.org
/usr/local/Cellar/jpeg/8d (18 files, 1.3M) *
@pepsin
pepsin / Homebrew: clisp fails to install
Created May 9, 2012 02:55
Clisp Brew Fail to install
Failed executing: make install (clisp.rb:57)
If `brew doctor' does not help diagnose the issue, please report the bug:
https://github.com/mxcl/homebrew/wiki/reporting-bugs
BigBrain:Desktop Pepsin$ brew doctor
Error: /usr/local/include isn't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew.
If a brew tries to write a header file to this directory, the install will