Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
Busy ... Always busy

Mitchell Krog mitchellkrogza

🤓
Busy ... Always busy
View GitHub Profile
View gist:39cf02fecf8ca68dc42cd529806f2024
### Keybase proof
I hereby claim:
* I am mitchellkrogza on github.
* I am mitchellkrog (https://keybase.io/mitchellkrog) on keybase.
* I have a public key ASA1MsGmj-PFzfJI7htumKuWIAVDP6R8fDTXFwBeQqOMtwo
To claim this, I am signing this object:
@mitchellkrogza
mitchellkrogza / meta-tags.md
Created Jul 17, 2018 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
View _Example polkit rules_.md

These are only examples, for a few very common actions. You are expected to write your own rules for the rest. The syntax is regular JavaScript, but see the polkit(8) manpage for the object structure and available API. These examples are for polkit versions 106 and later, with the JS interpreter. They won't work with Debian's polkit v105.

  • If you don't know the action name, run pkaction:

    pkaction | grep cups
    
  • The possible results are YES, AUTH_SELF(_KEEP), AUTH_ADMIN(_KEEP), NO. Returning a result is final. Returning null will continue checking other rules.

  • Put your rules in /etc/polkit-1/rules.d/*.rules. (You can check everything in one giant addRule, or you can have a separate file and separate addRule for each program; it doesn't matter.)

@mitchellkrogza
mitchellkrogza / Cerbot Renewals with Mini(Conda) Python, Bash and Cron - Foolproof and Failproof Renewal Script
Last active Oct 1, 2019
Fool proof and fail proof Cerbot SSL certificate automated renewal script using a miniConda Python environment, bash and cron.
View Cerbot Renewals with Mini(Conda) Python, Bash and Cron - Foolproof and Failproof Renewal Script
#!/bin/bash
# -----------------------------------------------------------
# Mini(Conda) Environment for Failproof Certbot Renewals
# Created by Mitchell Krog: https://github.com/mitchellkrogza
# Copyright Mitchell Krog: https://github.com/mitchellkrogza
# GIST: https://gist.github.com/mitchellkrogza/547a850a34d022009e5d80e896684eac
# Last Updated: 2019-10-01 11:11:00 SAST
# -----------------------------------------------------------
# Save as certbot-renewals.sh
@mitchellkrogza
mitchellkrogza / fb_post_photo.sh
Created Sep 10, 2019 — forked from fishkingsin/fb_post_photo.sh
post photo with curl and facebook graph
View fb_post_photo.sh
curl 'https://graph.facebook.com/me/photos' -F 'access_token=access_token' -F 'source=@'$1 -F 'message='$(date +"%Y-%m-%d-%S")
View raspberry-pi-vpn-router.md

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

View keybase.md

Keybase proof

I hereby claim:

  • I am mitchellkrogza on github.
  • I am mitchellkrogza (https://keybase.io/mitchellkrogza) on keybase.
  • I have a public key ASDclc6D97oQyImXQ4qv4aNoymHIyJm0gdjEjor-plBm8go

To claim this, I am signing this object:

@mitchellkrogza
mitchellkrogza / woocommerce-update-prices.sql
Created Nov 2, 2020 — forked from yanknudtskov/woocommerce-update-prices.sql
Queries for updating all prices including variations in WooCommerceIn this instance all prices are subtracted 20% (0.8)#woocommerce #mysql
View woocommerce-update-prices.sql
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_regular_price' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_sale_price' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_price' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_regular_price_tmp' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_sale_price_tmp' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_price_tmp' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_min_variation_price' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_max_variation_price' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_min_variation_regular_price' AND meta_value != ''
UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHE
View Inline flatsome-shop.css (Flatsome Theme)
add_action('wp_head', 'inject_flatsomeshop', 5);
function inject_flatsomeshop() {
ob_start();
include 'wp-content/themes/flatsome/assets/css/flatsome-shop.css';
$atf_css = ob_get_clean();
if ($atf_css != "" ) {
echo '<style id="inline-css" type="text/css">'. $atf_css . '</style>';
}
}
View Inline ie-fallback.css (Flatsome Theme)
add_action('wp_head', 'inject_flatsomeiefallback', 5);
function inject_flatsomeiefallback() {
ob_start();
include 'wp-content/themes/flatsome/assets/css/ie-fallback.css';
$atf_css = ob_get_clean();
if ($atf_css != "" ) {
echo '<style id="inline-css" type="text/css">'. $atf_css . '</style>';
}
}