Skip to content

Instantly share code, notes, and snippets.

View jsakhil's full-sized avatar
🎯
Focusing

Js Akhil jsakhil

🎯
Focusing
View GitHub Profile
<?php
/**
* @license MIT
* @author Ruben Decleyn mukke@tbs-dev.co.uk>
* @created 12/02/2017
*/
namespace App\TwigExtensions;
@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 / 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 / carousel-indicators.js
Created September 28, 2017 05:34 — forked from dvsqz/carousel-indicators.js
Auto-generate Bootstrap Carousel Indicator HTML
@jsakhil
jsakhil / test_wp_mail.php
Last active March 14, 2020 05:32 — forked from butlerblog/test_wp_mail.php
File for testing the wp_mail function
<?php
/**
* This file can be used to validate that the WordPress wp_mail() function is working.
* To use, change the email address in $to below, save, and upload to your WP root.
* Then browse to the file in your browser.
*
* For full discussion and instructions, see the associated post here:
* http://b.utler.co/9L
*
* Author: Chad Butler
@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 / ie.js
Created March 19, 2020 09:55
IE Background Image Fix when scrolling
if(navigator.userAgent.match(/Trident\/7\./)) {
document.body.addEventListener("mousewheel", function() {
event.preventDefault();
var wd = event.wheelDelta;
var csp = window.pageYOffset;
window.scrollTo(0, csp - wd);
});
}
@jsakhil
jsakhil / .htaccess
Created April 2, 2020 11:48 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@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],