Skip to content

Instantly share code, notes, and snippets.

@manishtpatel
manishtpatel / main.go
Last active October 18, 2023 03:12
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)
@manishtpatel
manishtpatel / findandmodify_issue.js
Created April 19, 2012 19:16
findandmodify issue
var mongodb = require('mongodb'),
request = true;
var db = new mongodb.Db('test_db', new mongodb.Server("127.0.0.1", 27017, {
auto_reconnect: true
}), {});
// listen on error
db.on("error", function(err) {
console.log('open request ', request);