Skip to content

Instantly share code, notes, and snippets.

View TiagoHA's full-sized avatar
🎯
Focusing

Tiago Almeida TiagoHA

🎯
Focusing
View GitHub Profile
@TiagoHA
TiagoHA / ITCSS.md
Created March 14, 2024 13:52 — forked from aarongarciah/ITCSS.md
▽ Managing CSS Projects with ITCSS - Harry Roberts Talk
@TiagoHA
TiagoHA / semantic-commit-messages.md
Created January 18, 2024 13:02 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@TiagoHA
TiagoHA / difference.mjs
Created October 26, 2021 20:30
Deep difference objects
import { isObject, transform, isEqual } from 'lodash'
export function differenceObjects(object, base) {
function changes(_object, _base) {
return transform(_object, (result, value, key) => {
if (!isEqual(value, _base[key])) {
result[key] = isObject(value) && isObject(_base[key])
? changes(value, _base[key]) : value
}
})
@TiagoHA
TiagoHA / difference.js
Created October 26, 2021 20:29 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
/**
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {
@TiagoHA
TiagoHA / difference.js
Created October 26, 2021 20:29 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
/**
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {
@TiagoHA
TiagoHA / what-is-svelte.md
Created March 2, 2021 20:42 — forked from Rich-Harris/what-is-svelte.md
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@TiagoHA
TiagoHA / Breakpoints
Created November 11, 2020 18:52 — forked from janily/Breakpoints
Mobile-first CSS Media Queries Breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@TiagoHA
TiagoHA / react-typescript.md
Created September 5, 2020 03:25 — forked from juhaelee/react-typescript.md
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

@TiagoHA
TiagoHA / react-typescript.md
Created September 5, 2020 03:25 — forked from juhaelee/react-typescript.md
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

@TiagoHA
TiagoHA / App.tsx
Created November 27, 2019 18:10 — forked from croaky/App.tsx
Parcel + TypeScript + React
import * as React from 'react'
// routing, etc.
import { Reset } from '~/ui/shared/Reset'
export class App extends React.Component {
public render() {
return (
<div>
<title>Dashboard</title>