This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class StoreController extends AppController | |
{ | |
public function buy() | |
{ | |
$customer = Customer::get(Param::get('customer_id')); | |
$store = Store::get(Param::get('store_id')); | |
$item = Item::get('item_id')); | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
phpinfo(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/** | |
* dietcakeのdebug.logを見るコマンド | |
* | |
*/ | |
// 対象のディレクトリがdietcake案件のものか調べてプロジェクトルートを返す | |
function get_project_dir($dir) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Player extends stdClass | |
{ | |
public function __clone() | |
{ | |
$this->status = clone $this->status; | |
} | |
} | |
$player = new Player(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo sensors | |
acpitz-virtual-0 | |
Adapter: Virtual device | |
temp1: +27.8°C (crit = +101.0°C) | |
temp2: +29.8°C (crit = +101.0°C) | |
coretemp-isa-0000 | |
Adapter: ISA adapter | |
Physical id 0: +46.0°C (high = +86.0°C, crit = +100.0°C) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aliases | |
# in this example you can open extensions page by the command ':ext' | |
# and Chrome's option page by the command ':option' | |
alias ext TabOpenNew chrome://extensions/ | |
alias option TabOpenNew chrome://settings/browser | |
alias downloads TabOpenNew chrome://downloads | |
alias history TabOpenNew chrome://history | |
alias pop WinOpenNew --pop | |
## pagecmd offers you page specific key mapping. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo phpversion() . PHP_EOL; | |
$lists = array('hoge'); | |
array_walk($lists, 'trim'); | |
if (current($lists) !== false) { | |
echo 'o'; | |
} else { | |
echo 'x'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -rf /Applications/Bitcasa.app | |
rm -f ./Library/Preferences/com.bitcasa.Bitcasa.plist | |
rm -f ./Library/Preferences/Bitcasa.SIMBLAgent.plist | |
rm -rf ./Library/Application\ Support/com.bitcasa.Bitcasa | |
rm -rf ~/Library/Caches/com.bitcasa.* | |
rm -r ~/Library/LaunchAgents/com.bitcasa.Bitcasa.plist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/bin | |
ln -s /usr/local/bin/lame ~/bin/lame | |
ln -s /usr/local/bin/swfmill ~/bin/swfmill | |
ln -s /usr/local/bin/luac ~/bin/luac52 | |
ln -s /usr/local/bin/oggenc ~/bin/oggenc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// エレクトラムインゴット CP287 | |
void create_40() { | |
comfart_zone(); | |
inner_quiet(); | |
stedy_hand2(); | |
manipulation(); | |
kakou(); | |
kakou(); | |
kakou(); | |
heisty_touch(); |