Skip to content

Instantly share code, notes, and snippets.

##GeoViz
(Arun Ganesh)[https://en.wikipedia.org/wiki/User:Planemad]
(Sajjad Anwar)[https://geohacker.in/]
##OpenData
(Thejesh GN)[https://thejeshgn.com/]
##DataJournalism
(Avinash Celestine)[http://datastories.in]
// Intercepting HTTP calls with AngularJS.
angular.module('MyApp', [])
.config(function ($provide, $httpProvider) {
// Intercept http calls.
$provide.factory('MyHttpInterceptor', function ($q) {
return {
// On request success
request: function (config) {
// console.log(config); // Contains the data about the request before it is sent.
#This module does all the encryption and decryption using OpenSSL ruby class
module EncryptionEngine
#encrypt method as the name suggest encrypts 'data' using 'algorithm' with 'key'
def encrypt( data, key, algorithm)
#Do not encrypt if data is nil
if !data.nil? && !data.empty?
cipher = OpenSSL::Cipher::Cipher.new algorithm
cipher.encrypt