Skip to content

Instantly share code, notes, and snippets.

@pixeltrix
pixeltrix / gist:1816615
Created February 13, 2012 12:40
Diff to add a per item calculation for the WooCommerce Table Rates Shipping plugin
diff --git a/public/wp-content/plugins/woocommerce-shipping-table-rate/shipping-table-rate.php b/public/wp-content/plugins/woocommerce-shipping-table-rate/shipping-table-rate.php
index 8a7e082..01f5e47 100644
--- a/public/wp-content/plugins/woocommerce-shipping-table-rate/shipping-table-rate.php
+++ b/public/wp-content/plugins/woocommerce-shipping-table-rate/shipping-table-rate.php
@@ -242,6 +242,7 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
<th class="country"><?php _e('Destination countries/states', 'wc_table_rate'); ?></th>
<th><?php _e('Postcode', 'wc_table_rate'); ?>&nbsp;<a class="tips" tip="<?php _e('(optional) Comma separated list of ZIPs/Postcodes. Accepts wildcards, e.g. P* will match a postcode of PE30.', 'wc_table_rate'); ?>">[?]</a></th>
<th><?php _e('Exclude Postcode', 'wc_table_rate'); ?>&nbsp;<a class="tips" tip="<?php _e('(optional) Comma separated list of ZIPs/Postcodes to EXCLUDE. Accepts wildcards, e
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@gr2m
gr2m / account_dreamcode.js
Last active May 7, 2022 08:22
Imagine the typical backend tasks for user authentication would exist right in the browser. How would the code look like? This is what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
// sign up
account.signUp('joe@example.com', 'secret');
// sign in
account.signIn('joe@example.com', 'secret');
// sign in via oauth
account.signInWith('twitter');
// sign out
@sskylar
sskylar / import-siteleaf.json
Last active December 18, 2015 18:10
Siteleaf import script. Imports a JSON dump of blog posts into a Siteleaf page. Requires the Siteleaf Gem (https://github.com/siteleaf/siteleaf-gem). Run in the command line using "ruby import-siteleaf.rb".
[{
"title":"Post 1",
"body":"Body goes here.",
"tags":["Tag 1", "Tag 2"],
"slug":"post-1",
"published_at":"2013-06-05T18:24:59-04:00"
}, {
"title":"Post 2",
"body":"Body goes here.",
"tags":["Tag 1", "Tag 2"],
@cjbell
cjbell / Gemfile
Created October 21, 2013 21:45
Sir Trevor Image Uploader (Rails + Carrierwave)
# Upload gems
gem "carrierwave"
gem "mini_magick", "~> 3.3"
gem "fog", "~> 1.3.1"
@treb0r
treb0r / gulpfile.js
Created March 20, 2015 14:29
http://Roots.io Sage Gulpfile and package.json modified for use with http://Patternlab.io
// ## Globals
/*global $:true*/
var $ = require('gulp-load-plugins')();
var argv = require('yargs').argv;
var browserSync = require('browser-sync');
var gulp = require('gulp');
var lazypipe = require('lazypipe');
var merge = require('merge-stream');
var shell = require('gulp-shell');
var runSequence = require('run-sequence');
@bvaughn
bvaughn / index.md
Last active April 3, 2024 07:41
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@agyild
agyild / FSR.glsl
Last active July 7, 2024 16:02
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in