Skip to content

Instantly share code, notes, and snippets.

View hoangtrung99's full-sized avatar
⚔️

Nguyễn Hoàng Trung hoangtrung99

⚔️
View GitHub Profile
<?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>
@hoangtrung99
hoangtrung99 / giaiphapykhoa.js
Last active August 30, 2023 08:06
download giaiphapykhoa
// ==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==
@hoangtrung99
hoangtrung99 / cd-cloudrun.yml
Last active March 17, 2023 13:30
CD google cloud run
# 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
@hoangtrung99
hoangtrung99 / EchartReact.ts
Last active January 5, 2023 04:18
React component for react
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
@hoangtrung99
hoangtrung99 / imgToPdf.js
Last active August 26, 2023 16:07
Download pdf from gg drive without permission
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;
}