Skip to content

Instantly share code, notes, and snippets.

View hayakawa's full-sized avatar

Yuta Hayakawa hayakawa

View GitHub Profile
@eyasuyuki
eyasuyuki / WASBOOK.md
Last active May 29, 2022 00:58
「体系的に学ぶ 安全なWebアプリケーションの作り方」の仮想環境をVagrantで動かす

前提条件

2015-10-28 現在

  • OS X 10.11.1
  • VirtualBox
  • Vagrant

仮想マシンイメージの入手またはダウンンロード

@penguin2716
penguin2716 / 60_warnning.zsh
Created July 8, 2014 10:36
source this script in your ~/.bashrc and stop using deprecated package
#!/usr/bin/env zsh
function arp {
echo "use 'ip n' instead."
return 1
}
function ifconfig {
echo "use 'ip a (ip addr)', 'ip link', or 'ip -s (ip -stats)' instead."
return 1
@uchida
uchida / Tweaks.rst
Last active January 1, 2021 04:35
Sphinx と LaTeX を使うときの 小技

Sphinx と LaTeX を使うときの 小技

著者:打田 旭宏
ライセンス:CC-BY 3.0
更新日時:|time|

Sphinx の LaTeX 出力を利用するときに見栄えを凝るのに知っておくとよいかもしれない小技をまとめました。

for i in `git branch -r|grep -v HEAD|grep -v master|sed 's:origin/::g'`
do
git checkout --track -b $i origin/$i
done
git checkout master
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@nissuk
nissuk / ExampleDbTest.php
Created September 4, 2011 12:28
PHPUnit 3.5.15: データベースのテストをする単純な例
<?php
class ExampleDbTest extends PHPUnit_Extensions_Database_TestCase {
protected $conn = null;
/**
* (non-PHPdoc)
* @see PHPUnit_Extensions_Database_TestCase::setUp()
*/
public function setUp() {
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@rsky
rsky / cli-do-not-echo-password.php
Created January 23, 2011 23:07
PHPのコマンドラインツールでパスワードを要求するときの定番コード
<?php
// STDOUT or STDERR は場合に応じて
fwrite(STDERR, 'Password: ');
if (strncasecmp(PHP_OS, 'WIN', 3) === 0) {
// WindowsではエコーバックをOFFにできない?
@flock(STDIN, LOCK_EX);
$password = fgets(STDIN);
@flock(STDIN, LOCK_UN);
} else {
system('stty -echo'); // エコーバックをOFFにする