ソフト温情主義:知ってて自発的にやってる場合には介入しない。
-- G. Dworkin, http://plato.stanford.edu/entries/paternalism/
狭い温情主義:政府の介入だけを問題にする
| # coding: utf-8 | |
| open_paren = Regexp.quote(ARGV[0][0]) | |
| close_paren = Regexp.quote(ARGV[0][1]) | |
| open(ARGV[1]).read.lines | |
| .select {|x| x.include?(ARGV[0][0]) && x.include?(ARGV[0][1])} | |
| .map{|x| | |
| x | |
| .gsub(/^(.*?)#{open_paren}/, "#{open_paren}") | |
| .gsub(/#{close_paren}[^#{open_paren}]*$/, "#{close_paren}") |
| public class FontFitViewHolder extends RecyclerView.ViewHolder { | |
| private final FontFitViewHolder self = this; | |
| private Handler mHandler; | |
| public BandCheckViewHolder(View v, int height) { | |
| super(v); | |
| mCardView = (CardView)itemView; | |
| mTextView = (MultiLineEllipsizeTextView) v.findViewById(R.id.viewholder_fontfit_card); | |
| } |
| git_open_origin() { | |
| (set -eu -o pipefail; \ | |
| commit_hash=${1:-""}; \ | |
| blob_where=${2:-""}; | |
| if [ -n "${commit_hash}" ]; then \ | |
| if [ -n "${blob_where}" ]; then \ | |
| commit_hash="/blob/${commit_hash}/${blob_where}"; \ | |
| else \ | |
| commit_hash="/commits/${commit_hash}"; \ | |
| fi; \ |
| echo "hoge" | echo $(cat -) `echo *$(cat -)*` fuga | |
| # => hoge test.sh fuga | |
| # not => hoge *hoge* fuga |
| /* | |
| * Copyright (C) 2011 Micah Hainline | |
| * Copyright (C) 2012 Triposo | |
| * Copyright (C) 2013 Paul Imhoff | |
| * Copyright (C) 2014 Shahin Yousefi | |
| * Copyright (C) 2015 Stepan Goncharov | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at |
| def destroy_circled(text, suffix = '. ') | |
| text | |
| .gsub('①', '1' + suffix) | |
| .gsub('②', '2' + suffix) | |
| .gsub('③', '3' + suffix) | |
| .gsub('④', '4' + suffix) | |
| .gsub('⑤', '5' + suffix) | |
| .gsub('⑥', '6' + suffix) | |
| .gsub('⑦', '7' + suffix) | |
| .gsub('⑧', '8' + suffix) |
ソフト温情主義:知ってて自発的にやってる場合には介入しない。
-- G. Dworkin, http://plato.stanford.edu/entries/paternalism/
狭い温情主義:政府の介入だけを問題にする
| #!/bin/bash | |
| # trap ctrl-c and call ctrl_c() | |
| trap ctrl_c INT | |
| function ctrl_c() { | |
| echo "** Trapped CTRL-C" | |
| exit | |
| } | |
| file=*.json | |
| for TXT in ${file} |
| vendor/bundle | |
| .bundle/config |