Skip to content

Instantly share code, notes, and snippets.

View Jeve-Stobs's full-sized avatar
🤔
Will we ever push to production?

Sam Jeve-Stobs

🤔
Will we ever push to production?
View GitHub Profile
@Jeve-Stobs
Jeve-Stobs / cool math support.md
Last active March 17, 2023 17:26
I just wanted to test out gh's new mathjax support. Looks sick

When $a \ne 0 $, there are two solutions to $(ax^2 + bx + c = 0)$ and they are $(x = {-b \pm \sqrt{b^2-4ac} \over 2a})$

@Jeve-Stobs
Jeve-Stobs / backup.sh
Last active February 13, 2022 00:35
Backup with mongodump & discord webhook
url="https://discord.com/api/webhooks/#/#"
mongodump mongodb://USERNAME:PASSWORD@DB_URL:DB_PORT/DATABASE?authSource=admin&w=1 --db=DATABASE
zip -r backup.zip dump/
curl \
-H "Content-Type: multipart/form-data" \
-F "file=@backup.zip;type=application/zip" \
$url
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
pnpm-lock.yaml
# testing
/coverage
@Jeve-Stobs
Jeve-Stobs / youtube.js
Created October 16, 2021 13:59
YouTube url parser
function youtube_parser(url) {
var regExp =
/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;
var match = url.match(regExp);
return match && match[7].length == 11 ? match[7] : false;
}
@Jeve-Stobs
Jeve-Stobs / fix-fonts.sh
Created September 10, 2021 02:51
Apple Emojis Linux
#!/usr/bin/env bash
#check if font is installed
fc-match "Noto Color Emoji"
#if not installed install with following line
apt-get install fonts-noto-color-emoji -y
curl -L https://noto-website-2.storage.googleapis.com/pkgs/NotoColorEmoji-unhinted.zip -o NotoColorEmoji.zip
unzip NotoColorEmoji.zip
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
C++ 17 hrs 20 mins ████████████████████▋ 98.8%
Objecti... 5 mins ░░░░░░░░░░░░░░░░░░░░░ 0.6%
JSON 5 mins ░░░░░░░░░░░░░░░░░░░░░ 0.5%
Markdown 1 min ░░░░░░░░░░░░░░░░░░░░░ 0.1%
Ezhil 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.0%
According to all known laws
of aviation,
there is no way a bee
should be able to fly.
Its wings are too small to get
{
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2021
},
"rules": {