Skip to content

Instantly share code, notes, and snippets.

View SunnyCapt's full-sized avatar

SunnyCapt SunnyCapt

View GitHub Profile
@SunnyCapt
SunnyCapt / pretty-paragraph.ts
Last active October 16, 2025 10:13
Preserve Google Docs text formatting when pasting into editorjs/paragraph block
import Paragraph from "@editorjs/paragraph";
import { HTMLPasteEvent, PasteConfig } from "@editorjs/editorjs";
class GdocsHandler {
static handleSpan(pEl: HTMLElement): void {
const walk = (node: Node): string => {
if (node.nodeType === Node.TEXT_NODE) {
const text = (node as Text).data;
return text
.replace(/&/g, "&")
@SunnyCapt
SunnyCapt / LinkedInTitlesScraper.js
Last active March 11, 2023 16:36
monkey script to parse linkedin job titles | goto https://github.com/SunnyCapt/f-linkedin-job-searching
// ==UserScript==
// @name LinkedInTitlesScraper.js
// @version 0.1
// @description monkey script to parse linkedin job titles
// @author SunnyCapt
// @match https://*.linkedin.com/jobs/search*
// @homedevpage https://github.com/SunnyCapt/f-linkedin-job-searching
// ==/UserScript==
(function() {
<options>
n=10
type=2
right=4
max=2
</options>
<value>
1
1
1