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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<style> | |
input { | |
/* なぜか この CSS が当たってるっぽく、レイアウトが崩れる */ | |
height: 40px; | |
width: 100%; | |
} |
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
document.getElementsByTagName('video')[0].addEventListener('ended', function(e){ e.target.play(); }); |
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
<html> | |
<head> | |
<script language="javascript" type="text/javascript"> | |
window.onload = function() { | |
var forms = document.getElementsByTagName('form'); | |
for (var i = 0; i < forms.length; i++) { | |
var new_hidden = document.createElement('input'); | |
new_hidden.type= 'hidden'; | |
new_hidden.name = "input_key"; | |
new_hidden.value = document.getElementById('input_key_source').value; |
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
mysql> desc (SELECT * FROM users WHERE email_pc='[email protected]' AND deleted=0) UNION (SELECT * FROM users WHERE email_mobile='[email protected]' AND deleted=0) \G | |
*************************** 1. row *************************** | |
id: 1 | |
select_type: PRIMARY | |
table: users | |
type: const | |
possible_keys: email_pc | |
key: email_pc | |
key_len: 264 | |
ref: const,const |
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 YmLinerTest | |
{ | |
public function test(array $array) | |
{ | |
sort($array);//一応ソート | |
$date = new DateTime($array[0].'01'); | |
foreach ($array as $ym) { | |
if ($date->format('Ym') != $ym) return false; |
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
<html> | |
<body> | |
<form action="" method="post"> | |
exists maxlength: <input type="text" name="age" value="99" maxlength="2" /><br /> | |
textarea: <textarea name="test"></textarea><br /> | |
not exists maxlength: <input type="text" name="zip" value="" /><br /> | |
</form> | |
</body> | |
</html> |
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
<tr> | |
<td>storeEval</td> | |
<td>this.page().getDocument().forms[0]['enc'].value</td> | |
<td>enc</td> | |
</tr> | |
<tr> | |
<td>assertValue</td> | |
<td>name=enc</td> | |
<td>${enc}</td> | |
</tr> |
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
// ==UserScript== | |
// @name chatwork to all helper | |
// @match https://www.chatwork.com/* | |
// @version 1.1 | |
// ==/UserScript== | |
(function(){ | |
document.getElementById('cw_chattext').addEventListener('blur', function(e){ | |
if (/[@@]{2}/.test(e.target.value)) { | |
var to_list = []; | |
var imgs = document.getElementById('cw_mention_gallery').getElementsByTagName('img'); |
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
#!/bin/sh | |
# usage: | |
# git current で現在のブランチ名を表示する | |
git branch | grep '*' | sed 's/* //' |
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
protected function assertInuptValue($crawler, $key, $val) | |
{ | |
$input = $crawler->filter('input[name="'.$key.'"]'); | |
$this->assertEquals( | |
$val, $input->attr('value'), $key.' failed' | |
); | |
} | |
protected function assertSelectValue($crawler, $key, $val) | |
{ |
NewerOlder