git exclude single file from staged
git restore --staged path/filename.tsx |
git restore --staged path/filename.tsx |
Ctrl+Shift+I, then Ctrl+Shift+P, inside “Run > type in “Capture full size screenshot”
npx tsc --noEmit |
GPT-4.1: Best for coding, reasoning, and creativity. Widely integrated and especially strong at code.
Claude Sonnet: Best for summarization, handling long documents, and safety. Handles big files and is privacy-focused
Gemini: Best for research and Google integration. Good with facts and works well within the Google ecosystem
React/Next.Js/Javascript page
const currency = €; const { t } = useTranslation(); <Trans t={t} i18nKey={'Path.To.Mykey'} components={{ customspantorender: <Customspan currency={currency} />, }} /> |
Customspan.tsx
import React from 'react'; const Customspan = ({ currency }) => { const amount = 15.99; return ( <span>{currency} {amount}</span> ); }; export default Customspan; |
sample.json
"Path": { "To": { "Mykey": "(Amount = <customspantorender>€€€</customspantorender>)" }, } |
301 – Permanently Move (Simple Redirect Post plugin does this)
302 – Temporarily Move
307 – Temporarily Redirect
Initial configuration:
Laravel 7.x folder: /var/www/laravel
Next.Js folder: /var/www/public_html
Step 1. Add your api response to laravel
Add to /var/www/routes/web.php
Route::get('/', [
'uses' => 'IndexController@categories',
]);
Add to /var/www/app/Http/Controllers/IndexController.php
public function index() {
return response()->json(['Hello world']);
}
Step 2. Add api/ folder to Next.Js public folder. Don’t touch existing Next.Js static html files
Move /var/www/laravel/public/index.php to /var/www/public_html/api
Then edit it, change the following:
require __DIR__.'/../vendor/autoload.php';
to
require __DIR__.'/../../laravel/vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
to
$app = require_once __DIR__.'/../../laravel/bootstrap/app.php';
Move /var/www/laravel/public/.htaccess to /var/www/public_html/api, no need to edit it
Finally
Try to access your domain.com/api. It should work
Source: https://support.apple.com/en-ie/guide/keychain-access/kyca1242/mac
'use client' import { createContext, useContext, useState } from 'react'; export const MyContext = createContext(); export function MyProvider({children}) { const [mymessage, setMymessage] = useState(""); return ( <MyContext.Provider value={{ mymessage, setMymessage }}> {children} </MyContext.Provider> ) } export function useMy() { const context = useContext(MyContext) if (!context) { throw new Error('useTheme must be used within ThemeProvider') } return context; } |
Usage:
components/Navbar.js
const { mymessage } = useMy(); console.info(mymessage); |
page.tsx
const { setMymessage } = useMy(); setMymessage('message fror Navbar'); |
PLA – Product Listing Ad – A commercing ad in Google, Bing to show individual product with images. On click it takes to PDP page with that ad
PPC – Pay per click – advertisers pay a fee each time a user clicks on their ad