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
| function base64ToFile(base64: string, filename: string) { | |
| const [header, code] = base64.split(',') | |
| const cotnentType = header.replace(/(data:)|(;base64)/g, ''); | |
| const byteStr = atob(code); | |
| const bytes = new Array(byteStr.length); | |
| for (var i = 0; i < byteStr.length; i++) { | |
| bytes[i] = byteStr.charCodeAt(i); | |
| } | |
| const byteArray = new Uint8Array(bytes); |
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
| [ | |
| { | |
| "label": "Asia/Kabul", | |
| "value": "+04:30" | |
| }, | |
| { | |
| "label": "Europe/Tirane", | |
| "value": "+01:00" | |
| }, | |
| { |
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
| /* https://github.com/openstyles/stylus/ */ | |
| html { | |
| filter: invert(1) hue-rotate(180deg); | |
| color-scheme: dark; | |
| } | |
| html img{ | |
| filter: invert(1) hue-rotate(180deg); | |
| } |
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
| async function capture(element, options = {}) { | |
| const module = await import('https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.esm.js') | |
| const html2canvas = module.default; | |
| return await html2canvas(element, options); | |
| } | |
| async function canvasToBlob(canvas, type, quality) { | |
| return await new Promise((resolve) => { | |
| canvas.toBlob(blob => resolve(blob), type, quality); | |
| }); |
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
| var predeclared = starlark.StringDict{ | |
| "format": starlark.NewBuiltin("format", func(thread *starlark.Thread, fn *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) { | |
| var function = thread.DebugFrame(1).Callable().(*starlark.Function) | |
| var locals = function.Locals() | |
| var globals = function.Globals() | |
| var formatArgs = make(map[string]starlark.Value) | |
| for key, val := range globals { | |
| formatArgs[key] = val |
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
| #!/usr/bin/env bash | |
| # set -v | |
| set -e | |
| file_env() { | |
| local var="$1" | |
| local fileVar="${var}_FILE" | |
| local def="${2:-}" |
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
| // ==UserScript== | |
| // @name GitHub JsDelivr Link | |
| // @namespace https://github.com/hungtcs | |
| // @version 2024-12-10 | |
| // @description open github jsdelivr link | |
| // @author hungtcs | |
| // @license MIT | |
| // @match https://github.com/**/* | |
| // @icon https://camo.githubusercontent.com/6a5d2046028682a99b5fa88ef0f3399c9bced1d514179686a3973a323bccbf44/68747470733a2f2f7777772e6a7364656c6976722e636f6d2f69636f6e5f323536783235362e706e67 | |
| // @grant none |
OlderNewer