Skip to content

Instantly share code, notes, and snippets.

@d-corler
d-corler / plugin.toml
Created September 26, 2025 08:32
Oxlint >= 1.18.0 proto plugin
name = "oxlint"
type = "cli"
[resolve]
git-url = "https://github.com/oxc-project/oxc"
version-pattern = "^oxlint_v((?<major>[0-9]+)\\.(?<minor>[0-9]+)\\.(?<patch>[0-9]+))"
[platform.linux]
download-file = "oxlint-linux-{arch}-{libc}.tar.gz"
@d-corler
d-corler / airflow_operator.py
Created August 2, 2024 16:05
Airflow operator with mapped expand
SFTPToS3Operator.partial(
task_id="upload_to_s3",
s3_conn_id="AWS_CON_1",
s3_bucket="my_bucket"
).expand_kwargs(
other_task_ouputs.map(
lambda x: {
"sftp_conn_id": SFTPHook(
x["db_record"]["ftp_username"], x["db_record"]["ftp_password"]
),
@d-corler
d-corler / xstateWithAxiosCancelToken.ts
Last active December 13, 2022 20:59
XState with Axios CancelToken
import { assign, createMachine } from "xstate";
import axios from "axios";
import type { CancelTokenSource } from "axios";
interface GroupsContext {
groups?: any;
cancelTokenSource?: CancelTokenSource;
error?: Error;
}
@d-corler
d-corler / vue-webpack-env.js
Last active December 3, 2020 16:11
Add an environment variable with Webpack
chainWebpack: (config) => {
config.plugin("define").tap((args) => {
let _base = args[0]["process.env"];
args[0]["process.env"] = {
..._base,
MY_CUSTOM_VARIABLE: JSON.stringify(process.env.VARIABLE),
};
return args;
});
}