Or, yet more evidence that you should use feature detection instead of browser/user agent sniffing.
- Unprefixed CSS
transform
. Should require-ms-transform
but doesn’t require it.
[ | |
{ | |
"key": "group_5719a52cf2cb2", | |
"title": "Organisms", | |
"fields": [ | |
{ | |
"key": "field_5719a52e1711e", | |
"label": "Organism", | |
"name": "organism", | |
"type": "repeater", |
/* ============================================================================= | |
CSS Declarations | |
========================================================================== */ | |
/* ==|== The Standard Way =================================================== */ | |
.foo::before { | |
/* ...css rules... */ | |
} |
console.log(`%c ________________________________________ | |
< mooooooooooooooooooooooooooooooooooooo > | |
---------------------------------------- | |
\\ ^__^ | |
\\ (oo)\\_______ | |
(__)\\ )\\/\\ | |
||----w | | |
|| ||`, "font-family:monospace") |
<?php | |
/** | |
* Create ACF setting page under Events CPT menu | |
* | |
* @since 1.0.0 | |
*/ | |
if ( function_exists( 'acf_add_options_sub_page' ) ){ | |
acf_add_options_sub_page(array( | |
'title' => 'Event Settings', | |
'parent' => 'edit.php?post_type=events', |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
/* | |
A (very) WIP collection of optimized/recommended jQuery plugin patterns | |
from @addyosmani, @cowboy, @ajpiano and others. | |
Disclaimer: | |
----------------------- | |
Whilst the end-goal of this gist is to provide a list of recommended patterns, this | |
is still very much a work-in-progress. I am not advocating the use of anything here | |
until we've had sufficient time to tweak and weed out what the most useful patterns |
// See https://blog.isquaredsoftware.com/presentations/react-redux-ts-intro-2020-12/#/36 for slides | |
// My basic render function structure: | |
function RenderLogicExample({ | |
someBoolean, // 1) Destructure values from `props` object | |
someList, | |
}) { | |
// 2) Declare state values | |
const [a, setA] = useState(0); | |
const [b, setB] = useState(0); |
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
<?php | |
/** | |
* @package Custom_queries | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Custom queries | |
Plugin URI: http://wordpress.org/extend/plugins/# | |
Description: This is an example plugin | |
Author: Carlo Daniele |