Skip to content

Instantly share code, notes, and snippets.

@eugenf
eugenf / woocommerce-enable-free-shipping-per-product.php
Last active June 16, 2017 19:42 — forked from BFTrick/woocommerce-enable-free-shipping-per-product.php
Enable Free Shipping on a per product basis in WooCommerce.
<?php
/**
* Plugin Name: WooCommerce Enable Free Shipping on a Per Product Basis
* Plugin URI: https://gist.github.com/BFTrick/d4a21524a8f7b25ec296
* Description: Enable free shipping for certain products
* Author: Patrick Rauland
* Author URI: http://speakinginbytes.com/
* Version: 1.0.1
*
* This program is free software: you can redistribute it and/or modify
@eugenf
eugenf / get-fn-name.coffee
Last active February 21, 2016 23:56
get function name
# get class/function names helper
module.exports = (fn) ->
f = typeof fn == 'function'
s = f and (fn.name and [
''
fn.name
] or fn.toString().match(/function ([^\(]+)/))
!f and 'not a function' or s and s[1] or 'anonymous'
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@eugenf
eugenf / application.coffee
Last active August 26, 2015 04:55 — forked from caleywoods/application.coffee
Backbone JS / Fullcalendar
$ ->
Event = Backbone.Model.extend()
Events = Backbone.Collection.extend({
Model: Event,
url : 'events'
})
EventsView = Backbone.View.extend({
initialize: ->
@eugenf
eugenf / 0_reuse_code.js
Last active August 29, 2015 14:20
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
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@eugenf
eugenf / zsh.md
Last active August 29, 2015 14:16 — forked from tsabat/zsh.md

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@eugenf
eugenf / gist:3798552
Created September 28, 2012 08:01 — forked from brajeshwar/gist:1886227
Sublime Text 2 Shortcuts for Mac

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt