Skip to content

Instantly share code, notes, and snippets.

Avatar

Agung Jati Kusumo agungjk

View GitHub Profile
@agungjk
agungjk / ScrollingTextView.swift
Created Apr 6, 2021 — forked from NicholasBellucci/ScrollingTextView.swift
MacOS swift marquee scrolling text view
View ScrollingTextView.swift
import Cocoa
open class ScrollingTextView: NSView {
// MARK: - Open variables
/// Text to scroll
open var text: NSString?
/// Font for scrolling text
open var font: NSFont?
@agungjk
agungjk / [slug].js
Last active Jun 5, 2022
Crawler example on Vercel using Puppeteer and NextJS API routes
View [slug].js
const puppeteer = require('puppeteer-core');
const cheerio = require('cheerio');
const chrome = require('chrome-aws-lambda');
export default async (req, res) => {
const slug = req?.query?.slug;
if (!slug) {
res.statusCode = 200
res.setHeader('Content-Type', 'application/json')
res.end(JSON.stringify({ id: null }))