Skip to content

Instantly share code, notes, and snippets.

View NightScript370's full-sized avatar
💭
I may be slow to respond.

NightScript NightScript370

💭
I may be slow to respond.
View GitHub Profile
@NightScript370
NightScript370 / toPx.ts
Last active August 24, 2022 02:57 — forked from wKich/toPx.js
convert CSS units to pixels
// imported from https://github.com/heygrady/Units
let preCalculated = false;
let computedValueBug = false;
const defaultView = document.defaultView;
const getComputedStyle = defaultView && defaultView.getComputedStyle;
const runit = /^(-?[\d+\.\-]+)([a-z]+|%)$/i;
const convert:Record<string, number|undefined> = {
mm2px: 1/25.4,
import { JSDOM } from 'jsdom';
import {Thing, WithContext, LocalBusiness, FAQPage} from '../../typings/schema.d.ts';
import config from '../data/siteConfig.json' assert { type: "json" }
import * as path from "path";
export default class schemaHandler {
document: Document;
schema: WithContext<Exclude<Thing, string>>;
constructor(htmlDocument:string) {
@NightScript370
NightScript370 / vigenere.ts
Created July 7, 2022 20:28
Calculating Vigenere Cipher's (Gravity Falls) via a TS script
function vigenere(text: string, key: string, DecryptMode: boolean, alphabet: string) {
const textMask = getTextMask(text, alphabet);
const normalizedText = getNormalizedText(text, textMask);
if (!(normalizedText.length > 0 && key.length > 0))
return;
const transformedText = DecryptMode ? decrypt(normalizedText, alphabet, key) : encrypt(normalizedText, alphabet, key);
return restoreText(text, transformedText, textMask);
}
@NightScript370
NightScript370 / lightshot-image-extractor.ts
Last active December 26, 2021 15:30 — forked from foyez/lightshot-image-extractor.js
LightShot Image Extractor: scrapes the jpg screenshot link from a LightShot page
import { DOMParser, Element, HTMLDocument } from "https://deno.land/x/deno_dom/deno-dom-wasm.ts";
/**
* Extracts the jpg url from a LightShot page
* lightshot_image('http://prntscr.com/dki21q')
* http://image.prntscr.com/image/1aaf571d0adf4aa098eb565bbb196af6.png
*/
export default async function lightshotImageExtractor(url:URL):URL {
const connection = await fetch(url.href);
if (!connection.ok) throw Error("Connection not OK");
🗣 (2021-03-03T20:59:32Z) Commented on #272 in Immediate-Mode-UI/Nuklear
🎉 (2021-03-01T19:01:38Z) Merged PR #69 in cfw-guide/dsi.cfw.guide
🎉 (2021-03-01T15:17:49Z) Merged PR #6 in DS-Homebrew/twilight-manual
🗣 (2021-03-01T05:33:23Z) Commented on #62 in cfw-guide/dsi.cfw.guide
🗣 (2021-02-23T05:33:47Z) Commented on #68 in cfw-guide/dsi.cfw.guide
🗣 (2021-02-21T20:19:38Z) Commented on #1299 in DS-Homebrew/TWiLightMenu
🗣 (2021-02-21T20:04:26Z) Commented on #70 in Universal-Team/Universal-Updater
const selectorContainer = document.createElement("div");
selectorContainer.innerText = "Please select a firmware version: ";
const defaultOptions = [
'<b><a href="ntrboot">ntrboot</a></b> --- (Requires a Compatible Flashcart)',
'<b><a href="installing-boot9strap-(hardmod)">Installing boot9strap (Hardmod)</a></b> --- (Requires a Compatible Flashcart)'
]
class exploitList {
constructor() {
title
Get Started

{% include toc title="Table of Contents" %}

Required Reading

Select the appropriate page for your version from the chart below. Note that the "from" and "to" fields are inclusive. This means that, for example, the "from 9.0.0 to 9.2.0" row includes 9.0.0, 9.1.0, and 9.2.0.

trigger:
branches:
include: ['*']
tags:
include: ['*']
name: $[format('{0:yyyyMMdd\-HHmmss}', pipeline.startTime)]
variables:
REPOSITORY_NAME: $(Build.Repository.Name)
pageElement.innerHTML = pageElement.innerHTML.replace(/<h([\d]).*>([^<]+)<\/h([\d])>/gi, (str, openLevel, titleText, closeLevel) => {
if (openLevel != closeLevel)
return str;
if (openLevel > level)
toc += (new Array(openLevel - level + 1)).join('<ul>');
else if (openLevel < level)
toc += (new Array(level - openLevel + 1)).join('</li></ul>');
else
toc += (new Array(level+ 1)).join('</li>');
@NightScript370
NightScript370 / amiibo.js
Created April 25, 2019 20:45
I'm making a new Amiibo API. If anyone can help out, that'd be great
{
"Mario": {
"series": {
"Amiibo": "Super Smash Bros.",
"Franchise": "Super Mario"
},
"type": "Figure",
"wave": 1,
"release": {
"au": {"year": 2014, "month": 11, "day": 29},