Skip to content

Instantly share code, notes, and snippets.

View imqadeerkhan's full-sized avatar

Qadeer imqadeerkhan

View GitHub Profile
phortuin /
Last active June 16, 2024 09:36
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

odan /
Last active May 10, 2024 15:31
Generating UUID v4 in MySQL

Generating UUID v4 in MySQL

      # 1th and 2nd block are made of 6 random bytes
huzemin / laravel-encrypt.js
Created December 3, 2019 06:47
laravel Encrypt convert to CryptoJS in Javascript
import CryptoJS from "crypto-js";
const LaravelEncrypt = function (key) {
this.key = key;
LaravelEncrypt.prototype.decrypt = function (encryptStr) {
encryptStr = CryptoJS.enc.Base64.parse(encryptStr);
let encryptData = encryptStr.toString(CryptoJS.enc.Utf8);
encryptData = JSON.parse(encryptData);
eddmann / SecureSessionHandler.php
Created April 9, 2014 12:18
Secure session handler implementation.
class SecureSessionHandler extends SessionHandler {
protected $key, $name, $cookie;
public function __construct($key, $name = 'MY_SESSION', $cookie = [])
$this->key = $key;
$this->name = $name;