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 python | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
f, h, err := c.Request.FormFile("test") | |
b, err := ioutil.ReadAll(f) |
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
# Path to Oh My Fish install. | |
set -q XDG_DATA_HOME | |
and set -gx OMF_PATH "$XDG_DATA_HOME/omf" | |
or set -gx OMF_PATH "$HOME/.local/share/omf" | |
# Set Path | |
set -x PATH /bin $PATH | |
set -x PATH /usr/local/bin $PATH | |
set -x PATH /usr/local/opt/openssl/bin $PATH | |
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
private static let ISO8601Formatter: DateFormatter = { | |
let dateFormatter = DateFormatter() | |
dateFormatter.locale = Locale(identifier: "en_US_POSIX") | |
dateFormatter.timeZone = TimeZone(secondsFromGMT: 0) | |
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZ" | |
return dateFormatter | |
}() |
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 popup = element; | |
// 画面の縦横 | |
var w_height = $(window).height(); | |
var w_width = $(window).width(); | |
// 要素の縦横 | |
var el_height = popup.height(); | |
var el_width = popup.width(); |
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
server { | |
listen 80; | |
server_name localhost; | |
access_log /var/log/nginx/nene.access.log; | |
root /var/www/webroot; | |
index index.php; | |
location / { | |
try_files $uri $uri/ /index.php?$args; |
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 | |
\DB::listen(function ($sql, $bindings, $time) { | |
if (\Config::get('app.debug') === true && preg_match("/^select/", $sql)) { | |
$explain = \DB::select("explain {$sql}", $bindings); | |
\Log::info($explain); | |
$bindings = implode(', ', $bindings); | |
$method = request()->method(); | |
$url = request()->url(); |
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
# atom-setting |
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の中のiはevent内部の関数からみたらグローバル変数になるので、forで最後まで回した値がchangeの中に入ってしまう。 | |
*/ | |
// 即時関数を使う | |
for (var i = 0; i < targetElArray.length; i++) { | |
(function(_i){ | |
$('#' + targetElArray[_i]).change(function(event) { | |
console.log(targetElArray[_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
<?php | |
namespace App\Validator; | |
use Validator; | |
use Log; | |
class CheckRequestValueValidator | |
{ | |
/** | |
* リクエストされた値のバリデーションを行う |
NewerOlder