Skip to content

Instantly share code, notes, and snippets.

@emilstahl
emilstahl / functions.php
Last active August 29, 2015 14:15
Hide shipping rates when free shipping is available
add_filter( 'woocommerce_package_rates', 'hide_shipping_when_free_is_available', 10, 2 );
/* Hide shipping rates when free shipping is available */
function hide_shipping_when_free_is_available( $rates, $package ) {
// Only modify rates if free_shipping is present
if ( isset( $rates['free_shipping'] ) ) {
// To unset a single rate/method, do the following. This example unsets flat_rate shipping
unset( $rates['flat_rate'] );
}
return $rates;
Verifying that +emilstahl is my openname (Bitcoin username). https://onename.com/emilstahl
@emilstahl
emilstahl / jonas.sh
Created April 8, 2015 19:37
terminal ips
# IP addresses
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en0"
alias ips="ifconfig -a | grep -o 'inet6\? \(\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)\|[a-fA-F0-9:]\+\)' | sed -e 's/inet6* //'"
test
yolo
aay.dk
aew.dk
afe.dk
afq.dk
afw.dk
afx.dk
afy.dk
afz.dk
agq.dk
agz.dk
@emilstahl
emilstahl / available.txt
Created April 26, 2015 18:37
Available three letter .dk domains
aay.dk
aew.dk
afe.dk
afq.dk
afw.dk
afx.dk
afy.dk
afz.dk
agq.dk
agz.dk
_______________________________________________________________
__ _______ _____
\ \ / / __ \ / ____|
\ \ /\ / /| |__) | (___ ___ __ _ _ __
\ \/ \/ / | ___/ \___ \ / __|/ _` | '_ \
\ /\ / | | ____) | (__| (_| | | | |
\/ \/ |_| |_____/ \___|\__,_|_| |_|
WordPress Security Scanner by the WPScan Team
Version 2.7
@emilstahl
emilstahl / functions.php
Last active August 29, 2015 14:27
WooCommece cost price custom field
// Cost price
add_action('woocommerce_product_options_pricing', 'cost_price');
function cost_price() {
woocommerce_wp_text_input(
array(
'id' => '_cost_price',
'class' => 'wc_input_price short',
'label' => __('Cost price', 'woocommerce').' ('.get_woocommerce_currency_symbol().')',
'type' => 'text',
)
@emilstahl
emilstahl / dmarc.txt
Last active August 29, 2015 14:27
DMARC check on FDIM toplist
QUESTION IN TYPE ANSWER Virksomhed
_dmarc.dba.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:iq4jzkji@ag.dmarcian.com\; ruf=mailto:iq4jzkji@fr.dmarcian.com\;" eBay
_dmarc.jobindex.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc-reports@jobindex.dk" Jobinex
_dmarc.bilbasen.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:iq4jzkji@ag.dmarcian.com\; ruf=mailto:iq4jzkji@fr.dmarcian.com\;" eBay
_dmarc.newsbreak.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc@mailvision.dk\; ruf=mailto:forensic@mailvision.dk\; adkim=r\; aspf=r\; pct=100\; rf=afrf\; ri=86400\; sp=none" Uffe Dahl
_dmarc.amino.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc@amino.dk" AMINO ApS To ejere gŒr igen
_dmarc.min-mave.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc@min-mave.dk" MIN MAVE ApS sikkert samme IT
_dmarc.stepstone.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc-reports@stepstone.dk" Jobinex
_dmarc.it-jobbank.dk. IN TXT "v=DMARC1\; p=none\; rua=mailto:dmarc-reports@stepstone.dk" Jobinex
@emilstahl
emilstahl / config.fish
Last active August 29, 2015 14:27
Easy DMARC lookup
function dmarc
dig TXT +short _dmarc.$argv
end