Skip to content

Instantly share code, notes, and snippets.

View tamarazuk's full-sized avatar
👩‍💻

Tamara Zuk tamarazuk

👩‍💻
View GitHub Profile
@tamarazuk
tamarazuk / 0_reuse_code.js
Created June 3, 2014 05:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tamarazuk
tamarazuk / python_resources.md
Created June 3, 2014 05:14 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@tamarazuk
tamarazuk / css_resources.md
Created June 3, 2014 05:14 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@tamarazuk
tamarazuk / woocommerce-customer-order-csv-export-add-line-item-meta.php
Last active August 29, 2015 14:04
woocommerce-customer-order-csv-export-add-line-item-meta.php
<?php
/**
* Add weight as line item meta in CSV export Default format
*/
function sv_add_weight_to_csv_export_line_item( $line_item, $item, $product, $order ) {
$line_item['weight'] = $product->get_weight();
return $line_item;
@tamarazuk
tamarazuk / mpc-pricing-table.css
Created July 28, 2014 14:55
Measurement Price Calculator Pricing Table Styling
.wc-measurement-price-calculator-pricing-table thead th {
text-align: center;
}
@tamarazuk
tamarazuk / wc_custom_order_fields_order_csv_export.php
Created August 10, 2014 06:03
WooCommerce Custom Order Fields - Add fields to Order CSV Export.
<?php
/**
* Modify the order export column headers to add Custom Order Fields
*
* @param array $column_headers column headers in column_key => column_name format
* @param \WC_Customer_Order_CSV_Export_Generator the generator instance
* @return array modified column headers
*/
function sv_csv_export_custom_order_fields_order_headers( $column_headers, $generator ) {
<?php
/**
* This adds the new unit to the WooCommerce admin
*/
function add_woocommerce_dimension_unit_league( $settings ) {
foreach ( $settings as &$setting ) {
if ( 'woocommerce_dimension_unit' == $setting['id'] ) {
@tamarazuk
tamarazuk / wc-gateway-mollie-reorder-gatweays.php
Last active August 29, 2015 14:10
WooCommerce Mollie Gateway - Reorder Mollie payment options
<?php
function wc_mollie_reorder_gateways( $gateways ) {
$gateway_order = array(
// Rearrange these payment options into the order you wish
'WC_Gateway_Mollie_iDEAL',
'WC_Gateway_Mollie_CreditCard',
'WC_Gateway_Mollie_MisterCash',
@tamarazuk
tamarazuk / wc-address-validation-smartystreets-badge-fix.php
Last active August 29, 2015 14:12
WooCommerce Address Validation SmartyStreets badge fix
<?php
function wc_address_validation_smartystreets_badge_fix() {
wc_enqueue_js( '
$( "body" ).on( "wc_address_validation_fields_mapped", function() {
$.each( [ "billing", "shipping" ], function( index, addressType ) {
var fields = $( "#" + addressType + "_address_1, #" + addressType + "_address_2, #" + addressType + "_city, #" + addressType + "_state, #" + addressType + "_postcode, #" + addressType + "_country" );
fields.on( "visibility", function() {
<?php
// change CSV delimiter to a semi-colon (;)
function wc_csv_export_modify_delimiter() {
return ';';
}
add_filter( 'wc_customer_order_csv_export_delimiter', 'wc_csv_export_modify_delimiter' );
// change CSV enclosure to a pipe (|)
function wc_csv_export_modify_enclosure() {
return '|';