Skip to content

Instantly share code, notes, and snippets.

@makgithub
makgithub / convertcsvtojsonjs
Created July 26, 2019 09:34
Convert CSV to JSON using java script
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" >
//Function for converting from CSV to JSON. This function is consider as a backend component for performing this task.
var csvjsonConverter = (csvdata, delimiter) => {
//This array will store the each of the patterns from the regular expression below.
let arrmatch = [];
//This array will store the data from the CSV.
@makgithub
makgithub / postList.html
Created May 29, 2018 14:24
Getting the Post List using backbone Js
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>Tag List</div>
@makgithub
makgithub / mssqlserver.php
Created October 6, 2017 07:50
PHP to Sql Server Db connection
<?php
$serverName = "*****.*****.****.**";//Host Name
$uid = "mtcdb";//User Name
$pwd = "******";//Password
$databaseName = "Mobile_Dev";//Database Name
$connectionInfo = array("UID" => $uid,
"PWD" => $pwd,
"Database" => $databaseName);
@makgithub
makgithub / oauthlinkedin.php
Created September 21, 2017 08:02
LinkedIn API client in PHP to get Access Token
<?php
error_reporting(-1);
echo " testing";
/**
*
*The below is the url to get the Authorization code using our LinkedIn App Details
*/
$url="https://www.linkedin.com/".
@makgithub
makgithub / convert.py
Created September 8, 2017 12:40
Excel to Xml file conversion using Python
from openpyxl import load_workbook
import datetime
import xml.etree.cElementTree as ET
wb = load_workbook(filename = 'Sku Assignment 8.24 Furniture Content.xlsx')
sheet = wb.get_sheet_by_name('Output Sheet')#sheet name
root = ET.Element("skuProducts")
@makgithub
makgithub / child.php
Created September 7, 2017 12:20
PHP popen function
<?php
/*
* This is the child process, it'll be launched
* from the parent process.
*/
/* Do some work */
echo "large process is running";
@makgithub
makgithub / test.py
Created September 1, 2017 12:00
Configure Apache web server for Python on Windows first python web script
#!/Python27/python.exe
print("Content-type: text/html")
print("")
print("<html><head>")
print("")
print("</head><body>")
print("Hello from Python27 .")
print("</body></html>")
@makgithub
makgithub / array.php
Created September 1, 2017 11:42
PHP Array insert, delete, view operation using php function
<?php
class arrayFunctions{
public $dialedCustomers;
function __construct($array) {
$this->dialerCustomersCount=$array;
}
@makgithub
makgithub / composer.json
Created August 4, 2017 13:01
Asterisk Call Originate Action Using Pami
{
"require": {
"marcelog/pami": "dev-master",
"educoder/pest": "1.0.0",
"react/zmq": "0.2.*|0.3.*"
}
}
@makgithub
makgithub / location.html
Created July 20, 2017 08:11
Get the Location details depends upon the user ip address
<!DOCTYPE html>
<html>
<head>
<title>Geo City Locator by geoip-db.com</title>
</head>
<body>
<div>Country: <span id="country"></span></div>
<div>State: <span id="state"></span></div>
<div>City: <span id="city"></span></div>
<div>Postal: <span id="postal"></span></div>