Skip to content

Instantly share code, notes, and snippets.

Avatar

Jérémie Roquet Arkanosis

View GitHub Profile
@Arkanosis
Arkanosis / kubuntu_to_debian.md
Last active May 3, 2021
Upgrading from Kubuntu 18.04 (Bionic) to Debian 10 (Buster) using Arch
View kubuntu_to_debian.md

Upgrading from Kubuntu 18.04 (Bionic) to Debian 10 (Buster) using Arch

The following describes how you can upgrade a running Kubuntu 18.04 to Debian 10 without having to format the root partition (which usually also contains /home).

This might sounds complicated at first, but it really isn't. Note that this is using Arch because why not, but you only need a distro on a bootable drive which is not the one being upgraded; Ubuntu or Debian would work as well.

Also, obviously:

  • only a fool would try that without proper backups;
  • this comes with no guarantee of any kind (if it breaks and you lose all your data, it's your own fault).
View backup_labsquare_gitter.sh
#! /bin/sh
chans="
labsquare/Regovar
labsquare/pirus
labsquare/french
labsquare/general
labsquare/fastQt
labsquare/CuteVariant
labsquare/CutePeaks
View GitHub_over_NTLM.md

Using GitHub with read/write access, on Debian / Ubuntu, behind a NTLM proxy

This gist is accessible using:

Accessing the Internet, on Linux, behind a NTLM proxy

Most tools don't know how to pass a NTLM proxy, but do know how to pass an HTTP proxy.

@Arkanosis
Arkanosis / install_vep.md
Last active Mar 3, 2022
Installing VEP on Ubuntu 18.04 LTS Bionic Beaver
View install_vep.md

Installing VEP on Ubuntu 18.04 LTS Bionic Beaver

sudo apt install unzip curl git libmodule-build-perl libdbi-perl libdbd-mysql-perl build-essential zlib1g-dev
git clone https://github.com/Ensembl/ensembl-vep.git
cd ensembl-vep
./INSTALL.pl -a a

This will only build and install the base VEP and its dependencies. See the documentation (search for --AUTO and --PLUGINS) for the flags needed for additional content.

@Arkanosis
Arkanosis / strftime_ja.cpp
Created Mar 14, 2018
Break std::strftime using a Japanese CP932 locale on Windows
View strftime_ja.cpp
#include <ctime>
#include <iostream>
#include <locale>
int main() {
std::locale::global(std::locale("Japanese_Japan.932"));
std::time_t t = std::time(nullptr);
char mbstr[20000];
if (std::strftime(mbstr, sizeof (mbstr), "%Y年%m月%d日 %H:%M:%S", std::localtime(&t))) {
std::cout << mbstr << '\n';
View litlok_2017_07_11.sh
# Pour que ce code fonctionne, supprimer les lignes avec des commentaires (commençant par « # ») et
# - tout mettre sur une seule ligne, ou
# - terminer chaque ligne par un « \ », sans espace après.
# trouver récursivement (« find ») tous les dossiers (« -type d ») dans mon home (« "$HOME" »)
find "$HOME" -type d |
# prendre chaque résultat de l'étape précédente, un par un, dans une variable (« directory »), et pour chacun…
while read directory; do
# substituer au résultat (« echo ») le résultat de l'exécution de « $( … ) »…
echo $(
@Arkanosis
Arkanosis / compressors_benchmark2.log
Created Oct 13, 2015
Naive benchmark of compressors (results 2)
View compressors_benchmark2.log
--- bench@5k ---
0.00s 3129 0.00s | 5k lz4 -1
0.00s 2936 0.00s | 5k lz4 -5
0.00s 2935 0.00s | 5k lz4 -9
0.00s 2272 0.00s | 5k gzip -1
0.00s 2167 0.00s | 5k gzip -5
0.00s 2166 0.00s | 5k gzip -9
0.00s 2246 0.00s | 5k brzip -1
@Arkanosis
Arkanosis / compressors_benchmark.log
Created Oct 12, 2015
Naive benchmark of compressors (results)
View compressors_benchmark.log
--- bench@5k ---
0.00s 2417 0.00s | 5k lz4 -1
0.00s 2256 0.00s | 5k lz4 -5
0.00s 2254 0.00s | 5k lz4 -9
0.00s 1741 0.00s | 5k gzip -1
0.00s 1646 0.00s | 5k gzip -5
0.00s 1634 0.00s | 5k gzip -9
0.00s 1722 0.00s | 5k bro --quality 1
0.00s 1631 0.00s | 5k bro --quality 4
0.00s 1568 0.00s | 5k bro --quality 9
@Arkanosis
Arkanosis / compressors_benchmark.sh
Created Oct 12, 2015
Naive benchmark of compressors
View compressors_benchmark.sh
#! /usr/bin/env zsh
# Naive benchmark of compressors
# (C) 2015 Jérémie Roquet <jroquet@arkanosis.net>
# Disclaimer: only one run per program to get an idea, do not rely on the results!
# TODO wrapper for lzham because lzhamtest is not pipe-friendly (it needs to know the input size)
file=frwiki-20151002.xml
@Arkanosis
Arkanosis / installed.sh
Created Jul 13, 2014
Get installed packages list
View installed.sh
comm -23 <(aptitude search '~i!~M' -F '%p' | sort -u | sed 's/ *$//') <(wget -qO - http://cdimage.ubuntu.com/kubuntu/releases/12.04/release/kubuntu-12.04-dvd-amd64.manifest | cut -f1 | sort -u) >| ~/Documents/packages.txt