Skip to content

Instantly share code, notes, and snippets.

View mjsarfatti's full-sized avatar
💭
is probably sleeping

Manuele J Sarfatti mjsarfatti

💭
is probably sleeping
View GitHub Profile
@mjsarfatti
mjsarfatti / settings.json
Last active November 21, 2024 12:44
VS Code italics any theme / Night Owl italics
{
// [...] other settings
// Copy this whole thing in your settings.json file ↓↓↓
"editor.tokenColorCustomizations": {
// NOTE: The asterisk targets all themes. If you want to target only specific ones
// you can use the following notation instead (example with three themes + wildcard):
// "[Atom One Dark][Default Dark+][*Monokai*]": {
"[*]": {
"textMateRules": [
{
@mjsarfatti
mjsarfatti / README.md
Created January 16, 2021 22:36
OG Image generator for Gatsby

0. Install packages

npm install --save-dev @babel/register @babel/plugin-proposal-class-properties

  • or -

yarn add --dev @babel/register @babel/plugin-proposal-class-properties

0.bis Also install

@mjsarfatti
mjsarfatti / withSyncChange.js
Created January 5, 2019 16:24
Async setState in React (and especially often when used w/ state management libs like 'unstated') can cause the caret in a form to jump
import React, { Component } from 'react';
export default function withSyncChange(WrappedComponent) {
return class extends Component {
constructor(props) {
super(props);
this.state = {
value: props.value, // initial value
parentValue: props.value, // tracking the parent value
};
# Initial setup
git clone -o laravel -b master https://github.com/laravel/laravel.git project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
composer install
# --or, simply--
composer create-project laravel/laravel
# Pulling changes