This file contains 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
$ echo `date '+%Y%m%d'` |
This file contains 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 du / |sort -n|tail | |
2383932 ./var/log | |
3206136 ./home/www/cms | |
3703848 ./var/lib/mysql/data | |
3924128 ./usr | |
4115076 ./home/www | |
8706056 ./var/lib/mysql | |
8760148 ./var/lib | |
9173396 ./home | |
11328132 ./var |
This file contains 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 WidgetController extends AppController { | |
public $components = array('Security'); | |
public function beforeFilter() { | |
if (isset($this->params['admin'])) { | |
$this->Security->blackHoleCallback = 'forceSSL'; | |
$this->Security->requireSecure(); | |
} |
This file contains 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
public function long_function() | |
{ | |
$arg = 'hikisu'; | |
$hoge = new otherClass($arg); | |
foreach ($hoge as $fuga) { | |
$piyo = $fuga->each(); | |
foreach ($piyo as $do) { | |
$wantDo = $do->function; | |
if ($wantDo == 'error') { | |
$this->writeLog('strange error'); |
This file contains 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
$queryTable = $this->getConnection()->createQueryTable('TABLE', 'SELECT * FROM TABLE'); | |
$queryTable->getTable('TABLE_NAME')->getValue(0,'id'); |
This file contains 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 CarBuildValidator | |
{ | |
/** @var array */ | |
private $message; | |
/** | |
* @return boolean | |
*/ |
This file contains 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 MyException extends LogicException | |
{ | |
public function myFunction() | |
{ | |
$this->log(new Mylogger()); | |
} | |
private function log(MyLogger $logger) |
This file contains 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
"" for tab | |
" Anywhere SID. | |
function! s:SID_PREFIX() | |
return matchstr(expand('<sfile>'), '<SNR>\d\+_\zeSID_PREFIX$') | |
endfunction | |
function! s:my_tabline() | |
let s = '' | |
for i in range(1, tabpagenr('$')) | |
let bufnrs = tabpagebuflist(i) |
This file contains 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
$ npm install -g browserify | |
$ npm install debowerify |
This file contains 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
$ = require('jquery'); | |
_ = require('underscore'); |
OlderNewer