This file contains hidden or 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
#- encode: utf-8 | |
require 'natto' | |
class Mecab | |
def self.parse(sentence) | |
mecab.parse(sentence).split(";").map {|a| a.split(":")} | |
end | |
def self.nouns(sentence) |
This file contains hidden or 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 'yahoo_parse_api' | |
class YahooMA | |
def self.parse(sentence) | |
client.parse(sentence, param) | |
end | |
def self.nouns(sentence) | |
parse(sentence)["ResultSet"]["ma_result"]["word_list"]["word"].map {|a| a["surface"]} | |
end |
This file contains hidden or 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
#l{ | |
width:100%; | |
height:2px; | |
position:fixed; | |
top:0; | |
left:0; | |
z-index:80; | |
background:red; | |
animation:lk .95s linear 0 infinite; | |
-webkit-animation:lk .95s linear 0 infinite; |
This file contains hidden or 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 W=window,E=W.Element,P="prototype"; | |
W.$$ = function(s, c){ | |
return (c ? c : document)['querySelectorAll'](s); | |
}; | |
W.NodeList[P].each = Array[P].forEach; | |
W.NodeList[P].forEach = Array[P].forEach; | |
E[P].find=function(q){ |
This file contains hidden or 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
sub vcl_fetch { | |
remove beresp.http.Cache-Control; | |
set beresp.http.Cache-Control = "public, max-age=31600000"; | |
if (req.url ~ ".jpg$") { | |
set beresp.http.content-type = "image/jpeg"; | |
} | |
if (req.url ~ ".webp$") { | |
set beresp.http.content-type = "image/webp"; | |
} |
This file contains hidden or 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
# | |
# Amazon SQS Powered Multi-instance Coding (a.k.a. Workflow) & Docker powered multi-instance deployment. (Cloud Orchestration) | |
# similar works: Route https://github.com/jmettraux/ruote | |
# | |
# Deployment | |
# Deploy docker containers for each func. define their role with ENV | |
# TODO: how to define number of containers? | |
# | |
# flow use cloudflow.rb # => define which flow to control |
This file contains hidden or 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
# | |
# Amazon DynamoDB powered distributed Lock system | |
# | |
CloudLock.lock("sample_name") do | |
do_something | |
end # on the end, lock will be unlocked | |
# also unlock is available |
This file contains hidden or 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
FROM ubuntu:12.04 | |
RUN apt-get update | |
RUN apt-get -qy install git vim tmux | |
RUN apt-get -qy install build-essential libpq-dev libv8-dev | |
RUN apt-get -qy install curl | |
RUN apt-get -qy install openssl libreadline-dev curl zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison libcurl4-openssl-dev | |
RUN adduser --disabled-password --home=/rails --gecos "" rails | |
RUN apt-get -qy install wget | |
RUN wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz |
This file contains hidden or 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
import UIKit | |
class ViewController: UICollectionViewController, UICollectionViewDataSource, UICollectionViewDelegate { | |
override func collectionView(collectionView: UICollectionView!, numberOfItemsInSection section: Int) -> Int { | |
... | |
} | |
override func collectionView(collectionView: UICollectionView!, cellForItemAtIndexPath indexPath: NSIndexPath!) -> UICollectionViewCell! { | |
... | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>--company-id</key> | |
<string>#{DOMAIN}</string> | |
<key>--project-company</key> | |
<string>#{ORGANIZATION}</string> | |
<key>--project-name</key> | |
<string>#{PROJECT}</string> |
OlderNewer