Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
| <?php | |
| /* | |
| * A walker class to use that extends wp_dropdown_categories and allows it to use the term's slug as a value rather than ID. | |
| * | |
| * See http://core.trac.wordpress.org/ticket/13258 | |
| * | |
| * Usage, as normal: | |
| * wp_dropdown_categories($args); | |
| * |
| <?php | |
| /* This snippet removes the action that inserts thumbnails to products in teh loop | |
| * and re-adds the function customized with our wrapper in it. | |
| * It applies to all archives with products. | |
| * | |
| * @original plugin: WooCommerce | |
| * @author of snippet: Brian Krogsard | |
| */ | |
| remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10); |
| sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES; | |
| sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled; | |
| // by the way, you need to logout and log back in for this to take effect. Or at least that's what | |
| // Quartz Debug says. Who knows, maybe it's lying? | |
| // P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging | |
| // back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from. |
Run using the excellent WebPageTest API wrapper for NodeJS by Marcel Duran, and $WPT_API_KEY as an environment variable.
webpagetest test example.com -k $WPT_API_KEY -l "Dulles_MotoG" -y "custom" -D 100 -U 100 -Y 200 -r "5" -vpt
-k key
-l location and device (Dulles being thinly place with a selection of mobile devices, at the time of writing)
| { | |
| "kind": "webfonts#webfontList", | |
| "items": [ | |
| { | |
| "kind": "webfonts#webfont", | |
| "family": "ABeeZee", | |
| "category": "sans-serif", | |
| "variants": [ | |
| "regular", | |
| "italic" |
| import { continueRender, delayRender, RemotionVideoProps } from 'remotion'; | |
| import { GlslVarType, setUniform } from './glUtils'; | |
| export interface VideoShaderOptions { | |
| variables?: { | |
| type: GlslVarType; | |
| name: string; | |
| }[]; | |
| } |
| import PropTypes from "prop-types"; | |
| import React from "react"; | |
| function Image({ src: ImageSrc, root, rootMargin, threshold, alt, ...props }) { | |
| const [src, setSrc] = React.useState(false); | |
| const imageRef = React.useRef(null); | |
| const callback = React.useCallback((entries) => { | |
| const [entry] = entries; | |
| if (entry.isIntersecting) { |
| World (Node3D) | |
| |- RTSController (Node3D) | |
| |- Elevation (Node3D) | |
| |- MainCamera (Camera3D) |