Skip to content

Instantly share code, notes, and snippets.

@eaccmk
eaccmk / Base64__DE-CODING
Last active April 24, 2024 12:42
Base64 decoding using postman (Working in Postman v7.34.0 version)
const base64EncodedString = "YWJjZDEyMzQ=" ; // abcd1234
console.log("INPUT >> ",base64EncodedString," <<");
if(!base64EncodedString.length > 0) {
pm.test("FAIL ", () => {throw new Error(" 'base64EncodedString' can not be empty !!")});
}else{
try{
var wordArray = CryptoJS.enc.Base64.parse(base64EncodedString);
var decodedString = CryptoJS.enc.Utf8.stringify(wordArray);
console.log("OUTPUT >> ",decodedString," <<");
@stfeng2
stfeng2 / cloud_sql_flags.md
Last active January 8, 2024 06:47
Cloud SQL Flags Tuning

Important Notice

  • ❗ All flags and settings described here are subject to change without any notice.
  • Last update: September 2017

Introduction

This document describes a set of MySQL flags that have been tuned in Google Cloud SQL (Second Generation) to make the out-of-box experience better on Google Cloud. This is for your reference only, with the hope that some of the settings might also be useful outside the Google Cloud environment.

innodb_buffer_pool_size

@FlavaSava7
FlavaSava7 / countries_nationalities_arabic_english.sql
Last active April 9, 2024 14:57
SQL Countries & Nationalities List : English and Arabic
CREATE TABLE `countries` (
`country_code` varchar(2) NOT NULL default '',
`country_enName` varchar(100) NOT NULL default '',
`country_arName` varchar(100) NOT NULL default '',
`country_enNationality` varchar(100) NOT NULL default '',
`country_arNationality` varchar(100) NOT NULL default '',
PRIMARY KEY (`country_code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `countries`
@AmirHossein
AmirHossein / coordinatestoname.js
Last active December 25, 2023 11:15
Get City and Country name by coordinates via Google Maps api
// Demo: http://jsfiddle.net/xuyp8qb5/
// Note: You need Google Map API Key to run demo; bit.ly/2pBgToW
var latlng;
latlng = new google.maps.LatLng(40.730885, -73.997383); // New York, US
//latlng = new google.maps.LatLng(37.990849233935194, 23.738339349999933); // Athens, GR
//latlng = new google.maps.LatLng(48.8567, 2.3508); // Paris, FR
//latlng = new google.maps.LatLng(47.98247572667902, -102.49018710000001); // New Town, US
//latlng = new google.maps.LatLng(35.44448406385493, 50.99001635390618); // Parand, Tehran, IR
//latlng = new google.maps.LatLng(34.66431108560504, 50.89113940078118); // Saveh, Markazi, IR