Skip to content

Instantly share code, notes, and snippets.

@AnupRaj
AnupRaj / Genesis Code Snippet
Created October 21, 2012 05:33
How to remove sidebars from homepage correctly | Genesis child theme
/* add the following in functions.php file of child theme */
add_action( 'genesis_meta', 'remove_sidebar_from_home' );
/**
* Remove sidebar from homepage only
*
*
*/
function remove_sidebar_from_home() {
@AnupRaj
AnupRaj / Premium-Golden-Button.html
Last active October 12, 2020 09:27
Premium Button in Golden color
<!--
Button found somewhere (not sure where =D )
https://codepen.io/AnupRaj/pen/dyXoQNX
-->
<html><head><title>Premium Golden Button</title></head><body>
<style>
.mod {
text-align: center;
}
.t-margin {
<!DOCTYPE html>
<html>
<head><title>SOUND</title></head>
<body>
<div>Frequence: <span id="frequency"></span></div>
<script type="text/javascript">
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var oscillatorNode = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
Following .htaccess entry was not working
upon examining properly, following code is just fine.
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
<!-- Facebook -->
<a class="social-sharing-button__link" href="https://facebook.com/sharer/sharer.php?u=<?php echo urlencode(get_permalink()); ?>" target="_blank" aria-label="Share on Facebook">
<div class="social-sharing-button social-facebook social-large"><div aria-hidden="true" class="social-icon icon-solid">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.77 7.46H14.5v-1.9c0-.9.6-1.1 1-1.1h3V.5h-4.33C10.24.5 9.5 3.44 9.5 5.32v2.15h-3v4h3v12h5v-12h3.85l.42-4z"/></svg>
</div>Share on Facebook</div>
</a>
<!-- Twitter -->
<a class="social-sharing-button__link" href="https://twitter.com/intent/tweet/?text=<?php echo urlencode( get_the_title() ); ?>&amp;url=<?php echo urlencode(get_permalink()); ?>&amp;hashtags=" target="_blank" aria-label="Share on Twitter">
<div class="social-sharing-button social-twitter social-large"><div aria-hidden="true" class="social-icon icon-solid">
@AnupRaj
AnupRaj / woocommerce-order-received-custom-functions.php
Last active August 1, 2018 07:05
WooCommerce order-received page shows 404 error
// WooCommerce Order Received Page 404 fix
// the correct url of order-received page is https://example.com/checkout/order-received/ which should work
// if you will try to use different url like https://example.com/order-received/ then you will get 404
// You can have custom url / page / slug and use shortcode [my_order_id] [my_order_key] in the page
// add following function in your theme's functions.php file
@AnupRaj
AnupRaj / c program apply tax on salary
Created June 21, 2019 08:10
c program apply tax on salary
#include <stdio.h>
int main()
{
long int salary; //to store salary
long int newsalary; //to store temp salary
float tax; //to store tax
//char debug_msg[250]; // short msg
//input salary
printf("Enter yearly salary: ");
@AnupRaj
AnupRaj / Google Ranking Factors
Created February 18, 2020 05:58
More than 200 Google Ranking Factors
Domain Age
Keyword Appears in Top Level Domain
Keyword As First Word in Domain
Domain registration length
Keyword in Subdomain
Domain History
Exact Match Domain
Public vs. Private WhoIs
Penalized WhoIs Owner
Country TLD extension
@AnupRaj
AnupRaj / DNS-Prefetch.txt
Last active March 23, 2020 11:40
DNS Prefetch List
//wp.com
//c0.wp.com
//stats.wp.com
//static.xx.fbcdn.net
//connect.facebook.net
//www.facebook.com
//fonts.gstatic.com
//cse.google.com
@AnupRaj
AnupRaj / nozama-checkout-style.css
Last active September 13, 2021 21:53
Nozama CSS with Woocommerce One Page Checkout
.site-logo {
font-size: 28px;
}
.payment_box {
padding: 15px;
margin: 5px 0 0;
}
#wc-stripe-card-element {