Skip to content

Instantly share code, notes, and snippets.

View Sparklytical's full-sized avatar
🏠
Home

Spark Sparklytical

🏠
Home
View GitHub Profile
@aelk00
aelk00 / remove-likes.md
Last active March 1, 2024 00:58
Remove all your facebook likes
@leodutra
leodutra / -setup-windows-wsl-devenv.md
Last active July 25, 2025 20:15
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements

@samsch
samsch / pg_add_db.sh
Created August 16, 2019 19:19
Create local Postgres database + user + password
#!/bin/bash
name=$1
if [[ -n "$name" ]]; then
if [[ $name =~ ^[a-z_]+$ ]]; then
sudo -u postgres createdb $name
sudo -u postgres createuser $name
sudo -u postgres psql -c "alter user $name with encrypted password '$name';"
sudo -u postgres psql -c "grant all privileges on database $name to $name;"
module.exports = {
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
extends: [
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: "module" // Allows for the use of imports
},
rules: {
@samsch
samsch / stop-using-jwts.md
Last active October 23, 2025 17:15
Stop using JWTs

Stop using JWTs!

TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.

If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)

A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/

The reason to avoid JWTs comes down to a couple different points:

  • The JWT specification is specifically designed only for very short-live tokens (~5 minute or less). Sessions
@jezhalford
jezhalford / gist:dd4c7e99e068ddfdc352dd1a7a7afaf9
Created January 23, 2019 11:44
indent-rainbow colours for grey indent shading in VSCode
{
"indentRainbow.colors": [
"rgba(16,16,16,0.2)",
"rgba(32,32,32,0.2)",
"rgba(48,48,48,0.2)",
"rgba(64,64,64,0.2)",
"rgba(80,80,80,0.2)",
"rgba(96,96,96,0.2)",
"rgba(112,112,112,0.2)",
"rgba(128,128,128,0.2)",
@lsissoko
lsissoko / firefox-developer-edition.md
Last active April 10, 2020 12:46 — forked from mahammad/firefox-developer-edition.md
How To install Firefox Developer Edition and create desktop icon for Ubuntu 14.04 LTS

chose other install way

  1. Open Terminal Ctrl+Alt+T Download Firefox Developer Edition tar file

    wget https://download.mozilla.org/?product=firefox-aurora-latest-ssl&os=linux64&lang=en-US

  2. Copy tar file to opt sudo cp -rp firefox-35.0a2.en-US.linux-x86_64.tar.bz2

  3. Open opt folder (cd /opt/) and untar file sudo tar xjf firefox-35.0a2.en-US.linux-x86_64.tar.bz2

@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@joepie91
joepie91 / getting-started.md
Last active August 10, 2025 16:09
Getting started with Node.js

"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.

And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)

Setting expectations

Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.

Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. _Get out there and build things!