Skip to content

Instantly share code, notes, and snippets.

View 0gust1's full-sized avatar
🔥

Augustin C. 0gust1

🔥
  • France
View GitHub Profile
@0gust1
0gust1 / Readme.md
Last active July 21, 2023 13:56
SvelteKit: how to import tailwindcss custom config to be used in JS/TS parts

How to import tailwindcss custom config in JS/TS parts of a SvelteKit app

If you use tailwind as a styling/design-system engine for your app, you may have defined custom colors, spacings or other custom "design tokens".

Sometimes you may need to access values of this custom config file in JS/TS files or in Svelte files (<script> part).

This is often the case if you do some advanced front-end rendering using canvas, svg, d3 or webGL, etc. Or if you want to perform calculations or interpolation on theses values.

TLDR;

  • Prerequisite: a working SvelteKit+tailwindcss project
@0gust1
0gust1 / README.md
Last active February 3, 2024 22:53
How to use SQLite+prisma+nodeJS app on Azure app service

How to use SQLite+prisma+nodeJS app on Azure app service

Context

You want to run an app on Azure appService linux (here a nodeJS app) with a simple SQLite database.

Your have read https://www.sqlite.org/whentouse.html and your app requirements are simple enough (no big concurrency, no horizontal scaling) to consider SQLite, and you don't need yet more sophisticated solutions like PostgreSQL.

You use a NodeJS based app with the Prisma ORM.

@0gust1
0gust1 / README.md
Last active June 27, 2024 21:52
Deploy SvelteKit on Azure App Service

Deploy a SvelteKit app (with server-side code) on Azure App service.

Here we want to deploy a SvelteKit app, which has server-side code or do Server-Side Rendering (SSR) (data endpoints, load function in components).

For a SvelteKit app which is a pure browser-only SPA or a static website, with no server-side code (as one generated with adapter-static): you don't need an Azure app service instance, an Azure storage blob container ($web) is all you need.

Note:
In theory, a Sveltekit app with a server-side should be deployable on the new "Azure Static Webapps" product, but we still need to have a dedicated adapter converting the server code to something compatible with Azure functions.

Manage your dependencies

@0gust1
0gust1 / svelte_style_properties.md
Last active November 14, 2019 01:43
Svelte and Design systems

Svelte team asked some feedback about this RFC : Passing CSS custom properties to components](https://github.com/sveltejs/rfcs/blob/style-properties/text/0000-style-properties.md)

I'm not a big design system user, so I would very much like to get feedback from people who are. Would this solve your problems? What have we missed?


Hello,

I won't give any implementation feedback here at the moment, but some context of our team usage and direction.

@0gust1
0gust1 / gist:e3db417a3fbdb4e52e46299392d7ee63
Last active September 12, 2023 07:17
Svelte at scale (2018-2019)

Feedbacks on Svelte at scale (2018 - 2019)

(from the trenches, for Xavier and Alexis)

Context :

  • ~8/10 front-end developers working on a "core" ecommerce solution, with various technical levels/experience
  • ~15 (more to come) front-end developers (from different countries) extending/overriding the "core" ecommerce solution, again with various technical level/experience
  • 2 back-end developers maintaining a React widget / microfrontend
  • 2 fullstack developers contributing occasionally.
  • those numbers will evolve as Svelte is spreading in my client's projects ;-)
@0gust1
0gust1 / index.md
Last active September 20, 2019 05:21
Minimal Svelte info

Minimal Svelte info for @nhoizey

context : https://twitter.com/nhoizey/status/1169577744650428417

Svelte vs VueJs

The next version of Vue will have some Svelte inspired improvements, it seems.
I don't know much more, beside some quickly viewed screenshots of new syntax (I didn't practised Vue since ~1 year)

Svelte really shines on code simplicity/lightness. Developping a component really feels like writing a small HTML fragment (beside the templating directives) Particularities : mostly 2 syntaxes twists,

@0gust1
0gust1 / WLS_2018.md
Last active October 16, 2018 21:43
We love Speed 2018 - Slides
@0gust1
0gust1 / gist:46d3b756fec67b490165b313abd8f841
Last active September 8, 2018 09:53
Writing tool / logging tool ideas

A personal logging / writing tool - a personal log, a text editor, a writing tool

Inspirations (philosophy and UX) :

  • Lu Devine Dinvega's (@neauoire) ecosystem and approach
  • Ulysses and Scrivener (for neat workflows and writing tools)
  • iA Writer and others distraction free text-editors

I want a tool which fit and support my mental model and workflows. Building it and experimenting is the best way (not the easiest ^^)

A publishing / hosting / synchronizing engine

@0gust1
0gust1 / .bashrc
Created July 24, 2018 12:56
Working behind a corporate proxy - snippet to copy/paste in your shell rc file (or profile)
setProxy(){
export all_proxy=socks://url.to.proxy:80
export http_proxy=http://url.to.proxy:80
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export ALL_PROXY=$all_proxy
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$http_proxy
export FTP_PROXY=$http_proxy
export no_proxy="localhost, 127.0.0.1, .internal.domain"
@0gust1
0gust1 / webpack_overview.svg
Last active February 10, 2018 16:38
a webpack/packer conceptual overview
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.