Skip to content

Instantly share code, notes, and snippets.

View leedohyung-dba's full-sized avatar
🤡
have rats

lee leedohyung-dba

🤡
have rats
View GitHub Profile
<input type="text" pattern="/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/" name="textMail">
@leedohyung-dba
leedohyung-dba / bug_ex_1.js
Last active September 6, 2016 02:15
[JavaScript]HTML5 Form Validationの制御と注意事項 ref: http://qiita.com/leedohyung-dba/items/b762e21018edc4d0387c
const VALID_MESSAGE_REQUIRED = "入力してくださいね-!✋";
const VALID_MESSAGE_PATTERN = "正しい構文で入力してくださいね-!✋";
const VALID_MESSAGE_TYPE = "指定されている形式で入力してくださいね-!✋";
$("input").each(function(index, elem) {
elem.addEventListener("invalid", function(e) {
if(elem.validity.valueMissing){
//要素が入力必須のフィールドであるのに値がない場合
e.target.setCustomValidity(VALID_MESSAGE_REQUIRED);
} else if(elem.validity.typeMismatch) {
@leedohyung-dba
leedohyung-dba / TwitterUp.php
Created September 7, 2016 03:17
[PHP]アプリにTwitterの投稿機能を導入 ref: http://qiita.com/leedohyung-dba/items/f5254b79add95a13c2ac
//画嬢ない記事投稿
$params = array('status' => $up_twitter_content);
$endpoint = $tmhOAuth->url('1.1/statuses/update');));
@leedohyung-dba
leedohyung-dba / Facebook.js
Last active September 7, 2016 03:21
[PHP][JavaScript]Twitter APIとFacebook APIのそれぞれ違う注意事項・制約事項 ref: http://qiita.com/leedohyung-dba/items/e8e3e39262c3b1caacc7
picture: PHPVALUE.upImage // = http://~
The email was not sent. Error message: Error retrieving credentials from the instance profile metadata server. (cURL error 28: Connection timed out after 1001 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html))
@leedohyung-dba
leedohyung-dba / examples.yml
Created September 8, 2016 07:36
[Ansible][PostgreSQL]AnsibleでPostgreSQLのCreate DBエラー ref: http://qiita.com/leedohyung-dba/items/fa66577eefb90ec4044d
# Create a new database with name "acme"
- postgresql_db: name=acme
# Create a new database with name "acme" and specific encoding and locale
# settings. If a template different from "template0" is specified, encoding
# and locale settings must match those of the template.
- postgresql_db: name=acme
encoding='UTF-8'
lc_collate='de_DE.UTF-8'
lc_ctype='de_DE.UTF-8'
template='template0'
@leedohyung-dba
leedohyung-dba / select2_example.js
Last active September 9, 2016 11:30
[JavaScript]jQueryプラグイン、select2を始める!そして、select2の改善事項 ref: http://qiita.com/leedohyung-dba/items/af6fe5880a2f5d071b56
$(".user_list").select2({
closeOnSelect : false
});
@leedohyung-dba
leedohyung-dba / 1_test.json
Last active September 17, 2016 20:28
jQuery.ajaxにCacheが残って困ったら設定 ref: http://qiita.com/leedohyung-dba/items/2cfd683c65aeb7c1108d
{
"head": "test_a"
}
@leedohyung-dba
leedohyung-dba / tooltip_sample.css
Created September 23, 2016 02:55
[jQuery]jQuery.tooltipの「出力エリアをずれてしまう」の原因と解決 ref: http://qiita.com/leedohyung-dba/items/b644b03f6d095778c518
.ui-tooltip {
word-break:break-all;
}
@leedohyung-dba
leedohyung-dba / composer.json
Created September 30, 2016 05:32
[PHP]薄くて簡単なORMを導入する場合、おすすめライブラリー「Idiorm」 ref: http://qiita.com/leedohyung-dba/items/b6ee3f744aa92cf83865
"require": {
"j4mie/idiorm": "1.5.1"
}