```mermaid
sequenceDiagram
participant dotcom
participant iframe
participant viewscreen
dotcom->>iframe: loads html w/ iframe url
iframe->>viewscreen: request template
viewscreen->>iframe: html & javascript
iframe->>dotcom: iframe ready
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
# syntax = docker/dockerfile:1 | |
# Adjust BUN_VERSION as desired | |
ARG BUN_VERSION=1.1.1 | |
FROM oven/bun:${BUN_VERSION}-slim as base | |
LABEL fly_launch_runtime="Next.js" | |
# Next.js app lives here | |
WORKDIR /app |
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 * as React from 'react'; | |
const useIsFirstRender = (): boolean => { | |
const isFirst = React.useRef(true); | |
if (isFirst.current) { | |
isFirst.current = false; | |
return true; | |
} else { |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
When using yarn, it will create a yarn.lock
lockfile which holds data on your used dependencies. This file also includes hard-typed versions, so should you update your dependencies, the yarn.lock
file is basically outdated and needs to be regenerated. While yarn does this automatically, Greenkeeper pull requests that update dependencies as of right now do not do this regeneration, which means you would have to do it manually.
This gist shows you a way how to automatise this step using a Travis CI script.
- You use Travis CI and have it build Pull Requests (default behaviour)
- You have a
yarn.lock
file in your repository for Travis CI to automatically install yarn (yarn will be added to their default images soon)
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
# lazyload nvm | |
# all props goes to http://broken-by.me/lazy-load-nvm/ | |
# grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/ | |
lazynvm() { | |
unset -f nvm node npm npx | |
export NVM_DIR=~/.nvm | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
if [ -f "$NVM_DIR/bash_completion" ]; then | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
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
# Tested on OSX Yosemite 10.10.4 | |
# there is also an updated version (work in progress) for El Capitan here https://gist.github.com/guycalledseven/31ffe35eca056838b06b | |
# XXX TODO | |
# should I disable com.google.Keystone.Agent ?? | |
# http://applehelpwriter.com/2014/07/13/how-to-remove-googles-secret-update-software-from-your-mac/ | |
# Stop DS_Store file creation on network connections | |
# restart Finder afterwards |
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
rm -f /Library/LaunchAgents/com.mcafee.menulet.plist | |
rm -f /Library/LaunchAgents/com.mcafee.reporter.plist | |
rm -f /Library/LaunchDaemons/com.mcafee.ssm.Eupdate.plist | |
rm -f /Library/LaunchDaemons/com.mcafee.ssm.ScanFactory.plist | |
rm -f /Library/LaunchDaemons/com.mcafee.virusscan.fmpd.plist | |
rm -rf /Library/Application\ Support/McAfee | |
rm -rf /usr/local/McAfee | |
shutdown -r now |
NewerOlder