Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Ihor Mukovoz themkvz

🎯
Focusing
View GitHub Profile
@themkvz
themkvz / hooks.php
Created Apr 21, 2022 — forked from ashokmhrj/hooks.php
WooCommerce mnicart qty update
View hooks.php
<?php
add_action('woocommerce_widget_shopping_cart_before_buttons','ask_woo_mini_cart_before_buttons' );
function ask_woo_mini_cart_before_buttons(){
wp_nonce_field( 'woocommerce-cart' );
?>
<div class="submit-button">
<input type="submit" class="button" name="update_cart" value="<?php esc_attr_e('Uppdatera varukorg', 'tidymerch'); ?>"/>
</div>
<?php
View save-homeland.sh
#!/usr/bin/env bash
available_providers=("uashield" "db1000n" "db1000n_adv" "php" "python")
usage() {
cat << EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-t] [-c] [-p] [--custom-cpu] [--custom-memory] provider_name
Available options:
View restore-wp.sh
#!/bin/bash
function usage {
echo "Usage:
$0 [wordpress_site] [backup_path] [name]
e.g.:
bash backup-wp.sh public_html backup name
wordpress_site - path to your WordPress si
@themkvz
themkvz / backup-wp.sh
Last active Mar 11, 2022
Usage: 1. chmod +x backup-wp.sh 2. ./backup-wp.sh public_html/ backup/ first OR curl -sL https://gist.github.com/themkvz/ec1c24f6f369d91a09bd2cde6977c8d9/raw/backup-wp.sh | bash -s public_html/ backup/ first
View backup-wp.sh
#!/bin/bash
function usage {
echo "Usage:
$0 [wordpress_site] [backup_path] [name]
e.g.:
bash backup-wp.sh public_html backup name
wordpress_site - path to your WordPress site for backup it (e.g. /home/admin/web/wordpress.com/public_html )
backup_path - destination for your backups (e.g. /home/admin/web/wordpress.com/backup
@themkvz
themkvz / box-shadow.css
Last active Sep 22, 2019
Fluent design shadow
View box-shadow.css
.box-shadow--dark {
color: rgb(255, 255, 255);
background-color: rgb(31, 31, 31);
box-shadow: rgba(0, 0, 0, 0.18) 0px 2px 4px, rgba(0, 0, 0, 0.15) 0px 0.5px 1px;
transition: all 0.333s ease-out 0s;
border-radius: 4px;
}
.box-shadow--dark:hover {
transform: translate3d(0px, -1px, 0px);
box-shadow: rgba(0, 0, 0, 0.66) 0px 19px 43px, rgba(0, 0, 0, 0.54) 0px 4px 11px;
@themkvz
themkvz / html.json
Last active May 18, 2019
VScode html comment snippet with divs, thx @akella for original sublime version. Dicomment html
View html.json
{
"di.comment": {
"prefix": "di",
"body": [
"<!-- begin $1 -->",
"<div class=\"$1\">",
" $2",
"</div>",
"<!-- end $1 -->",
],