Skip to content

Instantly share code, notes, and snippets.

View jsakhil's full-sized avatar
🎯
Focusing

Js Akhil jsakhil

🎯
Focusing
View GitHub Profile
@jsakhil
jsakhil / pyrocms_breadcrumb.twig
Created January 27, 2020 06:46
PyroCMS Breadcrumb Template with Product Module
{% if page.slug != 'home' %}
<!-- BREADCRUMB -->
<div class="container-fluid breadcrump wap_{{ page.slug }}">
<div class="container">
<div class="row">
<div class="title_area text-center">
{% if page.title !='' %}
<h2>{{ page.title }}</h2>
{% elseif page.slug =='' and products.name !='' %}
@jsakhil
jsakhil / ie_only_sytles.css
Created January 17, 2020 13:43
Internet Explorer 10 & 11 and Microsoft Edge 12 Only styles
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
#myElement {
/* IE10+ CSS styles go here */
}
}
@supports (-ms-accelerator:true) {
#myElement {
/* IE Edge 12+ CSS styles goes here */
@jsakhil
jsakhil / gist:c05ab2113330e464d15bc09530775765
Created December 17, 2019 14:24 — forked from grandmanitou/gist:8863248
Place multiple markers with infowindow on Google Maps API v3, use external links to trigger click and center map on desired location.
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?language=fra&amp;sensor=false"></script>
<script type="text/javascript">
var map;
var Markers = {};
var infowindow;
var locations = [
[
'Samsung Store Madeleine',
'<strong>Samsung Store Madeleine</strong><p>5 Boulevard Malesherbes, 75008 Paris<br>10h – 20h</p>',
48.8701925,
@jsakhil
jsakhil / gmap.html
Created December 2, 2019 09:51
GOOGLE MAP WITH MULTIPLE MARKERS AND CUSTOM MARKER ICON
<!-- GOOGLE MAP -->
<script async="" defer="" type="text/javascript" src="https://maps.googleapis.com/maps/api/js?callback=initializeMap&key=<--KEY-->"></script>
<!-- GOOGLE MAP -->
<script type="text/javascript">
//INITIALIZE GOOGLE MAP WITH MULTIPLE MARKERS AND CUSTOM MARKER ICON.
var markers = [
['Bondi Beach', -33.890542, 151.274856],
['Coogee Beach', -33.923036, 151.259052],
@jsakhil
jsakhil / pyro.twig
Last active January 22, 2022 20:15
PyroCMS
// Setting Value
{{ setting_value('streams::field_slug', config_get('streams::distribution.field_slug')) }}
// Content View
{{ page.content.render | raw}}
// Content Exerpt View
{{ page.content | striptags | slice(0, 120) }}
// Multiple File View
@jsakhil
jsakhil / scrollto_div.js
Last active March 17, 2020 12:38
Scroll to Div on page load
/* Function URL ScrollTo*/
function scrollto_div(uid){
jQuery('html, body').animate({
scrollTop: jQuery(uid).offset().top
}, 800);
}
/* Function URL ScrollTo*/
@jsakhil
jsakhil / Online KMS Activator.cmd
Created August 10, 2019 09:48 — forked from bhandarisaurav/Online KMS Activator.cmd
Activate Windows & Office for 180 Days with online KMS Servers. This script does not install any files in your system and it clears all the leftovers including kms server name after the Activation. For Successful Activation, Internet Must be connected.
@echo off
::::::::::::::::::::::::::::
set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges
:: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed
If "%1"=="%params%" (echo Elevating UAC for Administrator Privileges failed&echo Right click on the script and select 'Run as administrator'&echo Press any key to exit...&pause>nul 2>&1&exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit
:GotPrivileges
::::::::::::::::::::::::::::
color 1F
@jsakhil
jsakhil / woo_commerce_usefull.php
Created June 29, 2019 06:10 — forked from vovadocent/woo_commerce_usefull.php
Woo Commerce Hooks and Tricks
<?php
////// Rename or remove order statuses //////
add_filter('wc_order_statuses', 'wc_renaming_order_status');
function wc_renaming_order_status($order_statuses) {
$order_statuses = array(
'wc-pending' => _x('Pending', 'Order status', 'woocommerce'),
'wc-processing' => _x('New Order', 'Order status', 'woocommerce'),
'wc-cancelled' => _x('Cancelled', 'Order status', 'woocommerce'),
'wc-completed' => _x('Approved', 'Order status', 'woocommerce'),
@jsakhil
jsakhil / pagination.js
Last active June 21, 2019 08:55
Full Width Pagination - An Auto expanding pagination with screen width - PyroCMS - ©Vishnu Soman US
var li_length = jQuery('ul.pagination li').length;
if(li_length == 13){
var li_item = jQuery('ul.pagination li:nth-child(9) a').attr('href');
var to_num_8 = jQuery('ul.pagination li:nth-child(11)').text();
$('<li><a href="'+li_item.replace("8", "9")+'">9</a></li>').insertAfter("ul.pagination li:nth-child(9)");
$('<li class="tenth"><a href="'+li_item.replace("8", "10")+'">10</a></li>').insertAfter("ul.pagination li:nth-child(10)");
var space = $('ul.pagination').parent().width() - $('ul.pagination').width();