Skip to content

Instantly share code, notes, and snippets.

View bllohar's full-sized avatar

Bheru Lal Lohar bllohar

View GitHub Profile
@bllohar
bllohar / google-convert-inr-to-usd.php
Created March 21, 2018 06:59
Get INR converted to USD using google query and parsing + curl
function getUSD($amount){
$url = "https://www.google.com/search?q=usd+to+inr";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
$data = explode("1 US Dollar = ",$result);
$OneUSD = (float) substr($data[1],0,10);
@bllohar
bllohar / db.js
Created September 25, 2017 06:52
Nedb Encryption & Decryption
var Datastore = require('nedb')
const path = require('path')
var crypto = require('crypto');
var assert = require('assert');
var algorithm = 'aes256';
var key = 'password';
var db = {}