Skip to content

Instantly share code, notes, and snippets.

🚀
Focusing

Shiva Poudel shivapoudel

🚀
Focusing
Block or report user

Report or block shivapoudel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shivapoudel
shivapoudel / everest-forms-auto-updates.php
Created Jun 11, 2019
Auto-updates Everest Forms to the latest stable version.
View everest-forms-auto-updates.php
<?php
/**
* Plugin Name: Everest Forms - Auto Updates
* Plugin URI: https://github.com/wpeverest/everest-forms-auto-updates
* Description: Auto-updates Everest Forms to the latest stable version.
* Version: 1.0.0
* Author: WPEverest
* Author URI: https://wpeverest.com
* License: GPLv3 or later
*
@shivapoudel
shivapoudel / data.csv
Created May 15, 2019 — forked from psealock/data.csv
D3js and Polymer Web Components
View data.csv
id type amount
01 Restaurant 100
02 Entertainment 100
03 Rent 200
04 Groceries 250
View uglify.js
// Minify all .js files.
uglify: {
options: {
ie8: true,
parse: {
strict: false
},
output: {
comments: /@license|@preserve|^!/
}
@shivapoudel
shivapoudel / quotefancy.py
Last active Oct 5, 2018
Scraped wallpapers from Quotefancy.com
View quotefancy.py
import shutil
import os
import requests
from bs4 import BeautifulSoup
# URL handlers to scraped.
url_handles = [
'motivational-quotes',
'inspirational-entrepreneurship-quotes',
@shivapoudel
shivapoudel / functions.php
Created Apr 13, 2018
WooCommerce - Change order button text strings
View functions.php
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_filter( 'gettext', 'custom_order_button_strings', 20 );
/**
* Change order button text strings.
*
@shivapoudel
shivapoudel / functions.php
Created Apr 12, 2018
WooCommerce - Remove all filters for formatted order total
View functions.php
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_action( 'plugins_loaded', 'remove_wc_get_formatted_order_total_filters' );
/**
* Remove all filters for WC formatted order total.
*/
View log-data-on-success-N.txt
2018-04-10T10:44:54+00:00 INFO Generating payment form for order 1460. Notify URL: http://travhill.com/wc-api/WC_Gateway_HBL/
2018-04-10T10:44:54+00:00 INFO HBL Request Args for order 1460: Array
(
[paymentGatewayID] => 9103333191
[invoiceNo] => WC-1460
[productDesc] => Test Product
[amount] => 000000000100
[currencyCode] => 524
[userDefined1] => 1460
[userDefined2] => wc_order_5acc95a39d2f5
@shivapoudel
shivapoudel / index.php
Created Apr 8, 2018
HBL Gateway request data
View index.php
<?php
$total_amount = 200;
$padded_amount = str_pad( number_format( $total_amount, 2, '', '' ), 12, '0', STR_PAD_LEFT );
$invoiceNo = '00005';
$merchantID = '9103333191';
$currencyCode = '840'; // OR 524 for NPR :)
$signatureString = $merchantID . $invoiceNo . $padded_amount . $currencyCode . 'N';
@shivapoudel
shivapoudel / wc-email-preview.php
Created Feb 5, 2018
WooCommerce Email Preview.
View wc-email-preview.php
<?php
/**
* Plugin Name: WC Email Preview
* Plugin URI: https://gist.github.com/shivapoudel
* Description: Let's you preview WooCommerce emails templates.
* Version: 1.0.0
* Author: Shiva Poudel
* Author URI: http://shivapoudel.com
* License: GPLv3 or later
*/
@shivapoudel
shivapoudel / functions.php
Created Feb 3, 2018
WooCommerce - Prevent order view link being triggered on row click
View functions.php
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
if ( class_exists( 'WooCommerce' ) ) {
add_action( 'post_class', 'wc_order_post_class', 20, 3 );
}
/**
You can’t perform that action at this time.