bw export だと全部エクスポートされてしまうけど、特定のコレクションの中身だけ export したい。
bw login
bw unlock
# 一応| git-flow っぽい git のログから pull requests を再現する。 | |
| ``` | |
| git log master --reverse --grep 'feature.*into develop' --format='%p %s' --merges --after=2017-03-23 --before=2017-06-01 | ruby -pe "\$_.gsub! /Merge branch '(.+)'.*/, '\\1'" | |
| ``` | |
| で、特定期間の develop ブランチへマージしたログを切り出す。 | |
| これを make_pulls.rb に渡すと、そのマージコミットを再現する pull req を作る。 | |
| 何かエラーが出たら止まるので手動で対応する。 :innocent: |
| using System.Collections; | |
| using UnityEngine; | |
| public class NestCoroutine : MonoBehaviour | |
| { | |
| private IEnumerator _coroutine; | |
| private int _count; | |
| private int Count | |
| { | |
| get |
| #!/usr/bin/env ruby | |
| require "yaml" | |
| UNITY_DIR_PREFIX = ENV.fetch("UNITY_DIR_PREFIX", "/Applications/Unity") | |
| unity_args = ARGV.dup | |
| project_path = Dir.getwd | |
| path_arg = ARGV.index("-projectPath") | |
| if path_arg |
| #!/bin/sh | |
| # pull したタイミングで .DS_Store を消して、 .DS_Store だけが含まれるフォルダを削除する。 | |
| # | |
| # まず .DS_Store を削除してから、 .DS_Store が入っていたディレクトリを rmdir する。 | |
| # rmdir は空の場合しか削除しないので、中身が入っている場合はそのまま。 grep で不要なエラーメッセージを無視。 | |
| find . -name .DS_Store -exec rm {} \; -exec sh -c 'rmdir `dirname {}` 2>&1 | grep -E -v "rmdir:.+: Directory not empty"' \; |
| ruby -r json -e 'def f(o, i=0); oc = o["options"]["classname"]; on = o["options"]["name"]; print " " * i + "#{oc}, #{on}\n"; o["children"].each{|c| f c, i+2}; nil; end; ARGV.each {|j| p j; f JSON.load(open(j).read)["widgetTree"]}' *.json |
| cat <(printf "\xEF\xBB\xBF") 元のUTF-8ファイル.txt > BOM付きUTF-8ファイル.txt |
| @implementation MySharedThing | |
| + (id)sharedInstance | |
| { | |
| DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
| return [[self alloc] init]; | |
| }); | |
| } | |
| @end |
| # git の差分表示に使うには .git/info/attributes にこの内容と、 | |
| *.mwb diff=MySQLWorkbench | |
| # git config でこれが必要。 | |
| # git config diff.MySQLWorkbench.textconv /path/to/mwb.sh |
| # .gitignore 以外のファイルを全部無視する。 | |
| * | |
| !.gitignore |