Skip to content

Instantly share code, notes, and snippets.

View Explosion-Scratch's full-sized avatar

--Explosion-- Explosion-Scratch

View GitHub Profile
@advaith1
advaith1 / discordjs-slash-commands.md
Last active April 20, 2024 05:39
Slash Commands in Discord.js
@senderle
senderle / hand-modify-pdf.md
Created September 23, 2020 15:03
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.

This file has been truncated, but you can view the full file.
[
{"question":"A ____ atom in an atomic clock beats 9,192,631,770 times a second","answer":"cesium","money":1000},
{"question":"A ____ generates temperatures five times hotter than those found on the sun's surface","answer":"lightning bolt","money":1000},
{"question":"A ____ is a pact between a secular authority & the church","answer":"concordat","money":1000},
{"question":"A ____ is the blue field behind the stars","answer":"canton","money":1000},
{"question":"A ____ occurs when all the planets of the our Solar System line up","answer":"sysygy","money":1000},
{"question":"A ____ razor removed from King Tut's Tomb was still sharp enough to be used","answer":"golden","money":1000},
{"question":"A ____ takes 33 hours to crawl one mile","answer":"snail","money":1000},
{"question":"A ____ women can get a divorce if her husband doesn't give her coffee","answer":"saudi arabian","money":1000},
{"question":"A ____ written to celebrate a wedding is called a epithalamium","answer":"poem","money":1000},
@BoomerScratch
BoomerScratch / _scratch-view-stepping.user.js
Last active July 7, 2020 22:20
View stepping in Scratch editor
// ==UserScript==
// @name Scratch - view stepping
// @namespace none
// @version 1.1
// @description Allows you to see which block currently executes in the Scratch editor (scratch.mit.edu), which is useful for debugging.
// @author BoomerScratch
// @match https://scratch.mit.edu/projects/*
// @grant none
// @run-at document-start
// @homepageURL https://gist.github.com/BoomerScratch/0592337050810244236d69a4267b3913
[class*="stage-header_stage-menu-wrapper"][class*="box_box"] {
flex-direction: row-reverse;
}
[class*="gui_body-wrapper"], [class*="menu-bar_menu-bar_"] {
background: #c0c3c6;
}
[class*="menu-bar_menu-bar_"] *{
color:#4c4c4c;
background: transparent;
[{
"question": "A flashing red traffic light signifies that a driver should do what?",
"A": "stop",
"B": "speed up",
"C": "proceed with caution",
"D": "honk the horn",
"answer": "A"
}, {
"question": "A knish is traditionally stuffed with what filling?",
"A": "potato",
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 27, 2024 06:09
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@sidneys
sidneys / youtube_format_code_itag_list.md
Created January 20, 2018 11:12
YouTube video stream format codes itags

YouTube video stream format codes

Comprehensive list of YouTube format code itags

itag Code Container Content Resolution Bitrate Range VR / 3D
5 flv audio/video 240p - - -
6 flv audio/video 270p - - -
17 3gp audio/video 144p - - -
18 mp4 audio/video 360p - - -
22 mp4 audio/video 720p - - -
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@deiu
deiu / webcryptoapi.html
Last active January 7, 2024 21:18
Web Crypto API example: RSA keygen & export & import & sign & verify & encrypt & decrypt
<!-- MIT License -->
<html>
<head>
<script>
function generateKey(alg, scope) {
return new Promise(function(resolve) {
var genkey = crypto.subtle.generateKey(alg, true, scope)
genkey.then(function (pair) {
resolve(pair)
})