This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def get_random_color(pastel_factor = 0.5): | |
return [(x+pastel_factor)/(1.0+pastel_factor) for x in [random.uniform(0,1.0) for i in [1,2,3]]] | |
def color_distance(c1,c2): | |
return sum([abs(x[0]-x[1]) for x in zip(c1,c2)]) | |
def generate_new_color(existing_colors,pastel_factor = 0.5): | |
max_distance = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# localimport-v1.7.3-blob-mcw79 | |
import base64 as b, types as t, zlib as z; m=t.ModuleType('localimport'); | |
m.__file__ = __file__; blob=b'\ | |
eJydWUuP20YSvutXEMiBpIfmeOLDAkJo7GaRAMEGORiLPUQrEBTVkumhSKK75Uhj5L+nHv2iSNpyf\ | |
BiTXY+uqq76qpoqy+qsP/SyLIv4t+a5rVT0vleiU1o0XfSDdM8dEf95PFVNm9f96V28KstPQqqm71\ | |
D4Kf9H/jZeNaehlzqq++Fqn49tv7PPvbJPw/PxrJvWvqqro2hZ1WJX1c924aUZDk0rVs0B2XK7adM\ | |
d+s2bbVF8v15Fe3GIGi1OKrmk8BpJoc+yiy45L6aOQy5xScspWiWWNbaN0olTe4de0klMqmz7umoT\ | |
dKarTiIbKv0B9aGMXSx6leN6Xu0U/u+4YatDLyNcK/E9gvOxCnBPR5hocBRQETVkiDrvRsozz4O6r\ | |
AP/lWexsi8/VxAY64lVgH9AWIqOvNDyyv63SHCWmPcR9yoSl1oMOvpf1Z7FT1L2MggdbRa5va1C1F\ | |
if5b6REcSi67Wl5EpXUqs/GtiFdkUejrv4VLXlEDqr4FiAnO2F0sVvfScyzjRFL+gHRAmJ4GmES2g\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products | |
* Plugin URI: https://gist.github.com/BFTrick/7873168 | |
* Description: Remove the billing address fields for free virtual orders | |
* Author: Patrick Rauland | |
* Author URI: http://patrickrauland.com/ | |
* Version: 2.0 | |
* | |
* This program is free software: you can redistribute it and/or modify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // only copy if needed | |
/** | |
* Removes coupon form, order notes, and several billing fields if the checkout doesn't require payment. | |
* | |
* Tutorial: http://skyver.ge/c | |
*/ | |
function sv_free_checkout_fields() { | |
// first, bail if the cart needs payment, we don't want to do anything |