Skip to content

Instantly share code, notes, and snippets.

View alexAubin's full-sized avatar

Alexandre Aubin alexAubin

View GitHub Profile
@alexAubin
alexAubin / finish_the_bullseye_migration.sh
Created October 3, 2022 14:12
finish_the_bullseye_migration
#!/bin/bash
sudo apt-mark hold $(dpkg --list | grep ynh-deps | awk '{print $2}')
LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none sudo apt full-upgrade
PHP73_PACKAGE_SUFFIXES="apcu bcmath bz2 dom mp igbinary imagick imap mbstring memcached mysqli mysqlnd pgsql redis simplexml soap sqlite3 ssh2 tidy xml xmlrpc xsl zip"
ADDITIONAL_PHP74_PACKAGES_NEEDED=$(apt show '*-ynh-deps' 2>/dev/null | grep Depends | grep -o -E "php7.3-($(echo $PHP73_PACKAGE_SUFFIXES | tr ' ' '|'))" | sort | uniq | sed 's/php7.3/php7.4/g' || true)
BASE_PHP74_PACKAGES_TO_INSTALL="php7.4-fpm php7.4-common php7.4-ldap php7.4-intl php7.4-mysql php7.4-gd php7.4-curl php-php-gettext"
@alexAubin
alexAubin / FoxDot.cheatsheet
Created August 11, 2022 17:17
FoxDot.cheatsheet
`!`: Yeah! `&`: Chime
`#`: Crash `1`: Vocals (One)
`$`: Beatbox `2`: Vocals (Two)
`%`: Noise bursts `3`: Vocals (Three)
`*`: Clap `4`: Vocals (Four)
`+`: Clicks `@`: Gameboy noise
`-`: Hi hat closed `/`: Reverse sounds
`~`: Ride cymbal `\`: Lazer
`:`: Hi-hats `^`: Donk
`=`: Hi hat open `|`: Hangdrum
#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=1
packaging_format = 2
id = "hextris"
name = "Hextris"
description.en = "A fast paced puzzle game"
description.fr = "Un jeu de puzzle très rapide"
version = "2020-05-05~ynh4"
maintainers = ["AerisOne"]
@alexAubin
alexAubin / convert_check_process.sh
Created September 14, 2021 20:09
Magically convert the ugly check_process to a new tests.toml
check_process=$1
TEST_CONTEXT="./tmp/"
rm -rf ./tmp/
mkdir -p ./tmp/
extract_check_process_section () {
local source_file="${3:-$check_process}"
local extract=0
local line=""
while read line
@alexAubin
alexAubin / gist:337ec0ecb7709ab8316e4746b9e63d6d
Created August 26, 2021 23:04
force_regen_conf_slapd.sh
set -e
config="/usr/share/yunohost/templates/slapd/config.ldif"
# Validate the new slapd config
# To do so, we have to use the .ldif to generate the config directory
# so we use a temporary directory slapd_new.d
rm -Rf /etc/ldap/slapd_new.d
mkdir /etc/ldap/slapd_new.d
slapadd -b cn=config -l "$config" -F /etc/ldap/slapd_new.d/ 2>&1 \
@alexAubin
alexAubin / convert_to_packaging_v2.py
Last active January 28, 2022 19:51
Convert yunohost app manifest from v1 to v2
import os
import re
import json
import subprocess
def check_output(cmd):
return (
subprocess.check_output(cmd, shell=True)
.decode("utf-8")
@alexAubin
alexAubin / test-buster-migration.sh
Last active May 17, 2020 22:48
A script to test the stretch->buster migration
INSTALL_SCRIPT="https://install.yunohost.org"
curl $INSTALL_SCRIPT | bash -s -- -a -d unstable
cd /
curl https://raw.githubusercontent.com/YunoHost/ynh-dev/master/deploy.sh | bash
cd ynh-dev/
./ynh-dev use-git yunohost
yunohost tools postinstall -d yolo.test -p Yunohost
yunohost user create johndoe -f John -l Doe -m johndoe@yolo.test -p Yunohost
@alexAubin
alexAubin / make_changelog.sh
Last active September 4, 2020 12:29
A script to create changelog before releases in the yunohost project
VERSION="?"
RELEASE="testing"
REPO=$(basename $(git rev-parse --show-toplevel))
REPO_URL=$(git remote get-url origin)
ME=$(git config --global --get user.name)
EMAIL=$(git config --global --get user.email)
LAST_RELEASE=$(git tag --list | grep debian | tail -n 1)
echo "$REPO ($VERSION) $RELEASE; urgency=low"
<html>
<head>
</head>
<body>
<button type="button" onclick="cookieAppendToSet('nyah', 'foo', 360)">Add favorite foo</button>
<button type="button" onclick="cookieAppendToSet('nyah', 'bar', 360)">Add favorite bar</button>
<br>
<button type="button" onclick="cookieRemoveFromSet('nyah', 'foo', 360)">Remove favorite foo</button>
<button type="button" onclick="cookieRemoveFromSet('nyah', 'bar', 360)">Remove favorite bar</button>
<div id="nyah"></div>