Skip to content

Instantly share code, notes, and snippets.

View gracefullight's full-sized avatar
🇦🇺

Eunkwang Shin gracefullight

🇦🇺
View GitHub Profile
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
character-set-server = utf8mb4
collation_server = utf8mb4_general_ci
// 리액트에 넣을 모듈을 선언한다.
class LoginForm extends React.Component {
constructor(props) {
super(props);
this.state = {id: '', pw : ''};
}
// input의 데이터가 변할 때 state의 값이 변경할 수 있게한다
handleChange(key, event){
this.state[key] = event.target.value;
<input type="text" name="date" class="date"/>
<script>
$(function(){
// pickadate 옵션 전역설정
$.extend($.fn.pickadate.defaults, {
monthsFull:['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
monthsShort: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
weekdaysFull: ['일', '월', '화', '수', '목', '금', '토'],
weekdaysShort:['일', '월', '화', '수', '목', '금', '토'],
$.fn.clearForm = function() {
return this.each(function() {
var type = this.type, tag = this.tagName.toLowerCase();
if (tag === 'form'){
return $(':input',this).clearForm();
}
if (type === 'text' || type === 'password' || type === 'hidden' || tag === 'textarea'){
this.value = '';
}else if (type === 'checkbox' || type === 'radio'){
this.checked = false;
$('#id').keypress(function(e){
if(e.which === 13){
// do something
}
});
/*
@author https://github.com/macek/jquery-serialize-object
*/
$.fn.serializeObject = function () {
"use strict";
var result = {};
var extend = function (i, element) {
var node = result[element.name];
if ('undefined' !== typeof node && node !== null) {
if ($.isArray(node)) {
/**
@author https://gist.github.com/peteboere/1517285
*/
$.fn.alterClass = function ( removals, additions ) {
var self = this;
if ( removals.indexOf( '*' ) === -1 ) {
// Use native jQuery methods if there is no wildcard matching
self.removeClass( removals );
/**
@author https://www.christianheilmann.com/2015/12/25/detecting-adblock-without-an-extra-http-overhead/
*/
;(function(adBlockEnabled) {
'use strict';
var testAd = document.createElement('div');
testAd.innerHTML = '&nbsp;';
testAd.className = 'adsbox';
document.body.appendChild(testAd);
{
"esnext": true,
"asi": false,
"boss": false,
"curly": true,
"eqeqeq": true,
"eqnull": false,
"evil": false,
"expr": true,
"forin": true,
<!--#include virtual = "/JSON_2.0.4.asp"-->
<%
'request TO JSON
Dim req:Set req = jsObject()
FOR EACH i IN Request.QueryString
IF Request.QueryString(i).count > 1 THEN
i = Replace(i,"&", "")
Set req(i) = jsArray()
FOR EACH j IN Request.QueryString(i)