Skip to content

Instantly share code, notes, and snippets.

Avatar

Dariusz Więckiewicz idarek

View GitHub Profile
View selective-woocommerce-square.php
<?php
/**
*
* Plugin Name: Selective WooCommerce Square
* Plugin URI: https://gist.github.com/idarek/324c6f693b34e1d365523113fce5a101
* Description: Load WooCommerce Square plugin only on /shop/ pages of WooCommerce. Remove from everything else. Put this file into (Must Use Plugins) wp-content/mu-plugins folder. Create mu-plugins if needed (ref. https://wordpress.org/support/article/must-use-plugins/). Based on https://lowgravity.pl/blog/quick-tip-how-to-disable-wp-plugin-on-certain-page/
* Author: Dariusz Więckiewicz
* Version: 1.0
* Author URI: https://dariusz.wieckiewicz.org/
*/
View linux_on_c100pa.md

Forked from kapilhp/linux_on_c100pa.md with my modifications as commentes on the main Gist.

An account of how to create a USB disk that will boot a Linux 4.19 kernel (based off Chrome OS' most recent working kernel) on an Asus C100PA with a Debian ("buster") root file system. This may also work on other veyron-* devices.

Setup USB Disk

In this first step we will create a Chrome OS GPT partition table on USB drive that looks like this:

      start        size    part  contents
@idarek
idarek / ccdl.command
Created Jun 5, 2020 — forked from ayyybe/ccdl.command
Adobe Offline Package Generator v0.1.2 (macOS only)
View ccdl.command
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@idarek
idarek / mwan-config.sh
Created Mar 21, 2020 — forked from braian87b/mwan-config.sh
/etc/config/mwan
View mwan-config.sh
# My documentation:
#
# Important: this works well on OpenWRT 15.05.1, on newer versions there was some breaking changes, for example, the wan ifaces have ipv6 capability and now are named with letters ("wan, wanb... , wanc" instead of "wan, wan2... wan3" so wanb6 means 2nd wan ipv6.): https://github.com/openwrt/packages/blob/master/net/mwan3/files/etc/config/mwan3
#
# We have Interfaces, Members, Policyes y Rules:
#
# Interfaces: Allows to identify the wan interface, we just need to have it enabled`
# the others parameters are only to track if the interface it is up or down.
#
# Members: Can be defined in some metric and weight, both values will be important ambos when used in policyes.
@idarek
idarek / mwan3-notes.md
Created Mar 21, 2020 — forked from braian87b/mwan3-notes.md
How to get MWAN3 Working Properly on OpenWRT / LEDE
View mwan3-notes.md

In experience to get a proper working multiple wan configuration using mwan3 starting from scratch you should:

Important: this works well on OpenWRT 15.05.1, on newer versions there was some breaking changes, for example, the wan ifaces have ipv6 capability and now are named with letters ("wan, wanb... , wanc" instead of "wan, wan2... wan3" so wanb6 means 2nd wan ipv6.): https://github.com/openwrt/packages/blob/master/net/mwan3/files/etc/config/mwan3

The official documentation seems to be very detailed and up to date, I recommend reading those first: https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3 but I recommend to give a look at my config file below, since my approach for policyes is very nice.

First of all: Activate conntrack, docs says that is important and neccesary to get MWAN3 work properly, and it is needed to reboot:

You can’t perform that action at this time.