Skip to content

Instantly share code, notes, and snippets.

@victorbnl
victorbnl / boot-physical-disk-virtualbox.md
Last active December 10, 2022 13:23
How to boot from physical disk with VirtualBox

How to boot from physical disk with VirtualBox

Do you have a dual boot? If so, isn't it annoying that you have to reboot each time you need the other os? Then boot from the physical disk with VirtualBox! It's not complicated, we'll see how to do this with a Linux host and a Windows host

Requirements

  • VirtualBox
  • A physical disk to boot (the other OS can be on the same disk or another one)

On a Linux host

@victorbnl
victorbnl / watch2gether.css
Last active August 17, 2021 20:49
Watch2Gether better style
/*
* Watch2Gether by default is not dark enough, not flat at all and does not use the screen as it should do
* So I decided to make a style to make it flat, dark, use the full potential of the screen and look a bit
* more like a webapp.
* If you want to use it you'll need something like Stylus, to apply CSS on websites
*/
/*
Use the entire screen
@victorbnl
victorbnl / control_led_strip_bluetooth.md
Last active August 26, 2021 16:13
Arduino: How to control LED strip from Bluetooth

Arduino: How to control LED strip from Bluetooth

Introduction

A few days ago my brother bought a LED strip and then realized it wasn't what he was looking for, so I thought I could do something with it. In this tutorial I'll show you how I turned a classic LED strip into a Bluetooth controlled one.

Requirements

The LED strip I have as four pins :

@victorbnl
victorbnl / turnOffLeds.sh
Last active December 19, 2020 00:24
Turns off leds of Raspberry Pi 3
#!/bin/bash
echo 0 > /sys/class/leds/led0/brightness
echo 0 > /sys/class/leds/led1/brightness
@victorbnl
victorbnl / pre-commit
Last active January 17, 2021 18:28
Pre-commit hook to increase build.gradle version
#!/bin/sh
# Increment versionCode
perl -pi -e 's/versionCode ([0-9]+)/"versionCode " . ($1+1)/e' ./app/build.gradle
# Increment versionName
perl -pi -e 's/versionName \"([0-9]+)\"/"versionName \"" . ($1+1) . "\""/e' ./app/build.gradle
@victorbnl
victorbnl / ventoy.json
Last active April 4, 2021 13:22
A complete as possible list of menu_class icons for Ventoy
{
"menu_class": [
{
"key": "arch",
"class": "arch"
},
{
"key": "arcolinux",
"class": "arcolinux"
},
@victorbnl
victorbnl / load_cogs.py
Last active August 26, 2021 16:04
Load all cogs of cogs folder
import os
import re
for f in os.listdir("cogs"):
if re.match(r".*\.py.swp", f):
pass
elif re.match(r".*\.py", f):
bot.load_extension("cogs." + f.replace(".py", ""))
@victorbnl
victorbnl / uninstall-snap.sh
Created April 27, 2021 13:16
Uninstall snap on Ubuntu
#!/bin/bash
# Uninstall snap
apt-get autoremove snap
# Prevent snap from running again
echo -e 'Package: snapd\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/nosnap
@victorbnl
victorbnl / install-weblate-locally.md
Last active November 5, 2023 17:00
How to install weblate locally

How to install weblate locally

Requirements

  • git
  • docker
  • docker-compose

Steps

@victorbnl
victorbnl / extra.css
Created August 26, 2021 20:58
More space at the bottom for mkdocs-material
/* More space at the bottom of the page */
.md-main__inner {
margin-bottom: 1.5rem;
}