Skip to content

Instantly share code, notes, and snippets.

View titouancreach's full-sized avatar

Titouan CREACH titouancreach

  • Lorient, France
  • 05:47 (UTC +02:00)
View GitHub Profile
@nodkz
nodkz / .babelrc.js
Last active November 28, 2024 00:45
Babel 7.0 with .babelrc.js DEPRECATED! This config was created when babel 7 was in beta
/* eslint-disable prefer-template */
const path = require('path');
const aliases = require('./aliases');
// ///////////////////////////////////////////////////////////////
// ////////////////// PLUGINS ////////////////////////////////
// ///////////////////////////////////////////////////////////////
const commonPlugins = [
@sylvainleris
sylvainleris / MiddlewareES6.js
Last active July 25, 2024 19:36 — forked from darrenscerri/Middleware.js
A very minimal Javascript (ES5 & ES6) Middleware Pattern Implementation
class Middleware {
constructor() {
// Array prototype last
if (!Array.prototype.last) {
Array.prototype.last = function() {
return this[this.length - 1];
}
}
@busypeoples
busypeoples / UnderstandingReducer.re
Last active November 11, 2018 15:22
Understanding Reducer in ReasonML
let se = ReasonReact.stringToElement;
type state = int;
type actions =
| Inc
| IncWithSideEffect
| SideEffect
| DoNothing
| SilentIncUpdate
@gricard
gricard / webpack4upgrade.md
Last active April 20, 2025 23:06
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ [email protected]
@linguini1
linguini1 / fstring.lua
Last active September 6, 2023 12:35
Automatic f-string transformation for Neovim
-- Treesitter automatic Python format strings
vim.api.nvim_create_augroup("py-fstring", { clear = true })
vim.api.nvim_create_autocmd("InsertCharPre", {
pattern = { "*.py" },
group = "py-fstring",
--- @param opts AutoCmdCallbackOpts
--- @return nil
callback = function(opts)
-- Only run if f-string escape character is typed
if vim.v.char ~= "{" then return end
@nclsndr
nclsndr / cursor-rule-effect-ts
Last active July 11, 2025 13:40
EffectTS Code Style Guide for Cursor Rules
# EffectTS Code Style Guidelines
## Import Style
- Use named imports with curly braces: `import { Effect, Console, Duration } from "effect"`
- Import the `pipe` utility from the main "effect" package
- Import platform-specific modules from their respective packages: `import { NodeRuntime } from "@effect/platform-node"`
- Group related imports together (e.g., keep all Effect imports in one statement)
## Code Structure and Organization
- Prefer generator syntax using `Effect.gen` for sequential operations