Skip to content

Instantly share code, notes, and snippets.

View vdegenne's full-sized avatar

Valentin Degenne vdegenne

View GitHub Profile

Defining a channel


import { Channel } from 'channel-library'

export const channel = new Channel()


vdegenne /
Last active May 6, 2024 16:17
Install Chrome OS on a System

Install Chrome OS on a System (usb or dual boot)

  1. Make sure you have wget, curl, dpkg, tar, cgpt and pv installed on your system (use yay -S vboot-utils to install cgpt on arch).

  2. Download brunch

    1. Run bash (script from and select "2) Compatibility Check". Note the codename (e.g. Rammus) then download the latest brunch release (the archive is saved in Downloads directory !)

    2. If it didn't work, download the latest release from and save it in Downloads directory (no need to extract the archive).

vdegenne /
Last active May 14, 2022 07:40
Install PostgreSQL 12 on Red Hat distributions (tested on fedora 31)


First go on this page and complete the form and follow the instructions.

Both the client and the server should be installed

sudo dnf install -y postgresql12
sudo dnf install -y postgresql12-server
vdegenne / pm2logs
Last active January 15, 2020 15:54
Open the pm2 logs of the current project (current directory)
pm_id=$(node <<EOF
const pm2_processes = `pm2 jlist`;
const pm2_process = pm2_processes.filter(proc => proc.pm2_env.pm_cwd === "`pwd`");
if (pm2_process.length) {
// one process found
import resolve from 'rollup-plugin-node-resolve'
export default {
input: './our-app.js',
output: { file: './bundle.js', format: 'iife' },
plugins: [resolve()]
import { LitElement, html } from 'lit-element'
import '@material/mwc-dialog'
import '@material/mwc-button'
class OurApp extends LitElement {
render() {
return html`
<mwc-dialog title="Are you sure ?" open @closed=${this.onDialogClose}>
<div>are you sure to perform this action ?</div>
<mwc-button slot=secondaryAction dialogAction=no></mwc-button>
vdegenne / index.html
Last active September 27, 2019 16:54
entry point that the client will request
<!doctype html>
<title>our app</title>
<link href=",400,500" rel="stylesheet">
<script src=bundle.js></script>
vdegenne /
Last active April 21, 2021 11:33
Install postgresql 10 on Debian

Install postgresql 10 on Debian (stretch)

echo "deb [arch=amd64] stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list
curl -sSL | sudo apt-key add -
sudo apt update
sudo apt install -y postgresql-10 postgresql-10 postgresql10-contrib

After installation the server is already running the main instance :

[vdegenne /u/l/firewalld]$ docker run --rm --name pizz -p 80:8080 -e PG_HOST=DOCKER_HOST pizzajerry
docker: Error response from daemon: driver failed programming external connectivity on endpoint pizz (6a66a1d6c68be59114f619f22d568645bb4d0f4efd195495a0292bf12720693a): (COMMAND_FAILED: '/usr/sbin/iptables -w2 -t nat -A DOCKER -p tcp -d 0/0 --dport 80 -j DNAT --to-destination ! -i docker0' failed: ).
#!/usr/bin/env node
const highFive = () => new Promise((res, rej) => {
(async function() {
// 1. correct but prefer syntax 2
await highFive()
.then((res) => {