Skip to content

Instantly share code, notes, and snippets.

View gugadev's full-sized avatar
🌐
Web & Mobile

Gustavo García gugadev

🌐
Web & Mobile
View GitHub Profile
@gugadev
gugadev / macOS Internals.md
Created May 12, 2023 13:11 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@gugadev
gugadev / next.config.js
Created October 29, 2021 15:57 — forked from skolhustick/next.config.js
next-js-pwa-setup
const withPWA = require('next-pwa')
module.exports = withPWA({
pwa: {
dest: 'public'
}
})
@gugadev
gugadev / what-forces-layout.md
Created September 14, 2020 23:04 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@gugadev
gugadev / launch.json
Created February 2, 2020 14:43 — forked from cecilemuller/launch.json
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Node Inspector",
"type": "node",
"request": "launch",
"args": ["${workspaceRoot}/src/service.ts"],
"runtimeArgs": ["-r", "ts-node/register"],
"cwd": "${workspaceRoot}",
@gugadev
gugadev / ios-chrome-devtools.md
Created September 24, 2019 14:53 — forked from james2doyle/ios-chrome-devtools.md
Enable remote debugging on the iOS simulator using Chrome Dev Tools

Install the tools:

brew install ios-webkit-debug-proxy

Run the simulator. And choose an iOS 10 device. The chrome remote debugging doesn't work with iOS 11 yet.

Enable the inspector

@gugadev
gugadev / style.css
Created September 17, 2019 18:22 — forked from Kvaibhav01/style.css
CSS file for Material ripple effect without JS
.container {
background-color: #c1c1c1;
height: 500px;
display: flex;
justify-content: center;
align-items: center;
}
.btn {
background-color: orange;
@gugadev
gugadev / camelToKebab.js
Created September 8, 2019 01:36 — forked from nblackburn/camelToKebab.js
Convert a string from camel case to kebab case.
module.exports = (string) => {
return string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
};
# Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
# Register the Microsoft Ubuntu repository
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
# Update apt-get
sudo apt-get update
# Install PowerShell
@gugadev
gugadev / gist:3e7e4b608b83771165ded4e7743efa8b
Created October 19, 2017 19:06 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote