2015-10-28 現在
- OS X 10.11.1
- VirtualBox
- Vagrant
#!/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 |
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 |
<?php | |
class ExampleDbTest extends PHPUnit_Extensions_Database_TestCase { | |
protected $conn = null; | |
/** | |
* (non-PHPdoc) | |
* @see PHPUnit_Extensions_Database_TestCase::setUp() | |
*/ | |
public function setUp() { |
#!/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 |
<?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にする |