Skip to content

Instantly share code, notes, and snippets.

View accessomnath's full-sized avatar
🎯
Focusing

Somnath Mondal accessomnath

🎯
Focusing
View GitHub Profile
@accessomnath
accessomnath / getmap.js
Last active February 23, 2018 18:56
Road distance distance in two point in google maps
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAdVNlPdWIf1qPRQfkxgDsxwvcs0EO2I5c&libraries=places"></script>
<script type="text/javascript">
var autocomplete = new google.maps.places.Autocomplete($("#map")[0], {});
var autocompleteSecond = new google.maps.places.Autocomplete($("#map2")[0], {});
var autocompletethird = new google.maps.places.Autocomplete($("#map3")[0], {});
function initialize() {
google.maps.event.addListener(autocomplete, 'place_changed', function () {
fillInAddress();
@accessomnath
accessomnath / cpt extaintion
Created August 12, 2017 14:32
Adding two extra image field in cpt in wordpress
<?php
//init the meta box
add_action('after_setup_theme', 'custom_postimage_setup');
function custom_postimage_setup()
{
add_action('add_meta_boxes', 'custom_postimage_meta_box');
add_action('save_post', 'custom_postimage_meta_box_save');
}
<?php
/**
* Created by PhpStorm.
* User: SOMNATH
* Date: 30-03-2017
* Time: PM 12:56
* Template Name: Process
*/
global $post;
global $wpdb;
<?php
/**
* Created by PhpStorm.
* User: SOMNATH
* Date: 24-03-2017
* Time: PM 12:32
* Template Name: Login
*/
if($_POST) {
jQuery(document).ready(function (a) {
a("form#login1").on("submit", function (b) {
a("form#login1 p.status").show().text(ajax_login_object.loadingmessage), a.ajax({
type: "POST",
dataType: "json",
url: ajax_login_object.ajaxurl,
data: {
action: "ajaxlogin",
username: a("form#login1 #username").val(),
password: a("form#login1 #password").val(),
@accessomnath
accessomnath / Wordpress Theme extainsion
Created July 16, 2017 13:11
This file is create a extaintion for your wordpress theme option like option tree.
<?php
// create custom plugin settings menu
add_action('admin_menu', 'plugin_create_menu');
function plugin_create_menu()
{
//create new top-level menu
add_menu_page('Theme Setting', 'Theme Setting', 'administrator', __FILE__, 'theme_setting', 'dashicons-admin-settings');
<?php
/**
* Template Name: Login
* Created by PhpStorm.
* User: Somnath
* Date: 9/30/2016
* Time: 2:01 AM
*/
if($_POST) {
<?php
/**
* Template Name: Register
* Created by PhpStorm.
* User:Somnath
* Date: 9/29/2016
* Time: 9:59 PM
*/
get_header();
<?PHP
ini_set('max_execution_time', 3000000);
$myZip = file_get_contents("http://104.236.123.247/toptierhealthcare/top.zip");
echo file_put_contents('files.zip', $myZip);
?>