This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Adapted from a buggy script original written by vgurudev at nikshepa dot com | |
// You can find the original script at: http://php.net/manual/en/function.number-format.php | |
function convertNumberToWordsForIndia($number){ | |
//A function to convert numbers into Indian readable words with Cores, Lakhs and Thousands. | |
$words = array( | |
'0'=> '' ,'1'=> 'one' ,'2'=> 'two' ,'3' => 'three','4' => 'four','5' => 'five', | |
'6' => 'six','7' => 'seven','8' => 'eight','9' => 'nine','10' => 'ten', | |
'11' => 'eleven','12' => 'twelve','13' => 'thirteen','14' => 'fouteen','15' => 'fifteen', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getAddr = function(lat, lng) { | |
console.log("getting addr "); | |
var latlng = new google.maps.LatLng(lat, lng); | |
var geocoder = geocoder = new google.maps.Geocoder(); | |
geocoder.geocode({ | |
'latLng': latlng | |
}, function(results, status) { | |
console.log("geocode result: ", results, " and status: ", status); | |
if (status == google.maps.GeocoderStatus.OK) { | |
if (results[0]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taken from this blog - http://tylerfrankenstein.com/code/how-git-rm-all-deleted-files-shown-git-status | |
git commit `git status | grep deleted | awk '{print $2}'` -m "removed unwanted files" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const router = express.Router(); | |
const multer = require('multer'); | |
const path = require('path'); | |
const debug = require('debug')('myNameSpace'); | |
const ALLOWED_IMAGE_TYPES = ['png', 'jpg', 'gif']; | |
const publicFilesDestination = path.join('public', 'static', 'uploads', '/'); | |
let fileStorage = multer.diskStorage({ |