天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。
- gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
#!/usr/bin/env ruby | |
require "openssl" | |
class BF < Struct.new(:key, :pad_with_spaces) | |
def encrypt(str) | |
cipher = OpenSSL::Cipher.new('bf-ecb').encrypt | |
if pad_with_spaces | |
str += " " until str.bytesize % 8 == 0 | |
cipher.padding = 0 |
#!/bin/bash | |
hoge="#" | |
if [ $hoge!="#" ]; then | |
echo "hoge is not # (1st)" | |
fi | |
if [ "$hoge " != "# " ]; then | |
echo "hoge is not # (2nd)" | |
fi |
// ==UserScript== | |
// @name chatwork to all helper | |
// @match https://www.chatwork.com/* | |
// @version 1.1 | |
// ==/UserScript== | |
(function(){ | |
document.getElementById('cw_chattext').addEventListener('blur', function(e){ | |
if (/[@@]{2}/.test(e.target.value)) { | |
var to_list = []; | |
var imgs = document.getElementById('cw_mention_gallery').getElementsByTagName('img'); |
参考:http://www.itmedia.co.jp/news/articles/1205/18/news091.html | |
「わたし、Githubのせいで留年したんです」――こう話すのは、都内の私立大学に通うHogeさん(21・仮名)。Githubのほか、Bitbucket、SourceForge、stackoverflowなど複数のツールを使ってきたHogeさん。今年4月、Hogeさんにとって2回目の大学2年生が始まった。 | |
HogeさんがGithubを始めたのは大学に入学した2010年。それまでもstackoverflowなどのSNSを利用していたが「stackoverflowは外人とのディスカッション中心で、Githubはライブラリの公開がメイン」と、環境の変化に合わせて使用するSNSを変えてきた。 | |
stackoverflowではコメントなどを通じた外人とのコミュニケーションが中心だったが、Githubでは「新しいのプッシュされてる、アップデート決定」「あのIssue、今日なんか進捗あった?」「このPullRequestマージしたらごはん食べよう」「今夜ハッカソンやるけど誰か来たい人!」――など、自分と直接関係がない情報でも、リアルタイムに更新される全てのフィードが気になった。 | |
どんな時も、Githubを開けば必ず誰かが何かをCommitしている。その面白さに夢中になり、気付けば毎日、暇さえあればコミットログを追うようになっていた。自分でも多い日には1日に100回以上CommitをPushし、満員電車でPCが開けず、Wifiにつながりにくい時などは、Pushがうまくできないことにいら立った。 |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: redis sentinel | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts redis sentinel | |
# Description: Starts redis sentinel using start-stop-daemon | |
### END INIT INFO |
Colour0="131,148,150" | |
Colour1="147,161,161" | |
Colour2="0,43,54" | |
Colour3="7,54,66" | |
Colour4="0,43,54" | |
Colour5="238,232,213" | |
Colour6="7,54,66" | |
Colour7="0,43,56" | |
Colour8="220,50,47" | |
Colour9="203,75,22" |
<script charset="utf-8"> | |
<% if ENV["RAILS_ENV"] == "production" %> | |
var script = "/react-app-bundle.js"; | |
<% else %> | |
console.warn("Development mode. Make sure to start 'node devServer.js'"); | |
var script = "http://" + (location.host || 'localhost').split(':')[0] + ":4000/react-app-bundle.js" | |
<% end %> | |
document.write('<script src="' + script + '"></' + 'script>'); | |
</script> |
# `rubocop --auto-correct --only COP` and `git commit` | |
# Usage: ruby rubocop_auto_correct_commit.rb | |
require "json" | |
DEFAULT_ORDER = 100 | |
# --auto-correctする時の実行順(数字が小さい方が先に実行される) | |
COP_ORDERS = { | |
# Style/UnneededPercentQはStyle/StringLiteralsのようにシングルクオーテーション優先かダブルクオーテーション優先のようなconfigがない |