- 誰かだけが触れるコードを無くす
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 | |
header('Content-Type: application/json'); | |
$secret = 'hogehoge'; | |
$repo = 'hoge'; | |
function generate_response($code) { | |
$response = array( | |
'200' => array( | |
'status' => 'success', |
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
@charset "UTF-8"; | |
/* | |
* 2020年まで使えるfont-family游ゴシックを含んだベストプラクティス | |
* http://qiita.com/RinoTsuka/items/4181efd43d072e246519 | |
* | |
*/ | |
@font-face { | |
font-family: "Yu Gothic"; |
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
<ifModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/png "access plus 1 months" | |
ExpiresByType image/jpeg "access plus 1 months" | |
ExpiresByType image/gif "access plus 1 months" | |
ExpiresByType text/css "access plus 1 months" | |
ExpiresByType text/javascript "access plus 1 months" | |
</ifModule> |
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
window.addEventListener("beforeunload", function (e) { | |
var confirmationMessage = "入力内容を破棄します。"; | |
e.returnValue = confirmationMessage; | |
return confirmationMessage; | |
}); |
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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use DBIx::Sunny; | |
app->attr(dbh => sub { DBIx::Sunny->connect('dbi:mysql:dbname=bbs', 'root','') }); | |
get '/' => sub { | |
my $c = shift; | |
my $entries = app->dbh->select_all('SELECT * FROM entry'); |
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
javascript:$('.discussion-item-body').each(function(){$(this).css('display','block')}); |
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
var query = location.search; | |
var cookieStr = document.cookie; | |
var code = '<div><a href="sp/?viewmode=sp">スマートフォン版に切り替え</a></div>'; | |
if (query.indexOf("viewmode=pc")!=-1){ | |
document.write(code); | |
} else if (cookieStr.indexOf("viewmode=pc")!=-1){ | |
document.write(code); | |
} else if ((navigator.userAgent.indexOf('iPhone') > 0 | |
&& navigator.userAgent.indexOf('iPad') == -1) |
NewerOlder