Skip to content

Instantly share code, notes, and snippets.

View GreepTheSheep's full-sized avatar
:shipit:

Matthieu - Greep GreepTheSheep

:shipit:
View GitHub Profile
@GreepTheSheep
GreepTheSheep / cleanup.sh
Created March 6, 2023 14:44
Script to cleanup Debian server
#!/bin/bash
# Delete old log files
sudo find /var/log -type f -name "*.gz" -exec rm -f {};
sudo find /var/log -type f -name "*.log.*" -exec rm -f {} \;
sudo find /var/log -type f -name "*.1" -exec rm -f {} \;
# Delete temporary files
sudo rm -rf /tmp/*
@GreepTheSheep
GreepTheSheep / exit.js
Last active November 11, 2022 13:23
Exit commands on Node.js with MariaDB backend
process.on('SIGINT', exit); // CTRL+C
process.on('SIGQUIT', exit); // Keyboard quit
process.on('SIGTERM', kill); // `kill` command
process.on('SIGWINCH', exit); // docker down or else idk
function exit() {
console.log("Exiting...");
DB.end().then(process.exit(0))
.catch(err=>{
console.error("MariaDB End connexion error:", err);
@GreepTheSheep
GreepTheSheep / Building Openplanet plugins to .op.md
Last active May 27, 2022 17:58
Making .op files easily with a VSCode shortcut

How to build Openplanet plugins easily with VSCode build tasks

1. Setting up your environment

When making a new plugin, make sure you set up your plugin's folder as follows:

OpenplanetNext/
├── Plugins/
│   ├── <PluginName>/
│   │   ├── info.toml
@GreepTheSheep
GreepTheSheep / _TM_Collisions_tutorial.md
Last active April 7, 2023 16:38
Collisions on a TM dedicated server

Create a file on UserData/Scripts/Modes/Trackmania/collisions.Script.txt , with the content on file linked with this gist

Then you need to edit your matchsettings file like this :

<playlist>
    <gameinfos>
        <script_name>Trackmania/collisions.Script.txt</script_name>
    </gameinfos>

 
@GreepTheSheep
GreepTheSheep / Microsoft.PowerShell_profile.ps1
Last active October 20, 2021 11:41
Greep's Oh My Posh themes
Import-Module posh-git
Import-Module oh-my-posh
$download_url = "https://gist.githubusercontent.com/GreepTheSheep/db86ae95ed0c4d5958eac6a83dd6be72/raw/thegreepone.omp.json"
$local_path = "C:/Users/%username%/Documents/PowerShell/thegreepone.omp.json"
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile($download_url, $local_path)
Set-PoshPrompt -Theme "~/Documents/PowerShell/thegreepone.omp.json"
@GreepTheSheep
GreepTheSheep / Install VBox Guest On Debian.md
Last active March 15, 2024 19:06
Install VBox Guest On Debian
  1. Install VirtualBox Extention Pack
  2. Prepare Linux kernel for VirtualBox: sudo apt install gcc make perl dkms
  3. Mount the Guest Additions disk
  4. Install Guest Additions: sudo sh /media/cdrom0/VBoxLinuxAdditions.run
  5. Reboot
  6. Enjoy
@GreepTheSheep
GreepTheSheep / Installing LAMP with PMA on debian 10.md
Last active May 28, 2023 22:03
Install PHPMyAdmin on Debian 10 (user root no password)

Install PHPMyAdmin on Debian 10

User root with no password

  1. Install LAMP apt install apache2 php mariadb-server

  2. Install PHP modules apt install php-{mbstring,zip,gd,xml,pear,gettext,cgi,mysql} libapache2-mod-php

  3. Download PHPMyAdmin