{ All snippets }

Tweetsnippet is a curated list of tips and tricks from Twitter.

Katie Hempenius

Katie Hempenius @katiehempenius

How to view your connection speed from DevTools: > window.navigator.connection - This is the "NetworkInformation API" - It returns bandwidth, latency, & connection type approximations👇 https://t.co/nlCTIWiaTH

Rasmus C Nielsen

Rasmus C Nielsen @rasmuscnielsen

🔥 When testing API validation responses in #laravelphp you may use the $this->postJson() method rather than $this->post(). This will ensure you get a JSON response rather than the application actually throwing an exception. https://t.co/pDIvSx9yi5

JavaScript Teacher

JavaScript Teacher @js_tut

Type in Chrome console: const obj = { } Then type: copy( obj ); Result: const obj = { } will be copied to clipboard. Paste it into your text editor. Works with any currently defined object. Makes debugging a lot easier – used it 1000+ times @ work.

David Thorpe

David Thorpe @davzie

I didn't know in @phpstorm you can hit shift twice to search ANYTHING and you can also add a "/" after a folder name and hit enter to be taken to that folder in the sidebar. I just leveled up.

Wes Bos

Wes Bos @wesbos

🔥 CSS variables can be set to other CSS variables. Also we will soon be able to tweak colours with colour functions in CSS directly. Good for Canadians who can never remember which way to spell grey https://t.co/oqn74uDF4g

CSS
Andrew Schmelyun

Andrew Schmelyun @aschmelyun

Today I learned about Laravel's replicate method, which returns a new instance of a model with the same attributes as the one you're replicating. You can then make changes to the properties of it before saving! https://t.co/oXRwqtgkfL

Andrew Schmelyun

Andrew Schmelyun @aschmelyun

This took me a while to realize, but in Vue every emitted value can be passed through to a method by using $event. That way, you can pass through both the emitted value and something like an ID 👇 https://t.co/1H1ZIvkotj