Skip to content

Instantly share code, notes, and snippets.

View tedshd's full-sized avatar

Ted tedshd

View GitHub Profile
@tedshd
tedshd / app.ts
Created September 14, 2023 02:47
function parmas
import { showModalOrigin, showModal } from './function'
showModalOrigin({
dom: 'dom',
options: {
clickCloseOrigin: (e, tools) => {
console.log(e)
console.log('click close origin')
tools?.hideModalOrigin()
}
@tedshd
tedshd / topnine.js
Created November 15, 2020 19:06
topnine
var data = {
'123': {
'count': 123,
'type': 'video',
'source': ''
},
'345': {
'count': 345,
'type': 'video',
'source': ''
const puppeteer = require('puppeteer');
const url = require('url');
const pLimit = require('p-limit');
const limit = pLimit(1);
crawlerIG(['joanne_722']);
/**
*
@tedshd
tedshd / index.html
Last active April 7, 2020 19:53
banner prototype
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title></title>
<meta name="description" content="$3">
<meta name="keywords" content="$4">
@tedshd
tedshd / arr.js
Created January 6, 2020 11:00
sort diff
var arrOld = [2, 5, 3, 8, 9, 11, 12];
var arrNew = [8, 1, 3, 35, 5, 7];
// var arrOld = [
// {id: 2},
// {id: 5},
// {id: 3},
// {id: 8},
// {id: 9},
// {id: 11},
@tedshd
tedshd / note.md
Created November 6, 2018 02:30
id8 from facebook
@tedshd
tedshd / chatbot_day_note.md
Last active April 27, 2017 05:31
Chatbot day note

Chatbot day

hackpad

Chatbot的智慧與靈魂

對語意判斷的正確與否

確認是否是正確的語意

@tedshd
tedshd / json.php
Created February 9, 2017 06:34
push cms
<?php
$serverKey = $_POST['serverKey'];
$iid = $_POST['iid'];
$title = $_POST['title'];
$message = $_POST['message'];
$icon = $_POST['icon'];
$title_web = $_POST['title'];
$body_web = $_POST['body'];
@tedshd
tedshd / fcm.js
Created December 20, 2016 02:45
firebase cloud message (FCM) example
/**
*
* @authors Ted Shiu (ted@sitetag.us)
* @date 2016-12-15 17:29:18
*/
var config = {
apiKey: '',
authDomain: '',
databaseURL: '',