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
<template> | |
<webview | |
src="http://localhost:3000/" | |
partition="persist:hoge" | |
:preload="preload" | |
autosize | |
allowpopups | |
/> | |
</template> |
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
// CustomCell.swift: | |
import UIKit | |
class CustomCell: UITableViewCell { | |
override func awakeFromNib() { | |
super.awakeFromNib() | |
backgroundColor = UIColor(named: "primary") | |
selectedBackgroundView = makeSelectedBackgroundView() |
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/ruby | |
# | |
# # usage | |
# | |
# chmod +x replace.rb | |
# ./replace.rb ./hoge.swift > out.swift | |
# | |
file_path = File.absolute_path(ARGV[0].to_s) | |
unless File.exists? file_path | |
abort "ファイルが存在しません. file_path = #{file_path}" |
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
" An example for a vimrc file. | |
" | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last change: 2008 Jul 02 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc | |
" for Amiga: s:.vimrc | |
" for MS-DOS and Win32: $VIM\_vimrc | |
" for OpenVMS: sys$login:.vimrc |
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 File.expand_path('../config/application', __FILE__) | |
require 'rake' | |
require 'resque/tasks' | |
MyApp::Application.load_tasks | |
# Fix resque error. | |
# ref: https://gist.github.com/1316470 | |
task "resque:setup" => :environment do | |
ENV['QUEUE'] ||= '*' |
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
" =============== NeoBundle START =============== | |
set nocompatible " be iMproved | |
filetype off | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim | |
call neobundle#rc(expand('~/.vim/bundle/')) | |
endif | |
" originalrepos on github |
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 | |
require 'json' | |
inp = ARGV[0] | |
jj(JSON.parse!("#{inp}")) |
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
print ">>" | |
while line = STDIN.gets | |
if (/exit/ =~ line) | |
break; | |
end | |
STDOUT.puts line.downcase.gsub(/ /, "_") | |
print ">>" | |
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
#!/usr/bin/env ruby | |
system("jruby -S bundle exec rspec spec") | |
exit 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
require 'benchmark' | |
def test(args) | |
5.times do | |
`jruby test.rb #{args}` | |
end | |
end | |
Benchmark.bm(7) do |x| | |
x.report("default :") {test ""} |
NewerOlder