Skip to content

Instantly share code, notes, and snippets.

View webdev03's full-sized avatar
🙂

Devarsh webdev03

🙂
  • New Zealand
  • 03:33 (UTC +12:00)
View GitHub Profile
@hello-smile6
hello-smile6 / hardbrick.sh
Last active February 7, 2024 13:24
/dev bowling
# DO NOT RUN UNLESS IT'S A VM! I TAKE NO RESPOSIBILITY FOR YOUR ACTIONS WITH THIS.
exit
kill -9 $pid
logout
kill -9 1
pkill init
sudo pkill init
for device in `find /dev`
do
# Don't run synchronously
@ninjamar
ninjamar / main.py
Last active December 5, 2021 00:12
Scratch User Status
import re
import requests
user = 'ninjamar'
r = requests.get(f'https://scratch.mit.edu/users/{user}')
c = ''.join([i.decode().strip() for i in r.iter_lines()])
iscratcher = re.compile("<span class=\"group\">Scratcher</span>")
isscratchteam = re.compile("<span class=\"group\">Scratch Team</span>")
@sindresorhus
sindresorhus / esm-package.md
Last active September 27, 2024 05:05
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@citrusui
citrusui / dropdown.md
Last active September 20, 2024 17:58
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@oeon
oeon / base64-encode-decode.js
Created August 23, 2016 17:35 — forked from JavaScript-Packer/base64-encode-decode.js
Perfect ATOB/BTOA alternatives (Base64 encoder/decoder) for JavaScript/Jscript.net Demo on http://jsfiddle.net/1okoy0r0/
function b2a(a) {
var c, d, e, f, g, h, i, j, o, b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", k = 0, l = 0, m = "", n = [];
if (!a) return a;
do c = a.charCodeAt(k++), d = a.charCodeAt(k++), e = a.charCodeAt(k++), j = c << 16 | d << 8 | e,
f = 63 & j >> 18, g = 63 & j >> 12, h = 63 & j >> 6, i = 63 & j, n[l++] = b.charAt(f) + b.charAt(g) + b.charAt(h) + b.charAt(i); while (k < a.length);
return m = n.join(""), o = a.length % 3, (o ? m.slice(0, o - 3) :m) + "===".slice(o || 3);
}
function a2b(a) {
var b, c, d, e = {}, f = 0, g = 0, h = "", i = String.fromCharCode, j = a.length;