Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Yogendra Kumar mssyogi

🎯
Focusing
Block or report user

Report or block mssyogi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mssyogi
mssyogi / image zoom used in magento2
Created Feb 27, 2018
image zoom used in magento2
View image zoom used in magento2
<!-- fotorama.css & fotorama.js. -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.css" rel="stylesheet"> <!-- 3 KB -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.4/fotorama.js"></script> <!-- 16 KB -->
<!-- 2. Add images to <div class="fotorama"></div>. -->
<div class="fotorama" data-allowfullscreen="true" data-fit="scaledown" data-nav="thumbs">
<img src="https://s.fotorama.io/1.jpg">
<img src="https://s.fotorama.io/2.jpg">
View gist:db8dd1202b3f80973900badb248b3c94
SELECT id, 111.045 * DEGREES(ACOS(COS(RADIANS(@lat))
* COS(RADIANS(lat))
* COS(RADIANS(lng) - RADIANS(@lng))
+ SIN(RADIANS(@lat))
* SIN(RADIANS(lat))))
AS distance_in_km
FROM airports
ORDER BY distance_in_km ASC
LIMIT 0,5;
View gist:0a1065d889beb8662a98740e976add4a
<script type="text/javascript">
$(document).ready(function(){
$('#hello-world').keyup(function(){
var ov = $(this).val();
if(ov){
if(ov.indexOf(",")!==-1){
// console.log(ov);
var nv='';
var tags = ov.split(",");
var i=-1;
View gist:75619f46e45952a659b1a724428a4d9c
<?php
$r = $_REQUEST['r'];
$root = getcwd();
if ($r == "flushcache") {
$cl = "php ". $root."/../n98-magerun2.phar cache:flush";
$results = shell_exec($cl);
echo $results;
}
@mssyogi
mssyogi / convert.php
Created Dec 20, 2017 — forked from nbriz/convert.php
convert image into base64 encoded string
View convert.php
<!DOCTYPE html>
<html>
<head>
<title> img to data</title>
<meta charset="utf-8">
<style>
textarea{ width: 50%; height: 200px; }
</style>
</head>
<body>
@mssyogi
mssyogi / MultiPartFromStrings.php
Created Nov 27, 2017 — forked from iansltx/MultiPartFromStrings.php
Multipart file uploads in PHP from strings
View MultiPartFromStrings.php
<?php
/**
* PHP's curl extension won't let you pass in strings as multipart file upload bodies; you
* have to direct it at an existing file (either with deprecated @ syntax or the CURLFile
* type). You can use php://temp to get around this for one file, but if you want to upload
* multiple files then you've got a bit more work.
*
* This function manually constructs the multipart request body from strings and injects it
* into the supplied curl handle, with no need to touch the file system.
@mssyogi
mssyogi / solrconfig.xml
Created Jun 2, 2016 — forked from arunchinnachamy/solrconfig.xml
Default SOLR Configuration file solrconfig.xml
View solrconfig.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@mssyogi
mssyogi / Narno_Mage_Extension.php
Created Mar 21, 2016 — forked from Narno/Narno_Mage_Extension.php
Get download link of a Magento extension from MagentoConnect key.
View Narno_Mage_Extension.php
<?php
/**
* Get download link of a Magento extension from MagentoConnect key
*
* Dependencies: Zend_Http_Client, Zend_Uri (Zend Framework)
*/
class Narno_Mage_Extension
{
protected $_key = null;
@mssyogi
mssyogi / gist:172c5d56064ca901e921
Created Nov 21, 2015 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
View gist:172c5d56064ca901e921
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@mssyogi
mssyogi / README.md
Created Oct 2, 2015 — forked from shancarter/README.md
A Simple HTML Slider With D3
View README.md

DESCRIPTION

A simple d3.js slider

You can’t perform that action at this time.