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
for f in *.png ; do | |
if [[ $(file -b --mime-type "$f") = image/jpeg ]] ; then | |
mv "$f" "${f/%.png/.jpeg}" | |
fi | |
done |
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
12_name.gif -> name.gif | |
for f in *.gif ; do | |
if [[ "$f" == *"_"* ]] ; then | |
mv -v "$f" "${f#*_}" | |
fi | |
done |
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
runtime: nodejs | |
env: flex | |
automatic_scaling: | |
cool_down_period_sec: 180 | |
cpu_utilization: | |
target_utilization: 0.9 | |
resources: | |
cpu: 2 | |
memory_gb: 6 | |
disk_size_gb: 30 |
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
export default function Home() { | |
return ( | |
<> | |
<img src="/happy.png" height="300" width="500" /> | |
<h2> We successfully deployed our Project 🎉 🎉 🎉 🎉 🎉</h2> | |
</> | |
) | |
} |
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
env: standard | |
runtime: nodejs14 | |
instance_class: F4 | |
service: team | |
inbound_services: | |
- warmup | |
automatic_scaling: | |
min_idle_instances: 1 | |
min_instances: 1 | |
handlers: |
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
{ | |
"name": "next-gae-deploy", | |
"version": "0.1.0", | |
"private": true, | |
"scripts": { | |
"dev": "next dev", | |
"build": "next build", | |
"start": "next start -p 8080" | |
}, | |
"dependencies": { |
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
.git | |
/pages | |
node_modules |
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
env: standard | |
runtime: nodejs14 | |
service: default | |
handlers: | |
- url: /.* | |
secure: always | |
script: auto |
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 { useEffect } from 'react'; | |
import { analytics } from '../utils/firebase'; | |
import { useRouter } from 'next/router'; | |
const MyApp = ({ Component, pageProps }) => { | |
const routers = useRouter(); | |
useEffect(() => { | |
if (process.env.NODE_ENV === 'production') { | |
const logEvent = (url) => { |
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 { useEffect } from 'react'; | |
import { analytics } from '../utils/firebase'; | |
const MyApp = ({ Component, pageProps }) => { | |
useEffect(() => { | |
if (process.env.NODE_ENV === 'production') { | |
analytics(); | |
} | |
}, []) |