layout | title | prev_section | next_section | permalink |
---|---|---|---|---|
docs |
コレクション |
variables |
datafiles |
/docs/collections/ |
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 "./streem" | |
using CoreExt | |
STDIN | STDOUT | |
seq(100) | ->x{ | |
if x % 15 == 0 | |
'FizzBuzz' | |
elsif x % 3 == 0 | |
'Fizz' |
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
# flip plugin | |
# ==== | |
# | |
# You can post flip text or vertical text. | |
# | |
# Usage | |
# ---- | |
# | |
# :flip twitter # => "ɹəʇʇᴉʍʇ" | |
# |
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
# -*- coding: utf-8 -*- | |
# manage plugins for earthquake.gem | |
# | |
# forked from: | |
# https://gist.github.com/milligramme/5253047 | |
# | |
# usage | |
# :manage_plugins show installed plugin | |
# :manage_plugins on <plugin_name> enable plugin | |
# :manage_plugins off <plugin_name> disable plugin |
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
# coding: UTF-8 | |
# emoji plugin(Emot gem version) | |
# ==== | |
# | |
# You can post Emoji easily! | |
# | |
# Usage | |
# ---- | |
# |
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 "named_emoji" | |
class Symbol | |
def ~ | |
to_s | |
.split | |
.map { |w| NamedEmoji.emojis[w.intern.downcase] || w } | |
.join(" ") | |
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
class ProcCompressor | |
def initialize(n) | |
@proc = proc.curry(n+1) | |
end | |
def <<(arg) | |
@proc = @proc[arg] | |
Proc===@proc ? self : @proc | |
end |
パッケージ(Package)はAtomのコアです。エディターのメイン機能以外のほぼすべては、パッケージによって扱われます。これには、ファイルツリー、ステータスバー、シンタックスハイライトのような「コア」の部分が含まれています。
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 "./onetime" | |
module CoreExt | |
refine String do | |
def ~ | |
margin = scan(/^ +/).map(&:size).min | |
gsub(/^ {#{margin}}/, '') | |
end | |
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
# use benchmark_suite | |
# https://github.com/evanphx/benchmark_suite | |
# -*- encoding: utf-8 -*- | |
require 'benchmark/ips' | |
class Character < Struct.new(:name, :level, :point) | |
def to_s | |
"%s:\tlv:%d\tpt:%d" % values | |
end | |
end |
NewerOlder