This file contains hidden or 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
| SELECT k.name AS keyword, COUNT(kp."B") AS count | |
| FROM "Keyword" k | |
| LEFT JOIN ( | |
| SELECT DISTINCT "A" AS keywordId, "B" | |
| FROM "_KeywordToProduct" -- Replace with the actual name of your intermediary table | |
| ) AS kp ON k.id = kp.keywordId | |
| GROUP BY k.name | |
| ORDER BY count DESC; |
This file contains hidden or 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 { AnyRouter, TRPCError } from "@trpc/server"; | |
| import { | |
| NodeHTTPCreateContextFnOptions, | |
| NodeHTTPHandlerOptions, | |
| nodeHTTPRequestHandler, | |
| } from "@trpc/server/dist/adapters/node-http"; | |
| import { VercelApiHandler, VercelRequest, VercelResponse } from "@vercel/node"; | |
| import Cors from "cors"; | |
| const cors = Cors(); |
This file contains hidden or 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
| if (!Array.prototype.find) { | |
| Array.prototype.find = function (predicate) { | |
| return this.filter(predicate)[0] | |
| } | |
| } |
This file contains hidden or 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
| let hasBlobConstructor = typeof(Blob) !== 'undefined' && (function () { | |
| try { | |
| return Boolean(new Blob()); | |
| } catch (e) { | |
| return false | |
| } | |
| }()) | |
| let hasArrayBufferViewSupport = hasBlobConstructor && typeof(Uint8Array) !== 'undefined' && (function () { | |
| try { |
This file contains hidden or 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 default function debounce(func, wait, immediate) { | |
| let timeout | |
| return function(...args) { | |
| clearTimeout(timeout) | |
| timeout = setTimeout(() => { | |
| timeout = null | |
| if (!immediate) func.apply(this, args) | |
| }, wait) | |
| if (immediate && !timeout) func.apply(this, [...args]) | |
| } |
This file contains hidden or 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
| node: | |
| image: "mhart/alpine-node:5.9.1" | |
| redis: | |
| image: "redis:3.0.7-alpine" | |
| app: | |
| build: app | |
| api: | |
| build: api |
This file contains hidden or 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
| Atom sync settings |
This file contains hidden or 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
| <a href={data.link} target="_blank" className="image"> | |
| <span className="tag">ZG Instagram</span> | |
| <img className="image" src={data.images.standard_resolution.url} width="100%" height="100%" /> | |
| </a> |
This file contains hidden or 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
| <a href={data.link} target="_blank" className="image"> | |
| <span className="tag">ZG Instagram</span> | |
| <img className="image" src={data.images.standard_resolution.url} width="100%" height="100%" /> | |
| </a> |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
NewerOlder