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
import moment from 'moment' | |
class Calendar{ | |
constructor(paramCalendarDiv, updateCallback) { | |
this.calendarDiv = paramCalendarDiv | |
this.monthPage = 0 | |
this.activatedDay = null | |
this.callbacks = [] | |
this.todayCallbacks = [] |
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
import puppeteer from 'puppeteer' | |
import puppeteerExtra from 'puppeteer-extra' | |
import pluginStealth from 'puppeteer-extra-plugin-stealth' | |
import cloudscraper from 'cloudscraper' | |
import {User} from "../domain/user"; | |
import {accessing} from "../handlers/nasHandler"; | |
let scraper: any = cloudscraper | |
let browser; |
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
export const chunk = <T>(array: T[], chunkSize: number) => { | |
const result: T[][] = [] | |
for (let i = 0; i < array.length; i += chunkSize) | |
result.push(array.slice(i, i + chunkSize)) | |
return result | |
} |
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/, '')) | |
}) |
OlderNewer