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.js
Last active May 8, 2024 06:55
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@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.