Skip to content

Instantly share code, notes, and snippets.

@makgithub
makgithub / .ftppass
Created March 31, 2017 12:40
Grunt Sftp Deployment
{
"privateKeyCustom": {
"username": "root",
"keyLocation": "E:/credentials/keys/serverkey.ppk"
}
}
@makgithub
makgithub / GruntFile.js
Created March 31, 2017 12:42
Grunt Sftp deployment grunt file
module.exports = function(grunt) {
grunt.initConfig({
//server deployment
'sftp-deploy': {
build: {
auth: {
host: 'wwww.hostname.com',
port: 22,
@makgithub
makgithub / google-contacts
Created April 3, 2017 07:38
Get Google Contacts using javascript api
<html>
<head>
<title>Google Contacts</title>
</head>
<body>
Body .....
<div id="con"> </div>
@makgithub
makgithub / iframe.html
Last active April 5, 2017 10:05
Send Message from Main page to Iframe url. SecurityError: Blocked a frame with origin from accessing a cross-origin frame. Accessing a cross-origin frame.
<!DOCTYPE html>
<html>
<head>
<title>My Iframe</title>
</head>
<body>
<button>Button</button>
<div id="childdiv"> </div>
@makgithub
makgithub / index.html
Last active April 7, 2017 07:51
Fill template using jquery. Defining a HTML template to append using JQuery
<!DOCTYPE html>
<html>
<head>
<title>Modular Design Pattern</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>TODO write content
@makgithub
makgithub / composer.json
Created July 17, 2017 14:05
push the external changes to existing web pages
{
"autoload": {
"psr-0": {
"MyApp": "src"
}
},
"require": {
"cboden/ratchet": "0.3.*",
"react/zmq": "0.2.*|0.3.*"
}
@makgithub
makgithub / redis.php
Created July 18, 2017 13:43
Getting Started with Redis in PHP
<?php
//echo phpinfo();exit;
//Connecting to Redis server on localhost
$redis = new Redis();
$status=$redis->connect('XXX.XXXX.XXX.XXX', $portnumber);
echo "<pre>";
echo "Connection to server sucessfully";
//check whether server is running or not
echo "Server is running: ".$redis->ping();
@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>
@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.*"
}
}