Skip to content

Instantly share code, notes, and snippets.

View DevanB's full-sized avatar
👨‍💻
Cooking Up Some Code

Devan DevanB

👨‍💻
Cooking Up Some Code
View GitHub Profile
@DevanB
DevanB / NotFound.jsx
Created December 2, 2018 21:04
Multiple paragraph translating
<p>We're sorry - something's gone wrong.</p>
<p>
Our team has been notified, but click{' '}
<a onClick={() => console.log('hello')}>here</a> to fill out a report.
</p>

Pull file from a stash

git checkout stash [stash index] -- [filename]

Also interesting to know that when you do a git stash, git saves two commits: one for the state of the index, and one for the state of the working copy (which is a merge between the index and the original HEAD).

Created with 📕TILed

Pull file from a stash

git checkout stash [stash index] -- [filename]

Also interesting to know that when you do a git stash, git saves two commits: one for the state of the index, and one for the state of the working copy (which is a merge between the index and the original HEAD).

Created with 📕TILed

Debugging Cypress Tests

cy.visit('/')
 .get('something')
 .click()
 .then(subject => {
   debugger;
   return subject;
 })
...

Configured ESLint in VS Code using Yarn

If you are using yarn instead of npm set the setting "eslint.packageManager": "yarn".

You need to reopen VS Code afterwards.

Created with 📕TILed

Save stashes

Want to leave yourself a message with a stash?

git stash save message here

Want to pop or apply a stash? Use the zero-index based array position.

git stash apply 0

git stash pop 2

Save stashes

Want to leave yourself a message with a stash?

git stash save message here

Want to pop or apply a stash? Use the zero-index based array position.

git stash apply 0

git stash pop 2

Retry with git-cz

git-cz (commitzien) fails and you don't want to go through all of the prompts again?

Run git-cz --retry or if you have a npm script like yarn commit, run yarn commit --retry.

Created with 📕TILed

@DevanB
DevanB / Instructions.md
Last active January 30, 2018 02:40
Setup

Install Homebrew

  1. Open Terminal.app
  2. Execute /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Node (through NVM)

  1. In Terminal.app execute touch ~/.bash_profile
  2. Execute curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
  3. After it has completed installing, restart Terminal.app
  4. Execute nvm, if you a bunch of text about node version manager then...
  5. Execute nvm install node
@DevanB
DevanB / stores.json
Created January 23, 2018 19:20
Data Import
"stores": [
{
"title": "Wal-Mart",
"address": "123 Main Street",
"city": "Houston",
"state": "TX",
},
{
"title": "Walgreens",
},