Skip to content

Instantly share code, notes, and snippets.

View akhilome's full-sized avatar
🌚
poupon

Kizito Akhilome akhilome

🌚
poupon
View GitHub Profile
@aleclarson
aleclarson / rollup-typescript.md
Last active April 7, 2024 14:13
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

@winadiw
winadiw / django_deploy.md
Created November 18, 2018 14:30 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@nakov
nakov / AES-256-CTR-Argon2-HMAC-SHA256-example.js
Last active November 9, 2023 02:32
Cryptography for JavaScript Developers: Hashes, HMAC, PBKDF2, Scrypt, Argon2, AES-256-CTR, ECDSA, EdDSA, secp256k1, Ed25519
const aes = require("aes-js");
const argon2 = require("argon2");
const crypto = require("crypto");
const cryptoJS = require("crypto-js");
// Encrypt using AES-256-CTR-Argon2-HMAC-SHA-256
async function aes256ctrEncrypt(plaintext, password) {
let argon2salt = crypto.randomBytes(16); // 128-bit salt for argon2
let argon2Settings = { type: argon2.argon2di, raw: true,
timeCost: 8, memoryCost: 2 ** 15, parallelism: 2,
@winadiw
winadiw / webdev_online_resources.md
Created July 31, 2018 05:53 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@shrekuu
shrekuu / fixing-locale-error-on-ubuntu-server-14-and-16.sh
Last active July 24, 2021 11:15
fixed: manpath: can't set the locale; make sure $LC_* and $LANG are correct
# I know you've got stuck for too long ^_^Y
# Locale is not configured correct. I don't know what broke that. Maybe time did.
# I fixed it on my ubuntu 14 & 16 servers.
# Follow the steps below or run this script on your machine.
# step 1
# ensure this line in `/etc/default/locale` file and `/etc/environment` file
# LANG="en_US.UTF-8"
sudo echo '\nLANG="en_US.UTF-8"' >> /etc/default/locale && /etc/environment
@blairg
blairg / index.js
Created December 22, 2017 23:58
Mock event.preventDefault() with Jest
static async handleDelete(event) {
let success = true;
await Axios.delete('/todos')
.then(() => {})
.catch(error => {
success = false;
console.error(error);
});
@laurenfazah
laurenfazah / authentication_with_express_postgres.md
Last active November 8, 2022 01:51
Authentication with an Express API and Postgres

Authentication with an Express API and Postgres

Setting Up

Let's make sure our Express app has the required base modules:

# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon

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?

@subfuzion
subfuzion / curl.md
Last active April 23, 2024 14:44
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.