Electron Fiddle で読み込んでビルド。
打刻しないモックを使うコードになっているので、使うときは renderer.js の以下を変更してください。
- // const touchProcess = touchStrategy;
- const touchProcess = touchStrategyMock;
+ const touchProcess = touchStrategy;| git diff master --name-only --diff-filter=ACMR "*.rb" | sed 's| |\\ |g' | xargs ./node_modules/.bin/prettier --write |
| #!/usr/bin/env zsh | |
| set -eu | |
| test "$#" -ne 1 && echo "Usage: $0 ROOTDIR" && exit 1 | |
| root=$1 | |
| test ! -d $root && echo "$root is not a valid directory" && exit 1 | |
| for file in $(find $root -name '*.rb') |
| # gem install qiita | |
| require 'qiita' | |
| items = Qiita::Client.new.list_user_items('username') | |
| items.body.each { |item| File.open("items/#{item['title']}.md", 'w') { |f| f.write(item["body"]) } } |
| module ApplicationHelper | |
| # activated の条件が真のとき、.active クラス付きの <a> タグを生成 | |
| # | |
| # 例: | |
| # = activated_link_to params[:sort] == 'newly', hogehoge_path(sort: :newly) do | |
| # %span 新着順 | |
| # | |
| def activated_link_to(activated, name = nil, options = {}, html_options = {}, &block) | |
| if block_given? | |
| html_options = options |
| FROM ubuntu | |
| # prepare packages | |
| RUN apt-get update \ | |
| && apt-get upgrade -y \ | |
| && apt-get install -y git \ | |
| && apt-get build-dep -y ruby | |
| # set timezone | |
| RUN echo "Asia/Tokyo" > /etc/timezone \ |
| module SslRedirectable | |
| extend ActiveSupport::Concern | |
| included do | |
| before_action :force_non_ssl, if: :force_non_ssl? | |
| class_attribute :ssl_actions | |
| SSL_ACTIONS_ALL = [:all] |
| # http://getbootstrap.com/migration/ | |
| patterns=( | |
| "row-fluid" | |
| "span[1-9]" | |
| "offset[1-9]" | |
| "brand" | |
| "navbarnav" | |
| "nav-collapse" | |
| "btn-navbar" |
| out_filename_suffix = '.text' | |
| conversions = [ | |
| { from: ' ', to: ' ' }, | |
| { from: /^## (.*)/, to: "\\1\n------------------------------" }, | |
| { from: /^### /, to: '■ ' }, | |
| ] | |
| in_filename = ARGV.shift | |
| out_filename = in_filename + out_filename_suffix | |
| buf = '' |