Skip to content

Instantly share code, notes, and snippets.

@ymauray
ymauray / keybase.md
Created November 11, 2022 17:08
keybase.md

Keybase proof

I hereby claim:

  • I am ymauray on github.
  • I am ymauray (https://keybase.io/ymauray) on keybase.
  • I have a public key ASAS-Ulix4YJJ_zju2R5QHf8Qt8ryZQXV6ueW2c34A9YOQo

To claim this, I am signing this object:

@ymauray
ymauray / streamdeck.sh
Last active December 16, 2021 09:17 — forked from flexiondotorg/streamdeck.sh
Install StreamDeck Unix on Ubuntu
#!/usr/bin/env bash
if [ "$(id -u)" -ne 0 ]; then
echo "ERROR! Must be root."
exit 1
fi
export GOPATH="/tmp/go"
if [ -d "${GOPATH}" ]; then
rm -rf "${GOPATH}"
@ymauray
ymauray / id_rsa.pub
Created April 27, 2021 19:59
id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsvth27izdmEhs+6MyX8hQqqsXdP9LeONeOtyx2I1mCZ9NFqTm/mihsqHbY64bk6pYbWfHKv9wM1R1DHlR8BjkhOtoFYk7Zu6hzCCrbQ2Fjin5qZQfLg4PLVckrsd4HArP2Um5K/QtCdAAi5haUOKYINehwmEhhefKkNqGQIhzCz36u8N6dqtk5iivk9PD5N5GFvCJTFPCyox5LCn9DqWYjW/kgsTSHX7tdEJCscx5X2jNZSopDRemtWoWflwGVEDogtx4wILjnaX0gBrcab5Uok9euUxVwQKi7WiIbNqFj/A5K93CDBNlJOB8dbtVddtZy5G+bq+l+hBsXdHPPuoT Yannick@Heimdall
@ymauray
ymauray / show_server_names.sh
Last active February 26, 2021 09:35
Get a list of "server_name" an nginx server knows about (FreeBSD version, using gsed)
#!/bin/bash
sudo nginx -T 2>/dev/null \
| gsed -r -e 's/[[:space:]]*$//' -e 's/^[[:space:]]*//' -e 's/^#.*$//' -e 's/[[:space:]]*#.*$//' -e '/^$/d' \
| gsed -e ':a;N;$!ba;s/\([^;\{\}]\)\n/\1 /g' \
| grep 'server_name[[:space:]]' \
| grep -v '\$' \
| grep '\.' \
| gsed -r -e 's/(\S)[[:space:]]+(\S)/\1\n\2/g' -e 's/;//' \
| grep -v "^server_name$" \
@ymauray
ymauray / calf_config.xml
Last active April 23, 2020 15:00
Script to start JACK, load Calf JACK Host, connect ports, wait, and kill jack.
<?xml version="1.1" encoding="utf-8"?>
<rack><plugin type="gate" instance-name="gate" input-index="1" output-index="1">
<preset bank="0" program="0" plugin="gate" name="">
<param name="bypass" value="0" />
<param name="level_in" value="1" />
<param name="meter_in" value="0.315075" />
<param name="meter_out" value="0.315075" />
<param name="clip_in" value="0" />
<param name="clip_out" value="0" />
<param name="range" value="1.5849e-05" />
@ymauray
ymauray / procedure.md
Last active December 6, 2019 12:40
TemplaVoila problem - Procedure

Create a mysql database :

create database typo3 default character set 'utf8mb4' default collate 'utf8mb4_general_ci';
create user 'typo3'@'localhost' identified by 'typo3';
grant all privileges on typo3.* to 'typo3'@'localhost';
flush privileges;

Install Typo3 and TemplaVoila

@ymauray
ymauray / code-server.service
Created March 8, 2019 10:34
systemd startup script for Visual Studio Code on the server
[Unit]
Description=Visual Studio Code on the server
After=network.target
[Service]
ExecStart=/usr/bin/code-server --allow-http /home/someuser/workspace/ --password=somefixedpassword
User=someuser
Restart=always
RestartSec=1
@ymauray
ymauray / code-server.conf
Last active March 8, 2019 12:01
Apache 2 config file to act as a reverse proxy for Visual Studio Code on the server
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName code.somehost.ch
ProxyRequests Off
AllowEncodedSlashes NoDecode
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:8443/$1 [P,L]
country=ch
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid="MaBoxInternet"
psk="ClefSecurite"
}

Il faut rester dans des résolutions standard

VBoxManage setextradata "vboxname" VBoxInternal2/EfiHorizontalResolution 1600
VBoxManage setextradata "vboxname" VBoxInternal2/EfiVerticalResolution 900