Skip to content

Instantly share code, notes, and snippets.

View bauripalash's full-sized avatar
👋
getting back

Palash Bauri bauripalash

👋
getting back
View GitHub Profile
<p id="error"></p>
<div class="container">
<div class="loader"></div>
<p id="name"></p>
<div class="default">Get Weather</div>
<div class="box">
<div id="temp"></div>
<div id="button-box"><span class="button activated" id="button-f">°F</span><span class="button" id="button-c">°C</span></div>
</div>
<div class="box">
@vlucas
vlucas / encryption.ts
Last active March 9, 2025 19:43
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() {
@gdalgas
gdalgas / mathjax-editing.js
Last active February 28, 2025 14:33
StackExchange MathJax editing code
// The MIT License (MIT)
//
// Copyright (c) 2016 Stack Exchange
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@Arthraim
Arthraim / bottle_example.py
Created May 27, 2011 04:27
a python web framework bottle's example
#coding: utf-8
from bottle import route, error, post, get, run, static_file, abort, redirect, response, request, template
@route('/')
@route('/index.html')
def index():
return '<a href="/hello">Go to Hello World page</a>'
@route('/hello')
def hello():