Skip to content

Instantly share code, notes, and snippets.

@1844144
1844144 / create_entry.php
Last active May 30, 2023 14:09
Formidable Forms: Create Entry, Update metas for existing entry
<?
$arg = array(
'form_id' => $opts['subscription_form'],
'item_key' => FrmAppHelper::get_unique_key(
'', $pre . 'frm_items', 'item_key', 0 ),
'item_meta' => array(
$opts['subscription_id'] => $payment->response->getSubscriptionId(),
$opts['subscription_pre_payment_id'] => $payment->entry->id,
$opts['subscription_date'] => $metas[$opts['recur_date']],
$opts['subscription_amount'] => $metas[$opts['recur_amount']],
@dsdsdsdsdsds
dsdsdsdsdsds / cursor.css
Last active November 1, 2023 11:45
CSS: Cross Browser hires/retina cursor image
.cursor {
cursor: url("cursor.png") 0 0, pointer; /* Legacy */
cursor: url("cursor.svg") 0 0, pointer; /* FF */
cursor: -webkit-image-set(url("cursor.png") 1x, url("cursor@2x.png") 2x) 0 0, pointer; /* Webkit */
}
@tcrammond
tcrammond / target-metro.scss
Last active October 2, 2020 13:50
A sass mixin to write css that targets only IE 10 and IE 11
// Thanks http://philipnewcomer.net/2014/04/target-internet-explorer-10-11-css/
/*
Usage:
@include target-metro {
color: cyan;
}
*/
@mixin target-metro {
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
@wesbos
wesbos / gulpfile.js
Last active October 21, 2019 19:38
FAST Browserify + Reactify + Babelify
// Update: Hey Folks - I've got a full Gulpfile with everything else over at https://github.com/wesbos/React-For-Beginners-Starter-Files
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var babelify = require('babelify');
var watchify = require('watchify');
var notify = require('gulp-notify');
@djekl
djekl / video_details.php
Created June 21, 2013 15:50
Get Video Details from YouTube or Vimeo
<?php
$urls = array();
$videos = array();
// vimeo test
$urls[] = 'http://vimeo.com/6271487';
$urls[] = 'http://vimeo.com/68546202';
// youtube test
@mikejolley
mikejolley / gist:1604009
Created January 13, 2012 00:31
WooCommerce - Add a special field to the checkout, order emails and user/order meta
/**
* Add the field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>';
/**