Skip to content

Instantly share code, notes, and snippets.

@fergusKe
fergusKe / cloudSettings
Created December 8, 2021 07:00
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-12-08T07:00:31.718Z","extensionVersion":"v3.4.3"}
{
nbe: {
nodes: {
'5': {
id: '5',
type: 'database',
name: 'database',
in: false,
out: true,
form: [
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
db = SQLAlchemy(app)
class Linkedin(db.Model):
__tablename__ = 'linkedin'
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
<script>
(function($) {
var dataLayer = window.dataLayer || [];
var eventString = 'cusevent';
var eventCategoryString = '官網文章';
var title = $('.article-area h1').text().trim();
var intro = $('.article-area .introduction').text().trim();
var inner = $('.article-area .article-inner >').not('.article-lock').text().trim();
var win_width = $(window).width();
<script>
(function(emmit, listening){
listening.forEach(function(obj){
if(obj.type == 'delay'){
$(obj.ele).click(function(){
setTimeout(function(){emmit(obj.action(this),obj.label(this));}, 500);
});
} else if(obj.type == 'body'){
$('body').on('click', obj.ele, function(){emmit(obj.action(this),obj.label(this));});
} else if(obj.type == 'change'){
$('.df_content .item a').on('click', function() {
var $this = $(this);
var type = $('.bd_product_title').text().trim();
var action = type + '類別-商品點擊';
// 範圍寬度 / 產品寬度 => 一列有幾個 col
var col = Math.floor($('.df_content').width() / ($('.df_content .item').width() + 10));
// 當前產品是第幾個項目 / 一列有幾個 col => 當前產品是第幾列
var idx = $this.parents('.item').index();
$(function(){
var colorMode = getCookie('colorMode'); // 取出 cookie
setColor(colorMode); // 設定顏色模式
$("body").on("click", ".toggle_track", function() {
if ($("#toggle_switch").prop("checked") == true) {
// 深夜模式
setColor('block');
} else {
// 白天模式
<script>
(function($) {
var dataLayer = window.dataLayer || [];
var eventCategoryString = '和運長租tesla租賃';
var $window = $(window);
var currentArea = '';
var areaShowed = [];
var areaEle = {
0: {ele: '.kv-img', label: 'tesla綠動租賃專案'},
1: {ele: '.content-p1 img', label: '輕鬆入主tesla'},
<script>
(function() {
var ecommerce = {{ecommerce}};
var purchase = ecommerce['purchase'];
if(purchase != null && purchase != '') {
var cookie_id = Number(getCookie('td_id'));
var id = purchase['actionField']['id'];
console.log('cookie_id = ', cookie_id);
console.log('id = ', id);
<script>
(function($) {
var eventCategoryString = '2019童書展熱銷主打活動頁';
var $window = $(window);
var areaEle = {
0: {ele: 'header', label: '1.首圖'},
1: {ele: '#area1', label: '2.熱門排行'},
2: {ele: '#area2', label: '3.精選66折'},
3: {ele: '#area3', label: '4.超值99'},
4: {ele: '#area4', label: '5.滿額贈'}