Skip to content

Instantly share code, notes, and snippets.

View renatodeleao's full-sized avatar

Renato de Leão renatodeleao

View GitHub Profile
@swyxio
swyxio / 1.md
Last active February 8, 2024 22:30
Learn In Public - 7 opinions for your tech career

2019 update: this essay has been updated on my personal site, together with a followup on how to get started

2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos

@leevigraham
leevigraham / example.html
Last active October 18, 2018 11:24
Renderless Flyout.Vue component
<flyout v-cloak>
<div slot-scope="props">
<button
v-on:click="props.toggle()"
v-bind:class="'border-2 p-1 ' + (props.isActive ? 'bg-green': 'bg-red')"
data-reference
>…</button>
<div
v-show="props.isActive"
class="list-reset bg-white border p-4 shadow z-10"
@eirikb
eirikb / .sassrc.js
Created March 15, 2018 09:24
Demo of parcel + scss
const path = require('path');
const cwd = process.cwd();
module.exports = {
"includePaths": [
path.resolve(cwd, 'node_modules'),
path.resolve(cwd, 'src')
]
};
@eddiewebb
eddiewebb / readme.md
Last active February 12, 2024 08:46
Hugo JS Searching with Fuse.js
@calebporzio
calebporzio / SvgIcon.vue
Created February 19, 2018 19:08
SVG Icon Vue Component
<template>
<div class="inline-block" v-html="require('icon-' + this.icon + '.svg')"></div>
</template>
<style module>
.svg {
fill: currentColor;
height: 1em;
margin-top: -4px;
vertical-align: middle;
@sarahdayan
sarahdayan / modifiers.scss
Last active October 31, 2023 18:28
Sass Modifiers Mixin
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Sass modifiers mixin by Sarah Dayan
// Generate All Your Utility Classes with Sass Maps: frontstuff.io/generate-all-your-utility-classes-with-sass-maps
// http://frontstuff.io
// https://github.com/sarahdayan
(function () {
// An object with options for the IntersectionObserver.
const options = {
// 0.5 = The callback is fired when 50% of the element is visible
// We can add more values to the array, like 0.25, 0.75 or 1.0
threshold: [0.5]
};
// Instantiate the IntersectionObserver class
const observer = new IntersectionObserver((entries, observer) => {
@DawidMyslak
DawidMyslak / vue.md
Last active March 13, 2024 07:35
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modifying state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

@MariusRumpf
MariusRumpf / config.json
Last active November 23, 2021 02:35
Detect irregular whitespace in visual studio code with whitespace+ extension
// Whitespace+ irregular whitespace detection
// https://marketplace.visualstudio.com/items?itemName=davidhouchin.whitespace-plus
// Inspired by eslint https://github.com/eslint/eslint/blob/master/lib/rules/no-irregular-whitespace.js
{
"mode": "all",
"autoStart": true,
"refreshRate": 100,
"elements":
[{
"name": "space",