Skip to content

Instantly share code, notes, and snippets.

View dipeshhkc's full-sized avatar
🏠
Working from home

Dipesh KC dipeshhkc

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