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
contents |
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 Bar | |
def foo | |
nil | |
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
# thin warper of google_visualr (delegate the process of javascript conversion to it). | |
# I think :: Google_visualr is quite useful gem because it enable us to draw intractive chart on browser only using ruby. But it takes over the interface of JavaScript, especially setter and getter form. There is better way on ruby and we shold do so. | |
# basic - column first construction. | |
data = DataTable.new('label', 'score') | |
data << ['label1', 245] | |
data << ['label2', 2194] | |
# data += [['label1', 245], ['label2', 2194]] # other way. |
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 'msgpack/rpc' | |
require 'sourcify' | |
class JobExecuteClient1 | |
def do_job | |
job = CloudDatawareHouse::Client.new.query('some_query') | |
# local variables | |
type = 'one' |
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 'msgpack/rpc' | |
require 'sourcify' | |
# client extension | |
module ClientProcHandler | |
def call_block(&proc) | |
self.call(:process_block,proc_dump(proc)) | |
end | |
private | |
def proc_dump(proc) |
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
# Prefix | |
unbind C-b | |
set-option -g prefix C-z | |
bind C-z send-prefix | |
bind C-d detach | |
# Option | |
set-window-option -g utf8 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
var matrix = { | |
A: ['I','U','U','A','I','Y','F'], | |
B: ['Z','N','C','C','U','O','G'], | |
C: ['V','A','K','I','V','R','B'], | |
D: ['N','S','R','U','H','A','I'], | |
E: ['N','M','R','T','E','A','P'], | |
F: ['E','B','O','P','L','K','P'], | |
G: ['X','L','O','M','O','I','D'], | |
H: ['A','E','L','O','H','A','E'], | |
I: ['Y','I','X','T','J','F','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
#!/Users/Altech/.rvm/rubies/ruby-1.9.3-p194/bin/ruby | |
# -*- coding: utf-8 -*- | |
require 'gmail' | |
require 'nokogiri' | |
require 'colorize' | |
require 'pry' | |
gmail = Gmail.connect('takeno.sh',PASSWORD) |
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
(global-set-key (kbd "C-x C-c") 'close-on-mac) | |
(require 'cl) | |
(defun close-buffers-without-default () | |
(interactive) | |
(loop for buffer being the buffers | |
do ((lambda (buffer) | |
(if (and (not (string= (buffer-name buffer) "*GNU Emacs*")) | |
(not (string= (buffer-name buffer) "*scratch*")) | |
(not (string= (buffer-name buffer) "*Messages*"))) |
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
# case1-1: one-to-one | |
QuerySet.add :count_users_inflow_source, ->(from, to) do | |
%w[customers creators].each do |users| | |
td.query('db',"SELECT * FROM #{users} WHERE #{specific_time(from,to)}"){|result| # queries are processed concurrently. | |
mongo.collection('collectionA').insert(cnt: result[0], type: uesrs) | |
} | |
end | |
end # return when all jobs finished. | |
# case1-2: many-to-one |
OlderNewer