Skip to content

Instantly share code, notes, and snippets.

View arobbins's full-sized avatar
🦾
Building ShopWP

Andrew Robbins arobbins

🦾
Building ShopWP
View GitHub Profile
@arobbins
arobbins / wps-custom-order-data-js.js
Last active January 23, 2018 17:40
Custom order data example - AJAX sender
/*
Step 1. Add an AJAX POST request to the add to cart click event.
Resolves through the then() method once the data has been saved. You'll need to
write some jQuery to fill in the "dynamicValues" object according to your own markup
*/
jQuery('.wps-add-to-cart').on('click', function(e) {
@super3
super3 / payout.MD
Last active September 8, 2020 01:48
Storj Bridge Payout Formula

Payout Formula

paymentModelFunction = function(gbHours, telemReports, downloadedBytes) {
 gbHoursScaled =  (gbHours - mean(gbHours)) / sd(gbHours)
 telemReportsScaled =  (telemReports - mean(telemReports)) / sd(telemReports)
 downloadedBytesScaled = (downloadedBytes - mean(downloadedBytes)) / sd(downloadedBytes)
 
 basePayout = 10
 ghHourPayout = 12.2221 * gbHoursScaled
 telemReportsPayout = 0.1452 * telemReportsScaled
@Lewiscowles1986
Lewiscowles1986 / lc-svg-upload.php
Last active August 4, 2016 13:45
SVG Media Plugin for WordPress (Works since 4.1.2!)
<?php
// Please see https://github.com/Lewiscowles1986/WordPressSVGPlugin from now on
@roachhd
roachhd / README.md
Last active March 21, 2024 17:21
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@rxaviers
rxaviers / gist:7360908
Last active March 28, 2024 13:53
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@dciccale
dciccale / README.md
Last active October 22, 2021 21:52
Tiny Cross-browser DOM ready function in 111 bytes of JavaScript

DOM Ready

Tiny Cross-browser DOM ready function in 111 bytes of JavaScript.