I hereby claim:
- I am piotrkrzyzek on github.
- I am piotrkrzyzek (https://keybase.io/piotrkrzyzek) on keybase.
- I have a public key ASB7zLBnTFOy_LIzoa_nvvV0EbfLqpsUzujyxgW-65JKKQo
To claim this, I am signing this object:
| #! /usr/bin/python | |
| #Simple script for importing data from bitly to yourls using bitly and yourls API. | |
| import urllib2, json, urllib | |
| #Add the following data | |
| yourls_host = 'your-domain-where-yours-is-installed.com' | |
| bitly_token = 'your-bitly-token' | |
| yourls_signature = 'your-yourls-signature-key' |
| /** | |
| * Set the Slug attribute and add counter if not unique. | |
| * This function will check if the current model's slug is unique and update | |
| * if with a counter at the end of the slug (such as -2) if there already exists. | |
| * For example, if we're saving a page called "About us" with the slug | |
| * "about-us", but for some reason you already have a page with the slug | |
| * "about-us" this new page would then be set to have the slug | |
| * "about-us-2" instead. | |
| * | |
| * @param any $value This is the value passed to this setting function. |
| on adding folder items to this_folder after receiving added_items | |
| try | |
| repeat with nDec from 0 to 255 | |
| set nHex to do shell script "perl -e 'printf(\"FFFFFF%x\", " & nDec & ")'" | |
| do shell script "echo " & nHex & " > /tmp/ckbpipe001" | |
| delay 0.005 | |
| end repeat | |
| delay 0.1 | |
| repeat with nDec from 0 to 255 | |
| set nHex to do shell script "perl -e 'printf(\"FFFFFF%x\", " & 255 - nDec & ")'" |
| {% if first_time_accessed %} | |
| <script> | |
| fbq('track', 'Purchase', { | |
| contents: [ | |
| {% for line_item in line_items %} | |
| { | |
| 'id': '{{ line_item.sku }}', | |
| 'quantity': {{ line_item.quantity }}, | |
| 'item_price': {{ line_item.line_price | money_without_currency }} | |
| }, |
| <?php $filterreset = $_SERVER['REQUEST_URI']; | |
| if ( strpos($filterreset,'?filter_') !== false | strpos($filterreset,'?min_price') !== false | strpos($filterreset,'?max_price')) { | |
| $filterreset = strtok($filterreset, '?'); | |
| echo '<div class="clear-filters-container"><a id="woo-clear-filters" href="'.$filterreset.'">Clear All Filters</a></div>'; | |
| } |
| /** | |
| * Select Stripe as default payment gateway | |
| */ | |
| add_action( 'woocommerce_before_checkout_form', 'set_default_gateway' ); | |
| function set_default_gateway(){ | |
| // HERE define the default payment gateway ID | |
| $default_payment_gateway_id = 'stripe'; | |
| WC()->session->set('chosen_payment_method', $default_payment_gateway_id); | |
| } |
| /* | |
| * Pick and chose which payment icons you'd want to show on the checkout page | |
| * next to he payment gateways. The default in this function is to hide them all. | |
| * Primarily made for stripe | |
| */ | |
| add_filter( 'wc_stripe_payment_icons', 'show_hide_woocommerce_gateway_payment_icons' ); | |
| function show_hide_woocommerce_gateway_payment_icons( $icons ) { | |
| $icon_list = [ | |
| "visa", |
| @mixin optional-at-root($sel) { | |
| @at-root #{if(not &, $sel, selector-append(&, $sel))} { | |
| @content; | |
| } | |
| } | |
| @mixin placeholder { | |
| @include optional-at-root('::-webkit-input-placeholder') { | |
| @content; | |
| } |
| add_filter( 'woocommerce_min_password_strength', 'example_woocommerce_min_password_strength' ); | |
| /** | |
| * Callback for WooCommerce 'woocommerce_min_password_strength' filter. | |
| * | |
| * Reduce the strength requirement on the woocommerce password. | |
| * | |
| * 0 = Anything (not a good idea) | |
| * 1 = Weak | |
| * 2 = Medium | |
| * 3 = Strong (default) |
I hereby claim:
To claim this, I am signing this object: