Skip to content

Instantly share code, notes, and snippets.

View Rmano's full-sized avatar

Romano Giannetti Rmano

View GitHub Profile

What is the problem you are having with rclone?

I am using rclone to backup my Linux directory on my employer's OneDrive cloud disk --- and it works perfectly and efficiently. Kudos to everyone involved.

The problem is that I have, on my source disk, a project cloned by GitHub; can't post a link, search for screenkey. In that dir there is a file named screenkey and a directory named ScreenKey. Ok: bad idea, I know.

What happens is that clearly, the copy fails because the target fs is non-case-sensitive with the error reported below.

So, my question: is there some way of solving the clash short of excluding the guilty directory from the backup?

@Rmano
Rmano / xopp-relativize.py
Created March 10, 2021 13:09
Small'n'dirty script to remove the path of the background file in .xopp (xournalpp)
#! /usr/bin/env python3
# -*- coding: utf8 -*-
#
import sys
import os
import re
import argparse
import gzip
@Rmano
Rmano / gist:a51283186c4840f4cb0f489432545bdd
Last active December 23, 2020 10:49
Test file to show MDPI tempalte output routine error
%
% without the \clearpage on line 192 it explodes...
%
% LaTeX support: latex@mdpi.com
% For support, please attach all files needed for compiling as well as the log file, and specify your operating system, LaTeX version, and LaTeX editor.
%=================================================================
\documentclass[applsci,article,submit,moreauthors,pdftex]{Definitions/mdpi}
@Rmano
Rmano / boaty.eepic
Last active August 15, 2020 08:01
epic and eepic files generated by xfig (also a pict2e)
\setlength{\unitlength}{0.00087489in}
%
\begingroup\makeatletter\ifx\SetFigFont\undefined%
\gdef\SetFigFont#1#2#3#4#5{%
\reset@font\fontsize{#1}{#2pt}%
\fontfamily{#3}\fontseries{#4}\fontshape{#5}%
\selectfont}%
\fi\endgroup%
{\renewcommand{\dashlinestretch}{30}
\begin{picture}(2544,1884)(0,-10)
@Rmano
Rmano / moodleshow.tex
Created June 11, 2020 11:44
Show graphical manipulation commands in moodle.sty
%
\makeatletter
\renewcommand\moodle@includegraphics@int@int[2][]{%
\bgroup% The grouping is to localize the changes caused by \setkeys.
\message{moodle.sty: Processing \string\includegraphics[#1]{#2} for HTML...^^J}
\setkeys*{moodle@includegraphics}{#1}%
% Height or width should be given in TeX dimensions like cm or pt or in,
% and are converted to pixels for web use using the ppi key.
% TO DO: Can we modify \includegraphics to accept height or width in
% pixels?
@Rmano
Rmano / testbb.tex
Created June 4, 2020 08:29
Find biggest bounding box in a tikzpicture in beamer and then fix it.
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows,overlay-beamer-styles,calc}
\makeatletter
% Thanks to Paul Gaborit https://tex.stackexchange.com/a/179946/38080
\def\extractcoord#1#2#3{
@Rmano
Rmano / testm.tex
Created June 3, 2020 06:48
Example of use of TikZ beamer styles
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows,overlay-beamer-styles}
\begin{document}
% mode 1 (but you need to add an "use as bounding box"
% somewhere to avoid jumping because adding things changes
% the size of the picture
@Rmano
Rmano / doshade.py
Last active June 2, 2020 18:11
Shading in latex for a nanometer-based visible light
#!/usr/bin/env python3
#
# this is the script that generated the visibleshading.tex file
#
lambdas = [380+20*i for i in range(21)]
for i in lambdas:
print(r"\definecolor{ww%d}{wave}{%d}" % (i, i))
print(r"\colorlet{w%d}[rgb]{ww%d}" % (i,i))
print(r"\pgfdeclarehorizontalshading{visible}{100bp}{%")
@Rmano
Rmano / batty.tex
Created May 26, 2020 10:56
Tests for fpu magic
\documentclass[border=10pt]{standalone}
\usepackage[RPvoltages]{circuitikz}
\usetikzlibrary{fpu}
\makeatletter
\pgfqkeys{/pgf}{
fpu/install only/.code={
\pgfmath@warning{The key `/pgf/fpu/install only' is experimental and might %
change or disappear at any point!}%
\edef\pgf@list{#1}%
\pgfutil@for\pgf@temp:=\pgf@list\do{%