This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.createResolvers = function({ actions,cache,createNodeId,createResolvers,store,reporter }) { | |
const { createNode } = actions; | |
createResolvers({ | |
HATCH_ContentMediaItemType: { | |
imageFile: { | |
type: `File`, | |
resolve(source, args, context, info) { | |
return createRemoteFileNode({ | |
url: source.filePath, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('wpseo_schema_website', 'example_change_website'); | |
function example_change_website($data) | |
{ | |
if ($data['potentialAction']) { | |
foreach ($data['potentialAction'] as $key => $value) { | |
# code... | |
if ($value['@type'] && $value['@type'] == 'SearchAction') { | |
unset($data['potentialAction'][$key]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { onError } from 'apollo-link-error'; | |
import { Observable } from 'apollo-link'; | |
import { buildAuthHeader } from 'utils/requests'; | |
import { getProvider as getGlobalProvider } from 'GlobalState'; | |
let isFetchingToken = false; | |
let tokenSubscribers = []; | |
function subscribeTokenRefresh(cb) { | |
tokenSubscribers.push(cb); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ProviderComposer({ contexts, children }) { | |
return contexts.reduceRight( | |
(kids, parent) => | |
React.cloneElement(parent, { | |
children: kids, | |
}), | |
children | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.3.0/workbox-sw.js'); | |
//{clientsClaim: true} | |
//console.log('this is my custom service worker'); | |
const revision = 'version-1'; | |
const longerRevision = 'static-1'; | |
//Config | |
workbox.setConfig({ | |
debug: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:4.9.4 | |
restart: always | |
volumes: | |
- ./wp-content:/var/www/html/wp-content | |
environment: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select [ngModel]="field ||''"> | |
<option value="">Select field</option> | |
<option *ngFor="let property of properties" [ngValue]="property">{{property.name}}</option> | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select formControlName="field"> | |
<option [ngValue]="null">Select field</option> | |
<option *ngFor="let property of properties" [ngValue]="property">{{property.name}}</option> | |
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getViewport(): any { | |
let win = window, | |
d = document, | |
e = d.documentElement, | |
g = d.getElementsByTagName('body')[0], | |
w = win.innerWidth || e.clientWidth || g.clientWidth, | |
h = win.innerHeight || e.clientHeight || g.clientHeight; | |
return {width: w, height: h}; | |
} |
NewerOlder