- Install xdebug for debian:
sudo apt-get install php-xdebug
- Open php.ini to edit
-
Location for php artisan serve or built in server:
/etc/php/8.1/cli
-
Location for apache:
/etc/php/8.1/apache2
[xdebug]
zend_extension=xdebug.so
-
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
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T git@github.com | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
To connect database with workbench create ports section (sample docker-compose.yml file: https://gist.github.com/manashcse11/75c97f5f5b4822e2925efa08a005fb67)
Stackoverflow: https://stackoverflow.com/a/51437525/1197239
Apply changes after any change in docker-compose.yml file
sudo docker-compose up -d
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
version: "2" | |
services: | |
app: | |
build: | |
args: | |
user: sammy | |
uid: 1000 | |
context: ./ | |
dockerfile: Dockerfile | |
image: laravel_docker |
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 React, { useContext } from 'react'; | |
import { UserContext } from '../UserContext'; | |
const UpdateContextData = () => { | |
const user = useContext(UserContext); | |
return ( | |
<div> | |
<h3>Update context data</h3> | |
<div className="form-group"> | |
<label>Name</label> |
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 React, { useContext } from 'react'; | |
import { UserContext } from '../UserContext'; | |
const ShowContextData = () => { | |
const user = useContext(UserContext); | |
return ( | |
<div> | |
<h3> | |
Showing from context | |
</h3> |
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 React, { useState } from 'react'; | |
import './App.css'; | |
import { connect } from 'react-redux'; | |
import { addUserData } from './redux/actions'; | |
const App = ({ user, addUserData }) => { | |
const [name, setName] = useState(user != null ? (user.hasOwnProperty('name') ? user.name : '') : ''); | |
const [profession, setProfession] = useState(user != null ? (user.hasOwnProperty('profession') ? user.profession : '') : ''); |
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 React from 'react'; | |
import ReactDOM from 'react-dom'; | |
/** Redux */ | |
import { Provider } from 'react-redux'; | |
import { persistor, store } from "./redux/store"; | |
import { PersistGate } from 'redux-persist/integration/react'; | |
/** End */ | |
import './index.css'; | |
import App from './App'; | |
import * as serviceWorker from './serviceWorker'; |
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 { combineReducers } from "redux"; | |
import User from "./user"; | |
export default combineReducers({ User }); |
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 {ADD_USER_DATA} from "../actionTypes"; | |
const initialState = { | |
user: null | |
}; | |
const User = (state = initialState, action) => { | |
switch (action.type) { | |
case ADD_USER_DATA: { | |
const { user } = action.payload; | |
return { |
NewerOlder