This Gist is a guide on how to setup your computer at CERN with Ubuntu 18.04 LTS. Last tested by myself on a brand new computer on 25/07/2018.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| d-i preseed/late_command string in-target apt-get -y install netplan.io systemd-resolved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <assert.h> | |
| #include <openssl/aes.h> | |
| #include <openssl/bio.h> | |
| #include <openssl/decoder.h> | |
| #include <openssl/err.h> | |
| #include <openssl/evp.h> | |
| #include <openssl/pem.h> | |
| #include <openssl/rsa.h> | |
| #include <openssl/ssl.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Userland mode (~$USER/), (~/). | |
| FONT_HOME=~/.local/share/fonts | |
| echo "installing fonts to $FONT_HOME" | |
| for type in code sans serif; do | |
| mkdir -p "$FONT_HOME/adobe-fonts/source-$type-pro" | |
| (git clone \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <utility> | |
| #include <vector> | |
| std::pair<int, int> foo(int x, int y) { | |
| return std::make_pair(x + 1, y + 10); | |
| } | |
| int main(void) { | |
| auto [x, y] = foo(1, 5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # check color support | |
| colors=$(tput colors) | |
| if (($colors >= 8)); then | |
| red='\033[0;31m' | |
| nocolor='\033[00m' | |
| else | |
| red= | |
| nocolor= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| PROG=$(basename $0) | |
| SERVER="vpn.epfl.ch" | |
| USER=<your_username_here> | |
| function help { | |
| echo "Usage: $PROG [-c] [-d]" | |
| echo | |
| echo "Options" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| function usage { | |
| echo "Usage: csview <file>" | |
| } | |
| if (( $# != 1 )); then | |
| usage | |
| if (( $# < 1 )); then | |
| echo "Too few arguments" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################################# | |
| # | |
| # Backend | |
| # | |
| ################################# | |
| # Backend to use: "xrender" or "glx". | |
| # GLX backend is typically much faster but depends on a sane driver. | |
| backend = "glx"; |