This file contains 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 jspdf = document.createElement("script"); | |
jspdf.onload = function () { | |
const { jsPDF } = window.jspdf; | |
let pdf = new jsPDF(); | |
let elements = document.getElementsByTagName("img"); | |
for (let i in elements) { | |
let img = elements[i]; | |
if (!/^blob:/.test(img.src)) { | |
continue; | |
} |
This file contains 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 type { ECharts, SetOptionOpts } from 'echarts/core' | |
import { getInstanceByDom, init } from 'echarts/core' | |
import { ECBasicOption } from 'echarts/types/dist/shared' | |
import { forwardRef, useEffect, useImperativeHandle, useRef } from 'react' | |
// Redeclare forwardRef | |
declare module 'react' { | |
function forwardRef<T, P = Record<string, unknown>>( | |
render: (props: P, ref: React.Ref<T>) => React.ReactElement | null | |
): (props: P & React.RefAttributes<T>) => React.ReactElement | null |
This file contains 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
# SETUP | |
# 1. Enable Google Cloud Run API | |
# 2. Enable Google Artifact Registry API | |
# 3. Create a service account with the following roles: | |
# - Cloud Run Admin | |
# - Artifact Registry Administrator | |
# - Cloud Run Service Agent | |
# - Service Account User | |
# 4. Setup a GitHub secret called GOOGLE_CREDENTIALS with the service account key | |
# 5. Create a Google Artifact Registry repository |
This file contains 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
// ==UserScript== | |
// @name Download giaiphapykhoa pdf | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Download giaiphapykhoa.com! | |
// @author https://github.com/hoangtrung99 | |
// @match https://giaiphapykhoa.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com | |
// @grant none | |
// ==/UserScript== |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AdjustWindowForFontSizeChange</key> | |
<true/> | |
<key>AlternateMouseScroll</key> | |
<true/> | |
<key>AppleAntiAliasingThreshold</key> | |
<integer>1</integer> |