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
Dir["app/**/*.rb"].each do |file| | |
File.open(file, "rb+") do |io| | |
result = [] | |
body = io.read | |
body.split("\n").each do |line| | |
line.gsub!(/\s+\z/, "") | |
result << line | |
puts line |
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 "fileutils" | |
GOPATH = ENV["GOPATH"] | |
GO_SRC_PATH = GOPATH + "/src/github.com" | |
GHQ_ROOT = "/Users/tomohiro/.ghq/github.com" | |
def mv(src, dest) | |
# puts "mv #{src} #{dest}" | |
FileUtils.mv src, dest |
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 "eldritch" | |
class Beer | |
def initialize(row, col) | |
@rows = row | |
@col = col | |
end | |
async def run(group) |
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
ruby -e'a={};$><<"\e[2J";loop{a[rand`tput cols`.to_i]=0;a.map{|x,o|$>.dup<<"\e[#{o};#{x}H \e[#{a[x]+=1};#{x}H\u{1f37a}\e[0;0H"};sleep 0.01}' |
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 BindTap | |
def btap(&block) | |
self.instance_eval(&block) | |
self | |
end | |
end | |
Object.include BindTap |
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
{BufferedProcess, View} = require 'atom' | |
class QuickrunView extends View | |
@content: -> | |
@div class: 'quickrun overlay from-top', => | |
@div class: 'panel', => | |
@div class: 'panel-heading', => | |
@span outlet: 'heading', 'quickrun' | |
@div class: 'btn-toolbar pull-right', => | |
@button class: 'btn close', 'X' |
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
atom.project.eachEditor (editor) -> | |
buffer = editor.getBuffer() | |
atom.subscribe buffer, 'will-be-saved', -> | |
buffer.append("\n") |
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
diff --git a/Info.plist b/Info.plist | |
index 30cb05c..d856ed8 100644 | |
--- a/Info.plist | |
+++ b/Info.plist | |
@@ -42,6 +42,10 @@ | |
<true/> | |
<key>XCPluginHasUI</key> | |
<false/> | |
+ <key>DVTPlugInCompatibilityUUIDs</key> | |
+ <array> |
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
Preference-ENGINE:/Users/tomohiro:(---) 2.0.0-rc2 | |
2:16:> irb | |
irb(main):001:0> require 'fiddle' | |
=> true | |
irb(main):002:0> DL | |
NameError: uninitialized constant DL | |
from (irb):2 | |
from /Users/tomohiro/.rbenv/versions/2.0.0-rc2/bin/irb:12:in `<main>' | |
irb(main):003:0> |
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 'readline' | |
branches = `git branch -r` | |
branches = branches.split(/\n/).map {|b| b.strip } | |
branches.shift | |
branches.delete_if {|branch| branch == 'origin/master' } | |
candidates = %w[check log grep open delete tag skip exit] |
NewerOlder