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 / full_width.css
Created February 8, 2018 11:31
Equally distributed full width list item.
ul.full_width {
width: 100%;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
@jsakhil
jsakhil / flexbox.css
Last active March 14, 2020 05:29 — forked from brettsnippets/flexbox.css
Flexbox "Cross Browser" Sample
.content {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
@jsakhil
jsakhil / truncate.css
Created June 19, 2019 05:37
-webkit-line-clamp property Multiline Truncate
p.multiline {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
@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();
@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 / 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 / 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 / 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 / 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],