Skip to content

Instantly share code, notes, and snippets.

@shabeersha
shabeersha / How to Install Robo3t On Linux Mint 21.md
Last active July 2, 2023 02:35
How to Install Robo3t On Linux Mint 21

Install Robo3t On Ubuntu 18.04

Download the package form Robo3t or using wget
wget https://download.studio3t.com/robomongo/linux/robo3t-1.4.4-linux-x86_64-e6ac9ec.tar.gz
Extract here using

tar -xvzf robo3t-1.4.4-linux-x86_64-e6ac9ec.tar.gz

<html>
<head>
<script src="pingpoliCandlestickChart.js"></script>
</head>
<body>
<canvas width="1280" height="720" id="testcanvas"></canvas>
<script>
function plot()
{
var xmlhttp = new XMLHttpRequest();
/*
A single-file JavaScript class to draw candlestick charts.
Use at your own risk.
https://twitter.com/pingpoli
https://pingpoli.de
*/
function pingpoliCandlestick( timestamp , open , close , high , low )
{
this.timestamp = parseInt(timestamp);
this.open = parseFloat(open);
@vlucas
vlucas / encryption.ts
Last active April 26, 2025 10:26
Stronger Encryption and Decryption in Node.js
import { createCipheriv, createDecipheriv, randomBytes } from "crypto";
const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters)
const IV_LENGTH: number = 16; // For AES, this is always 16
/**
* Will generate valid encryption keys for use
* Not used in the code below, but generate one and store it in ENV for your own purposes
*/
export function keyGen() {
@flesch
flesch / basic-auth.js
Last active July 27, 2022 12:39
HTTP Basic Authentication with Express, without express.basicAuth.
var express = require("express");
var app = express();
app.get("/restricted", function(req, res, next){
// Grab the "Authorization" header.
var auth = req.get("authorization");
// On the first request, the "Authorization" header won't exist, so we'll set a Response
// header that prompts the browser to ask for a username and password.