Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

swyx sw-yx

🎯
Focusing
View GitHub Profile
View manual typography plugin since i got fed up with dark mode.md

this is what i use so far, its obviously not a 100% replica of the typography plugin but looks good enough on my site

  /* replace typography plugin */
  .prose {
    @apply text-gray-700 dark:text-gray-300
  }
  .prose {
    & p {
@sw-yx
sw-yx / Aprendiendoenpúblico.md
Created Nov 1, 2020
Aprendiendo en público - La forma más rápida de aprender. English: http://swyx.io/learn-in-public
View Aprendiendoenpúblico.md

Aprendiendo en público La forma más rápida de aprender

Si existiera una regla de oro sería esta, todas las demás reglas se derivan en mayor o menor medida de esta regla principal.

Está establecido que alguien nunca termina de aprender, sin embargo, la mayor parte de las personas “aprenden en privado” convirtiéndose en observadores pasivos. Consumen información sin generar ninguna. Mientras que este comportamiento no tiene nada de malo, aquí queremos llegar a estar entre el top de nuestra profesión y para conseguirlo es necesario tener el hábito de establecer sistemas para compartir nuestro aprendizaje:

• Crea blogs, tutoriales y cheat sheets.
• Realiza conferencias y meetups.
• Participa en foros como Stackoverflow o Reddit. Evita sitios privados como Slack o Discord.
@vedam
vedam / svelte-summit-2020-summary.md
Last active Feb 10, 2021
links and ressources from the svelte-summit-2020 talks
View svelte-summit-2020-summary.md

You'll find the talks here


Morgan Williams @mrgnw

The Zen of Svelte

Approaching frontend as a backend developer, Svelte feels surprisingly pythonic. Let's take a quick look at what's familiar, what's foreign, and how to explore the gap.

@sw-yx
sw-yx / elderjs-shortcode-motivation.md
Last active Oct 25, 2020
Custom shortcode syntax for Elder.js
View elderjs-shortcode-motivation.md

why you may need to customize shortcode syntax

  • elder.js self closing shortcodes look like this: {{foo bar="true"/}}. Note the / at the end is for Elder.js to parse both self closing and content wrapping shortcodes.
  • this clashes with other shortcode systems, eg. dev.to, which uses shortcodes that look like this: {% youtube abc123 %}
  • in elder.config.js you can customize the start and end shortcode: {%foo bar="true"/%}
  • however that / there is non negotiable.
  • this is why you need to customize the shortcode syntax

the strategy is, if you use remark to process the text, to write a custom remark plugin to replace specifically this %} ending code of the dev.to shortcode to what Elder.js expects

View Open letter to the Gatsby community.md

To the Gatsby Community,

We want to start by specifically thanking Nat Alison. We support her and commend her bravery in speaking out. It is not easy to stand alone. What she experienced at Gatsby was unacceptable and speaks to wider issues. We thank her for putting pressure on the company to fix them. We vow to double down on those efforts.

While we have worked hard to give feedback and help create a healthy work environment over the past few years, change has been far too slow and the consequences have been real. The previous weeks have intensified the need for rapid change by increasing employee communication and allowing us to collectively connect some dots. We are just as outraged. As a result, we have posed a series of hard questions to management as well as a list of concrete actions they need to take.

Kyle Mathews' public apologies to both Nat Alison and Kim Crayton are small actions swiftly taken that signal the possibility for change but don't speak to the systemic issues that must be addressed.

@sw-yx
sw-yx / types for estree with JSX.ts
Last active Aug 7, 2020
types for estree with JSX - the default estree types (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/estree/index.d.ts) dont come with JSX definitions so i made a short start on them. pls comment if you have more to add
View types for estree with JSX.ts
interface Location {
start: number;
end: number;
};
interface JSXOpeningElement extends Location {
type: 'JSXOpeningElement',
attributes: JSXAttribute[],
name: JSXIdentifier,
selfClosing: boolean
@mlent
mlent / social-sharing-buttons.html
Last active Jan 7, 2021
Social sharing buttons
View social-sharing-buttons.html
<ul>
<li>
<a href="https://twitter.com/share?text=TITLE OF YOUR POST via @YOUR_USERNAME&url=HTTPS://YOUR_WEBSITE.COM" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235'); return false;">
Share on Twitter
</a>
</li>
<li>
<a href="https://news.ycombinator.com/submitlink?u=HTTP://YOUR_URL.COM&t=YOUR CONTENT" onclick="window.open(this.href, 'hn-share', 'width=550,height=350'); return false;">
Share on Hacker News
</a>
@tlakomy
tlakomy / Production Ready Serverless notes.md
Last active Jul 27, 2020
Notes from Production Ready Serverless course with theburningmonk
View Production Ready Serverless notes.md

Week 01

Lambda 101:

  • You can pin frequently used services to top bar in AWS Console
  • By default there's a limit of 1000 concurrent lambda executions, this can be raised with a support ticket. There are companies that have this limit raised up to tens of thousands concurrent lambda executions.
  • By default you get 75GB of code storage (so up to 10 React apps, lol) which can also be raised
  • Looking at Throttles graph is useful, we don't want our functions to be throttled
  • ConcurrentExecutions graph is useful as well - to understand if we're not approaching a limit
  • You can search for lambda functions using function name (adding prefixed help!) or using tags, which are really useful
  • It's possible to use custom runtimes for Lambda (apart from Node,.NET, Python etc.) so if you really want to use Haskell you can do that
@sw-yx
sw-yx / readme.md
Last active Dec 18, 2020
svelte society day talks and resources -
View readme.md
@sw-yx
sw-yx / Tailwindcssunreset.scss
Last active Jan 13, 2021
Tailwind CSS Un-Reset - un-reset Tailwind's Preflight CSS Reset so that autogenerated HTML looks consistent with the rest of your Tailwind site. - https://www.swyx.io/writing/tailwind-unreset
View Tailwindcssunreset.scss
.unreset {
a {
@apply text-blue-700 underline;
}
p {
@apply my-4;
}
blockquote,
figure {