Skip to content

Instantly share code, notes, and snippets.

View bigplants's full-sized avatar
🏊‍♂️
Coding and Running

Daiki Hirakata bigplants

🏊‍♂️
Coding and Running
View GitHub Profile
<form method="post" class="marketing-form" action="https://upload-file.sandbox.all-in.xyz:443/marketing/forms/864a6336c08111e89eea0a580a180c22/customers">
<input type="hidden" name="tracking_code" value="facebook">
<input type="hidden" name="customer_type" value="corporate">
<label for="email">Email</label>
<span style="color:red">*</span>
<input name="email" required placeholder="abc@all-in.com" maxlength="256" type="email">
<br>
<label for="email_confirmation">Email(確認)</label>
<span style="color:red">*</span>
<form method="post" class="marketing-form" action="https://upload-file.sandbox.all-in.xyz:443/marketing/forms/864a6336c08111e89eea0a580a180c22/customers">
<input type="hidden" name="tracking_code" value="facebook">
<input type="hidden" name="customer_type" value="individual">
<label for="email">Email</label>
<span style="color:red">*</span>
<input name="email" required placeholder="abc@all-in.com" maxlength="256" type="email">
<br>
<label for="email_confirmation">Email(確認)</label>
<span style="color:red">*</span>
@bigplants
bigplants / gist:90786aa9b4fc84eb6ff43ace490f539e
Created November 21, 2016 02:17
[プログラミングテスト] うるう年判定
入力された整数がグレゴリオ暦でうるう年であるか判定するプログラムを書いてください。
閏年判定の条件
西暦が4で割り切れる年は閏年。
ただし、100で割り切れる年は閏年ではない。
ただし、400で割り切れる年は閏年。
@bigplants
bigplants / file0.php
Last active December 18, 2015 08:24
PhpStormでmethodを分割する方法 ref: http://qiita.com/bigplants@github/items/56c2d2af025f501610e0
class Hoge
{
function a($data)
{
$test1 = 'test';
$test2 = 'test';
$test3 = 'test';
foreach ($data as $k => $v) {
$data[$k]['a'] = $test1;

laravel

php7

Concurrency Level:      100
Time taken for tests:   9.478 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      1976188 bytes
HTML transferred:       1023000 bytes
☁ laravel-php56 [master] ⚡ ab -n 1000 -c 100 http://192.168.10.10/index.php
This is ApacheBench, Version 2.3 <$Revision: 1663405 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.10.10 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
☁ laravel-php7 [master] ⚡ ab -n 1000 -c 100 http://192.168.10.10/index.php
This is ApacheBench, Version 2.3 <$Revision: 1663405 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.10.10 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
@bigplants
bigplants / file0.txt
Last active October 26, 2015 18:01
GitHubでマージ済のプルリクをrevertした後に引き続きrevertされたブランチで作業を続行したい時 ref: http://qiita.com/bigplants@github/items/3d1d3ada97d0c86d2548
* 078468e (origin/master, master) Merge pull request #2 from bigplants/revert-1-develop
|\
| * 0f2ceea Revert "second commit."
|/
* fb717a2 Merge pull request #1 from bigplants/develop
|\
| * 8e7a601 (HEAD, origin/develop, develop) second commit.
|/
* 340f1ad first line
* f3f6327 first commit
@bigplants
bigplants / php_man_redirect_ja.0.0.1.user.js
Last active August 29, 2015 14:10
php_man_redirect_ja.0.0.1.user.js
var url = location.href;
var referrer = document.referrer;
var baseUrl = "http://php.net/manual/";
if(url.indexOf(baseUrl) != -1 && referrer.indexOf(baseUrl) == -1){
var redirectUrl = url.replace(/\/en\//i,'/ja/');
location.href = redirectUrl;
}