Left align | Right align | Center align |
---|---|---|
This | This | This |
column | column | column |
will | will | will |
be | be | be |
left | right | center |
aligned | aligned | aligned |
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
var SampleModel = Backbone.Model.extend({ | |
}); | |
var SampleCollection = Backbone.Collection.extend({ | |
model : SampleModel, | |
url : '/test/api', | |
parse : function(response) { | |
return response.samples; | |
} |
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 | |
if (!function_exists('h')) { | |
function h($string) { | |
/* | |
出力までやってしまう. | |
@see http://koseki.hatenablog.com/entry/20120216/htmlspecialhonyarara | |
*/ | |
echo htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); | |
} |
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 | |
// delete APC Cache. | |
// apache graceful とかでも消える。 | |
if(function_exists('apc_clear_cache')) { | |
if(apc_clear_cache()) { | |
echo 'システムキャッシュをクリアしました</br>'; | |
} |
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
$ git archive --format=zip --prefix=dir/ HEAD `git diff <commit> --name-only` -o ~/output.zip |
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 | |
header('HTTP/1.1 301 Moved Permanently'); | |
header('Vary: User-Agent'); | |
header(sprintf('Location: %s', $url)); |
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 dscacheutil -flushcache |
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
find . -name .svn -type d | xargs rm -fr |
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 postfix start | |
% tail -f /var/log/mail.log | |
*/ | |
<?php | |
mail( | |
'[email protected]', // your email address | |
'Test', // email subject | |
'This is an email', // email body |
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
$ mysql_upgrade -u root -p |