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
| # -*- coding: utf-8 -*- | |
| require 'open-uri' | |
| require 'nokogiri' | |
| require 'MeCab' | |
| class WordsArray < Array | |
| def nouns | |
| select{ |w| | |
| w.is_noun | |
| } |
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
| # -*- coding: utf-8 -*- | |
| require 'httpclient' | |
| require 'nokogiri' | |
| def get text | |
| endpoint = 'http://jlp.yahooapis.jp/MAService/V1/parse' | |
| appid = 'RZv4ed6xg67n15cyyGFF8Io0r3i.o0uwISXfrFOZYyMghbdeNA10_M6KemHLqz0laQ--' | |
| params = { | |
| :appid => appid, | |
| :sentence => text, |
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
| #! /usr/bin/env ruby | |
| file = ARGV.first | |
| code = open(file).read | |
| def append_semicolon(code, time) | |
| code.split(/\n/).enum_with_index.map{|line, num| | |
| time[num] == 1 ? line + ";" : line | |
| }.join("\n") | |
| 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
| module PrintSelf | |
| def inspect | |
| args = self.method(:initialize).parameters.map{ |param| | |
| self.instance_variable_get("@#{param[1]}".to_sym).inspect | |
| } | |
| "#{self.class}.new(#{args.join(", ")})" | |
| end | |
| 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
| debounce = (delay) -> | |
| lastd = $.Deferred() | |
| -> | |
| lastd.reject() | |
| d = $.Deferred() | |
| lastd = d | |
| args = arguments | |
| setTimeout -> | |
| d.resolve args | |
| , delay || 100 |
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
| # -*- coding: utf-8 -*- | |
| require 'rubygems' | |
| require 'RMagick' | |
| filename = ARGV.first | |
| unless filename | |
| warn "usage: #{$0} <ANIMATION GIF FILE>" | |
| exit 1 | |
| 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
| sin関数の魅力に迫る! | |
| これは超ハイテンションでsin関数の魅力に迫るという文章です | |
| sin関数は入力された角度(ラジアン)を元に、-1から1までのあいだの値を返却します | |
| sin関数は周期的な特徴があって入力する値を増やしていくと... | |
| ----------------- | |
| sin(0) = 0 | |
| sin(1) = 0.1 | |
| sin(2) = 0.14 | |
| ... |
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
| later = (func) -> | |
| setTimeout func, 0 | |
| executeByQueue = do -> | |
| queue = [] | |
| timer = null | |
| (func) -> | |
| if timer | |
| queue.push func | |
| return |
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
| # -*- coding: utf-8 -*- | |
| require 'rubygems' | |
| require 'RMagick' | |
| filename = ARGV.first | |
| unless filename | |
| warn "usage: #{$0} <ANIMATION GIF FILE>" | |
| exit 1 | |
| 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
| /* <system section="theme" selected="aero2"> */ | |
| @import "/css/theme/aero2/aero2.css"; | |
| /* </system> */ | |
| /* <system section="background" selected="e83254"> */ | |
| body{background:#e83254;} | |
| /* </system> */ | |
| #google_afc_user { | |
| height:0px; |