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 / docker-compose.override-1.yml
Last active Aug 21, 2019
Switch to core local environment
View docker-compose.override-1.yml
# This was the docker-compose.override.yml file generated if it doesn't exist and `npm run env connect` command is executed.
version: '3.7'
services:
wordpress-develop:
volumes:
- 'D:\projects\everest-forms:/var/www/${LOCAL_DIR-src}/wp-content/plugins/everest-forms'
- 'D:\projects\everest-forms/packages/mu-plugins:/var/www/${LOCAL_DIR-src}/wp-content/mu-plugins'
- 'D:\projects\everest-forms/packages/everest-forms-zapier:/var/www/${LOCAL_DIR-src}/wp-content/everest-forms-zapier'
php:
volumes:
View commands.sh
docker system prune -f --volumes
docker container prune -f
docker container stop $(docker container ls -aq)
docker container rm $(docker container ls -aq)
docker image prune -f -a
docker volume prune -f
docker network prune -f
@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';
You can’t perform that action at this time.