Skip to content

Instantly share code, notes, and snippets.

View jainnidhi's full-sized avatar

Nidhi Jain jainnidhi

View GitHub Profile
@jainnidhi
jainnidhi / curl-error-local-site.txt
Created September 10, 2018 07:02
cURL error when accessing SSL Local Site (Local by flywheel)
Open Local by Flywheel
Right-click on the site and go to “Open Site SSH”
Enter /sbin/ip route|awk '/default/ { print $3 }' and copy the IP
Type nano /etc/hosts and add a new line at the bottom for the site you’re trying to access. It should look something like 172.17.0.1 test-1.dev. Use the IP from above.
Test the connection. Please note that the certificate is still self-signed so you’ll need to put it into insecure mode.
@jainnidhi
jainnidhi / smooth-scroll-menu.txt
Created August 24, 2018 05:41
Smooth scroll on menu click JS
$('.menu nav > ul > li > a').click(function (e) {
var linkHref = $(this).attr("href");
var idElement = linkHref.substr(linkHref.indexOf("#"));
$('html, body').animate({
scrollTop: $(idElement).offset().top
}, 1000);
return false;
});
@jainnidhi
jainnidhi / gist:c4ac8b6e2ec22ac102b210ec8255cd50
Created August 16, 2018 09:14 — forked from joshuafredrickson/gist:5439897
WordPress - Genesis: Custom "read more" link in excerpts
// Custom read more link
add_filter( 'excerpt_more', 'op_read_more_link' );
add_filter( 'get_the_content_more_link', 'op_read_more_link' );
add_filter( 'the_content_more_link', 'op_read_more_link' );
function op_read_more_link() {
return '... <a class="more-link" href="' . get_permalink() . '" rel="nofollow">Continue Reading &raquo;</a>';
}
@jainnidhi
jainnidhi / beaver-button-styles.txt
Created February 16, 2017 12:09
Beaver Button Styles
.bb-custom-button-1 {
letter-spacing: 2px;
}
.bb-custom-button-1 a.fl-button {
border-width: 3px !important;
}
.bb-custom-button-1 a.fl-button:hover {
background-color: transparent !important;
@jainnidhi
jainnidhi / beaver-button-style30.txt
Created February 16, 2017 12:05
Beaver Button Style 30
.bb-custom-button-30 {
letter-spacing: 2px;
}
.bb-custom-button-30 a.fl-button {
border-width: 3px !important;
border-color: transparent !important;
padding-left: 0 !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
@jainnidhi
jainnidhi / beaver-button-style29.txt
Created February 16, 2017 12:05
Beaver Button Style 29
.bb-custom-button-29 {
letter-spacing: 2px;
}
.bb-custom-button-29 a.fl-button {
background: rgb(255,146,1) !important; /* Old browsers */
background: -moz-linear-gradient(left, rgba(255,146,1,1) 0%, rgba(255,146,1,1) 29%, rgba(255,121,18,1) 53%, rgba(255,121,18,1) 100%) !important; /* FF3.6-15 */
background: -webkit-linear-gradient(left, rgba(255,146,1,1) 0%,rgba(255,146,1,1) 29%,rgba(255,121,18,1) 53%,rgba(255,121,18,1) 100%) !important; /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, rgba(255,146,1,1) 0%,rgba(255,146,1,1) 29%,rgba(255,121,18,1) 53%,rgba(255,121,18,1) 100%) !important; /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9201', endColorstr='#ff7912',GradientType=1 ) !important;
@jainnidhi
jainnidhi / beaver-button-style28.txt
Created February 16, 2017 12:04
Beaver Button Style 28
.bb-custom-button-28 {
letter-spacing: 2px;
}
.bb-custom-button-28 a.fl-button {
border-width: 0 !important;
border-color: #b5c403 !important;
border-bottom-width: 3px !important;
}
@jainnidhi
jainnidhi / beaver-button-style27.txt
Created February 16, 2017 12:04
Beaver Button Style 27
.bb-custom-button-27 {
letter-spacing: 2px;
}
.bb-custom-button-27 a.fl-button {
border-width: 0 !important;
box-shadow: 0px 1px 14px #848484;
}
.bb-custom-button-27 a.fl-button:hover {
@jainnidhi
jainnidhi / beaver-button-style26.txt
Created February 16, 2017 12:01
Beaver Button Style 26
.bb-custom-button-26 {
letter-spacing: 2px;
}
.bb-custom-button-26 a.fl-button {
border-width: 0 !important;
background: rgb(189,69,249) !important; /* Old browsers */
background: -moz-linear-gradient(top, rgba(189,69,249,1) 0%, rgba(192,68,250,1) 35%, rgba(100,84,219,1) 100%) !important; /* FF3.6-15 */
background: -webkit-linear-gradient(top, rgba(189,69,249,1) 0%,rgba(192,68,250,1) 35%,rgba(100,84,219,1) 100%) !important; /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, rgba(189,69,249,1) 0%,rgba(192,68,250,1) 35%,rgba(100,84,219,1) 100%) !important; /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
@jainnidhi
jainnidhi / beaver-button-style25.txt
Created February 16, 2017 12:01
Beaver Button Style 25
.bb-custom-button-25 {
letter-spacing: 2px;
}
.bb-custom-button-25 a.fl-button {
border-width: 0 !important;
background: rgb(82,214,227) !important; /* Old browsers */
background: -moz-linear-gradient(left, rgba(82,214,227,1) 0%, rgba(82,214,227,1) 43%, rgba(101,230,221,1) 71%, rgba(101,230,221,1) 100%) !important; /* FF3.6-15 */
background: -webkit-linear-gradient(left, rgba(82,214,227,1) 0%,rgba(82,214,227,1) 43%,rgba(101,230,221,1) 71%,rgba(101,230,221,1) 100%) !important; /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, rgba(82,214,227,1) 0%,rgba(82,214,227,1) 43%,rgba(101,230,221,1) 71%,rgba(101,230,221,1) 100%) !important; /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */