From: http://thecodeplayer.com/walkthrough/css3-family-tree
A Pen by Emil Devantie Brockdorff on CodePen.
<?php | |
/** | |
* Plugin Name: WC Redirect to checkout | |
* Plugin URI: http://stackoverflow.com/q/32962653/383847 | |
* Description: Redirect to checkout for certain products | |
* Version: 1.0.1 | |
* Author: Kathy Darling | |
* Author URI: http://kathyisawesome.com | |
* Requires at least: 3.8 | |
* Tested up to: 3.9 |
<?php // do not copy this line | |
/** | |
* This function/filter will add ics files from bookings created with WooCommerce Bookings to | |
* the Processing and Completed emails sent from WooCommerce itself. | |
* @param arr $attachments Current array of attachments being filtered. | |
* @param str $email_id The id of the email being sent. | |
* @param obj $order The order for which the email is being sent. | |
* @return arr The filtered list of attachments. | |
*/ |
// see original doco here - https://github.com/AddressFinder/addressfinder-gravity-forms | |
// change field ids to suit your form fields.. | |
// this not processing the country field... | |
<script> | |
(function() { | |
var widget, initAddressFinder = function() { | |
widget = new AddressFinder.Widget( | |
document.getElementById('input_1_3_1'), | |
'YOUR_KEY', |
public static class ExceptionExtensions | |
{ | |
public static List<Exception> FlattenInnerExceptions(this Exception exception) | |
{ | |
return exception | |
.DepthFirstSearchInnerExceptions() | |
.Distinct() | |
.Reverse() | |
.ToList(); | |
} |
using Microsoft.EntityFrameworkCore.Infrastructure; | |
using Microsoft.EntityFrameworkCore.Migrations; | |
using Oqtane.Databases.Interfaces; | |
using Oqtane.Migrations.EntityBuilders; | |
using Oqtane.Repository; | |
using Oqtane.Shared; | |
namespace Oqtane.Migrations.Tenant | |
{ | |
[DbContext(typeof(TenantDBContext))] |
using Microsoft.EntityFrameworkCore.Infrastructure; | |
using Microsoft.EntityFrameworkCore.Migrations; | |
using Oqtane.Databases.Interfaces; | |
using Oqtane.Migrations.EntityBuilders; | |
using Oqtane.Repository; | |
using Oqtane.Shared; | |
namespace Oqtane.Migrations.Tenant | |
{ | |
[DbContext(typeof(TenantDBContext))] |
There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.
Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.
His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the
/* keep a reference to original toISOString to use it into new method */ | |
const oldToISOString = Date.prototype.toISOString | |
/* Define new method */ | |
const toISOString = function toISOString(date) { | |
if(!date) return date; | |
/* extract GTM timezone from date.toString() */ | |
const regex = /(?:GMT)([-+]\d*)/gm; | |
let gtm = regex.exec(date.toString())[1]; | |
gtm = [...gtm]; | |
/* insert ':' in time -0500 -> -05:00*/ |