Skip to content

Instantly share code, notes, and snippets.

View fabiomontefuscolo's full-sized avatar

Fabio Montefuscolo fabiomontefuscolo

View GitHub Profile
import glob
import importlib
from os.path import basename, dirname, join
import click
#
# I have a module called `project.commands`. From time to time I create
# new click commands in a new submodule inside the module mentioned
# above. The idea here is to automagically load all the new commands
@fabiomontefuscolo
fabiomontefuscolo / cube.step
Created August 24, 2023 14:14
A simple step cube
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('Open CASCADE Model'),'2;1');
FILE_NAME('Open CASCADE Shape Model','2009-05-01T23:59:58',('Author'),(
'Open CASCADE'),'Open CASCADE STEP processor 6.3','Open CASCADE 6.3'
,'Unknown');
FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 -1 1 5 4 }'));
ENDSEC;
DATA;
#1 = APPLICATION_PROTOCOL_DEFINITION('committee draft',
#!/bin/bash
# Max size of dump folder (in Mb)
MAX_SIZE=10000
# PHP executable
PHP=/usr/bin/php
# mysqldump executable
MYSQLDUMP=/bin/mysqldump
@fabiomontefuscolo
fabiomontefuscolo / import-archive-to-trackers.sql
Created May 26, 2021 21:47
Import Openfire MUC archive to Tiki Trackers
BEGIN
DECLARE tr_ID INT DEFAULT 2;
DECLARE tf_ROOMID INT DEFAULT 7;
DECLARE tf_ROOM INT DEFAULT 8;
DECLARE tf_SENDER INT DEFAULT 9;
DECLARE tf_DATE INT DEFAULT 10;
DECLARE tf_BODY INT DEFAULT 12;
DECLARE _lastInsertId INT DEFAULT 0;
DECLARE _lastItemId INT DEFAULT 0;
@fabiomontefuscolo
fabiomontefuscolo / syncthing.pl
Last active December 22, 2020 21:07
Virtualmin syncthing install script
our (%in, %config);
use warnings;
use XML::LibXML;
sub script_syncthing_desc
{
return "Syncthing";
}
@fabiomontefuscolo
fabiomontefuscolo / openfire-install.md
Last active September 10, 2020 14:11
[WIP] Build openfire on EC2 AMI environment
@fabiomontefuscolo
fabiomontefuscolo / composer.json
Created September 1, 2020 20:30
Tiki extra-packages
{
"name": "tiki/tiki-custom",
"description": "Tiki Wiki CMS Groupware",
"license": "LGPL-2.1",
"homepage": "https://tiki.org",
"minimum-stability": "stable",
"require": {
"fullcalendar/fullcalendar-scheduler": "^1.9",
"tikiwiki/diagram": "^10",
@fabiomontefuscolo
fabiomontefuscolo / example.com.conf
Last active August 26, 2020 15:06
nginx-docker-openfire.conf
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name example.com;
@fabiomontefuscolo
fabiomontefuscolo / nginx-docker-compose.yaml
Created July 27, 2020 22:25
nginx and tiki and docker
version: "3.7"
services:
nginx:
image: jwilder/nginx-proxy
restart: unless-stopped
volumes:
- ./dhparam:/etc/nginx/dhparam
- ./conf.d:/etc/nginx/conf.d
- ./certs:/etc/nginx/certs
@fabiomontefuscolo
fabiomontefuscolo / letsencrypt-renew
Last active July 7, 2020 13:39
Manual conf for LetsEncrypt on ClearOS with Apache
#!/bin/bash
#
# -rwxr-xr-x /etc/cron.daily/letsencrypt-renew
#
mkdir -p /var/www/letsencrypt
/usr/bin/certbot renew \
--agree-tos \