Skip to content

Instantly share code, notes, and snippets.

View edorgeville's full-sized avatar
:octocat:
🧲

Erwan d'Orgeville edorgeville

:octocat:
🧲
View GitHub Profile
@jniltinho
jniltinho / install-buildkit.sh
Last active April 14, 2024 14:49
Enable BuildKit Docker Ubuntu 22.04
#!/bin/bash
#
# https://docs.docker.com/build/buildkit/
# https://github.com/docker/buildx/releases/
# https://github.com/docker/buildx
mkdir -p $HOME/.docker/cli-plugins
wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64
chmod +x buildx-v0.11.2.linux-amd64
mv buildx-v0.11.2.linux-amd64 $HOME/.docker/cli-plugins/docker-buildx
@rokam
rokam / fix_fallguys.sh
Created March 30, 2022 03:21
Bash script to run the proton experimental fall guys fix
#!/bin/bash
STEAMAPPS_PATH=${1-~/.steam/steam/steamapps}
FALLGUYS_PATH=$STEAMAPPS_PATH/common/Fall\ Guys
if [ ! -d "$FALLGUYS_PATH" ]; then
echo Unable to find Fall Guys Path.
exit
fi
#Create symlink
ln -s "$FALLGUYS_PATH/EasyAntiCheat/easyanticheat_x64.so" "$FALLGUYS_PATH/FallGuys_client_game_Data/Plugins/x86_64/easyanticheat_x64.so"
@sindresorhus
sindresorhus / esm-package.md
Last active May 3, 2024 10:19
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@luna-koury
luna-koury / # Vuex 4 -> Vue3 & TS.md
Last active April 6, 2022 13:32
Vuex 4 - Boilerplate Typescript

Vuex 4 boilerplate using Vue3 and typed modules with TypeScript

With Modules

📦src
 ┣ 📂store
 ┃ ┣ 📂modules
 ┃ ┃ ┗ 📂generic_module
 ┃ ┃ ┃ ┣ 📜actions.ts
 ┃ ┃ ┃ ┣ 📜getters.ts
 ┃ ┃ ┃ ┣ 📜index.ts
@TheDruidsKeeper
TheDruidsKeeper / azure-pipelines-build-docker-with-cache.yml
Last active March 28, 2024 18:29
Azure DevOps pipeline with multi-stage docker image layer caching support
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
imageRepository: 'multi-stage-build-caching'
containerRegistry: 'ACR-Service-Connection-Name'
registryName: '[redacted].azurecr.io'
@mayneyao
mayneyao / notion2blog.js
Last active February 29, 2024 18:01
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
@bjuretko
bjuretko / traefik_ssl_tls.sh
Last active August 15, 2022 10:24
SSL/TLS certificates with traefik
#!/bin/bash
if [ -z "$1" ]
then
echo "Extract certificate and private key from pfx file for configuring TLS endpoints"
echo "Please provide pfx file as first argument"
exit 1
fi
read -p "Please enter import password: " PASS
@cecilemuller
cecilemuller / launch.json
Last active May 2, 2024 00:55
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@prasanthj
prasanthj / lirc-pi3.txt
Last active January 5, 2023 01:35
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
@edorgeville
edorgeville / setting-and-accessing-environment-variables-in-node-red.md
Last active October 18, 2017 16:40
Setting and accessing environment variables in node-red

Setting and accessing environment variables in node-red

Setting

  • echo "UUID=12345" > ~/env
  • sudo nano /lib/systemd/system/nodered.service
  • Add EnvironmentFile=/home/pi/env
  • sudo systemctl daemon-reload
  • sudo systemctl restart nodered

Accessing