This file contains hidden or 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 React from 'react' | |
| import { renderToString } from 'react-dom/server' | |
| import express from 'express' | |
| import Homepage from './src/pages/home' | |
| const | |
| port = process.env.PORT || 3000, | |
| app = express() | |
| // ----------------------------------------------- |
This file contains hidden or 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 express from 'express' | |
| const | |
| port = process.env.PORT || 3000, | |
| app = express() | |
| // ----------------------------------------------- | |
| app.listen(port, () => console.log('Listening on port', port)) |
This file contains hidden or 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_action('rest_api_init', function() { | |
| register_rest_field(get_post_types(), 'fields', [ | |
| 'get_callback' => function($post) { | |
| return CFS()->get(); | |
| }, | |
| ]); | |
| }); |
This file contains hidden or 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
| {"lastUpload":"2020-09-25T00:11:19.988Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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
| const log = new Proxy({}, { | |
| get: (_, colour) => function() { | |
| console.log(`%c ${[].slice.call(arguments).join(' ')}`, `color: ${colour}`) | |
| } | |
| }) | |
| // example | |
| log.tomato('I am tomato') | |
| log.chocolate('I am chocolate') | |
| log.cornflowerblue('I am cornflowerblue') |
This file contains hidden or 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 eases from 'eases' | |
| const defaults = { | |
| start: 0, | |
| to: 0, | |
| speed: 650, | |
| easing: 'sineOut', | |
| onUpdate: () => {}, | |
| handleEnd: () => {}, | |
| handleStart: () => {} |
This file contains hidden or 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
| /** WARNING - USE AT OWN RISK */ | |
| /** IT IS AGAINST APPLE'S POLICY TO USE SF PRO FOR ANYTHING OTHER THAN iOS/tvOS/macOS/watchOS DESIGN & DEVELOPMENT */ | |
| /** https://sf.abarba.me/LICENSE.pdf */ | |
| /** 1. Copy/import this file into your main css/scss file */ | |
| /** 2. Change css font-family: to "SF Text", "SF Display" or "SF Mono" */ | |
| /** 3. Apply font-weight or italic to html elements */ | |
| /** THANK YOU */ | |
| /** I host these fonts on Cloudfront with SSL in all AWS regions for the best performance and reliability */ |
This file contains hidden or 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
| // Pretend this is in a store somewhere. | |
| const pageData = { | |
| title: 'My Data', | |
| copy: 'Lorem ipsum dolar sit amet', | |
| fields: { | |
| testimonial: { | |
| name: 'Bob Ross', | |
| copy: 'Everything is amazing' | |
| }, | |
| rating: 5 |
This file contains hidden or 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
| root = true | |
| [*] | |
| end_of_line = lf | |
| insert_final_newline = true | |
| trim_trailing_whitespace = true | |
| charset = utf-8 | |
| indent_style = space | |
| indent_size = 2 |
This file contains hidden or 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
| // @flow | |
| export const renders: Array<Function> = [] | |
| let animId: AnimationFrameID | |
| export default ((): void => { | |
| if (typeof window === 'undefined') { | |
| return | |
| } | |
| const stop = () => window.cancelAnimationFrame(animId) |