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
<script type="text/javascript"> | |
$(document).ready(function () { | |
var carousel = $("#carousel").waterwheelCarousel({ | |
autoPlay : 0, | |
flankingItems:2, | |
movedToCenter: function ($item) { | |
$('#callback-output').prepend('movedToCenter: ' + $item.attr('id') + '<br/>'); | |
$item.siblings("span").css("display","block"); | |
}, | |
movingFromCenter: function ($item) { |
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
const puppeteer = require('puppeteer'); | |
const logger = require('./logger'); | |
const Pool = require('./pool'); | |
const LRU = require("lru-cache"); | |
var browserErrorCount = 0; | |
var collectInterval = null; | |
var hitInterval = null; | |
async function pageAccelerate(page){ |
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
// require('./product') | |
module.exports = (sequelize, DataTypes) => ( | |
sequelize.define('product', { | |
codeNumber: { | |
type: DataTypes.STRING(50), | |
allowNull: false, | |
}, | |
kind: { | |
type: DataTypes.STRING(20), | |
allowNull: 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
import "moment/locale/ko" | |
import * as moment from 'moment' | |
moment.locale('ko') | |
console.log(moment.default().format('MM-DD ddd')) // 03-10 화 |
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
// iOS Pinch Zoom 끄기 | |
document.documentElement.addEventListener( | |
'touchstart', | |
(event) => { | |
if (event.touches.length > 1) { | |
event.preventDefault() | |
} | |
}, | |
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
import * as FirebaseAdmin from 'firebase-admin' | |
import * as serviceAccount from '../~~.json' | |
FirebaseAdmin.initializeApp({ | |
// @ts-ignore | |
credential: FirebaseAdmin.credential.cert(serviceAccount), | |
}) | |
export const sendPushMessage = async ( | |
notification: { |
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
/* | |
Windows 10 일부 버전 + XP버전에서 JSON 파일을 메모장으로 | |
수정한 사람의 경우 utf8 로 저장해도 utf8 with BOM 이라는 | |
형식으로 저장이되는데 이형식특이한게 최초에 이상한 글자를 추가해서 | |
fs 가 삑살나서 터집니다, 이 오류를 수정하려면 아래 코드를 쓰면 됩니다. | |
*/ | |
fs.readFile('./myconfig.json', 'utf8', function (err, data) { | |
myconfig = JSON.parse(data.toString('utf8').replace(/^\uFEFF/, '')) | |
}) |
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
// VirtualFileInput | |
type FileCallbackType = ( | |
event: { | |
file: File | |
thumbnail: string | ArrayBuffer | null | |
getFormData: (name: string) => FormData | |
} | void | |
) => void |
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
/** | |
* @description | |
* | |
* 브라우저에서 특정 오브젝트 안에 트리형태로 | |
* 존재하는 객체들과 함수에 접근해서 key 를 찾아냅니다. | |
* | |
* In the browser, access objects and functions that exist | |
* in tree form within a specific object to find the key. | |
* | |
* @param targetObject Object |
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
import matcher from 'matcher' | |
import CORS from 'cors' | |
let corsOptions = { | |
origin: (origin, callback) => { | |
let allow = false | |
for (let allowAccessDomain of settingsData.allowAccessDomains) { // [ "*.mydomain.com"] | |
if (matcher.isMatch(origin, allowAccessDomain)) { | |
allow = true | |
break |
OlderNewer