Dear Vishi, this is my daily log for Jan 31, 2023.
I am absolutely dismayed on how Mustard managed to escape from his cage. He has been missing for 24 hours now. As the apartment was secured, it is unlikely that he has escaped into the outside world.
Update: After an extensive search, I finally found Mustard hiding in the closet of my roommate's room. I initially intended to slap him or scold him to say the least, but he looked tired and hungry so I decided to quietly let him back crawl back into his cage. Gave him carrots and coriander for food.
How to open files in vim which are staged in git
$ git diff --cached --name-only | xargs -o vim
I went to Sabor Latin Street Grill for lunch today. They offer a deal on Tuesdays, known as "Taco Tuesday", where tacos are sold at a reduced price. Authentic tacos are priced at $1.49 and I had four of them. They were filling.
Let's say you wish to retrieve a list of projects from a GET endpoint. The following code sample demonstrates how you can achieve this using the React JS library and Axios:
import axios from 'axios'
const [projectOptions, setProjectOptions] = useState([])
useEffect(() => {
axios.get("http://localhost:8080/projects")
.then(res => {
console.log(res);
setProjectOptions(res.data.map(item => ({value: item, text: item})))
})
}, [])
console.log(projectOptions);
In certain instances, Git pull requests may display commits that are already present in the target branch. A possible solution to this issue is as follows:
$ git fetch origin
$ git checkout feature-01
$ git rebase origin/master
$ git push --force-with-lease