Skip to content

Instantly share code, notes, and snippets.

@adns44
adns44 / eco-server-order-on-ovhcloud-api.md
Last active November 6, 2024 23:57
Eco server order process with OVHcloud API step-by-step

OVH - How to use the API to order any server? The answer is here!

I ASK YOU IN FIRST

This process is automateable. I'll write the know-how, how to do it. I kindly ask you! Do NOT ABUSE it! Please keep the oportunity to order limited edition servers for other ones!

How the OVH API works?

First of all, OVH provides API libraries to access the API. And for this too, they have an API console where you can try it. For now, we'll see the API console. We'll place an older. Lets go!

@FbN
FbN / vite.config.js
Last active November 6, 2024 23:56
vite.config.js node built-in polyfills
// yarn add --dev @esbuild-plugins/node-globals-polyfill
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
// yarn add --dev @esbuild-plugins/node-modules-polyfill
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill'
// You don't need to add this to deps, it's included by @esbuild-plugins/node-modules-polyfill
import rollupNodePolyFill from 'rollup-plugin-node-polyfills'
export default {
resolve: {
alias: {
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active November 6, 2024 23:55
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@aolyang
aolyang / eslint.config.mjs
Last active November 6, 2024 23:42
config vue3 eslint use "eslint9.x flat config" feature
import { builtinModules } from "module"
import { fixupConfigRules } from "@eslint/compat"
import jsLint from "@eslint/js"
import stylistic from "@stylistic/eslint-plugin"
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js"
import pluginSimpleImportSort from "eslint-plugin-simple-import-sort"
import vueLint from "eslint-plugin-vue"
import globals from "globals"
import tsLint from "typescript-eslint"
@sorend
sorend / Update firwmware WD Black SN770 firmware on Arch Linux.md
Last active November 6, 2024 23:40
Update firmware WD Black SN770 firmware on Arch Linux

Update firmware WD Black SN770 firmware on Arch Linux

Been having problems with my new SN770 drive, and decided to check if I can firmware update it on Linux. WD only provides a Windows tool, Western Digital Dashboard to download and install firmwares, but, it's possible to find the firmware and install it using Linux tooling as well.

1. Check that nvme-cli is installed:

❱ sudo pacman -S nvme-cli
@natelandau
natelandau / .bash_profile
Last active November 6, 2024 23:39
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@rodrwan
rodrwan / binary-tree.js
Last active November 6, 2024 23:28
Implementación árbol binario en JavaScript
class Node {
constructor (value) {
this.value = value
this.right = null
this.left = null
}
}
class Tree {
constructor () {
@santaklouse
santaklouse / CrossOver.sh
Last active November 6, 2024 23:27
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@dmorosinotto
dmorosinotto / base.component.ts
Last active November 6, 2024 23:26
Angular BaseComponent with handle destroy$ and takeUntil pattern to unsubscribe!
import { Directive, OnDestroy } from "@angular/core";
import { Subject } from "rxjs";
import { takeUntil } from "rxjs/operators";
@Directive() // Needed only for Angular v9+ strict mode that enforce decorator to enable Component inheritance
export abstract class BaseComponent implements OnDestroy {
// _destroy$ is LAZY: it'll be created (and allocate memory) only if you use takeUntilDestroy
private _destroy$?: Subject<void>;
protected takeUntilDestroy = <T>() => {
if (!this._destroy$) this._destroy$ = new Subject<void>(); // LAZY Subject