Skip to content

Instantly share code, notes, and snippets.

View rbeucher's full-sized avatar

Romain Beucher rbeucher

View GitHub Profile
@rbeucher
rbeucher / find_cmip6_model.py
Last active July 10, 2024 01:04
find_cmip6_model
#!/usr/bin/env python3
import glob
import sys
import re
def return_datasets(activity="*",
institute="*",
dataset="*",
exp="*",
@rbeucher
rbeucher / divtags.rst
Created August 9, 2023 22:12 — forked from DanielKotik/divtags.rst
Colored note boxes inside Jupyter notebooks

############# Markdown parser in Jupyter notebooks ##################

<div class="alert alert-block alert-info"> <b>NOTE</b> Use blue boxes for Tips and notes. </div>

<div class="alert alert-block alert-success"> Use green boxes sparingly, and only for some specific purpose that the other boxes can't cover. For example, if you have a lot of related content to link to, maybe you decide to use green boxes for related links from each section of a notebook.

@rbeucher
rbeucher / arch-usb-uefi.md
Created August 5, 2023 23:01 — forked from elerch/arch-usb-uefi.md
Installation of Arch Linux on a USB stick with UEFI and legacy BIOS Support

Our goal here is to have one USB stick to rule them all. Objectives:

  • We want a full system - not a live CD
  • We want to boot this system on a Macbook Pro (requires UEFI)
  • We want to boot this system on a Acer C720 Chromebook (requires Legacy BIOS support)
  • We want the system "functional"

The last bullet is subject to interpretation, but I'm defining functional as:

  • X Windows works (with LXDE)
@rbeucher
rbeucher / production-web-server-setup-and-deployment-guide.md
Created April 12, 2023 02:08 — forked from journeymanavi/production-web-server-setup-and-deployment-guide.md
A runbook for setting up a Linux based secure, production web server, for serving static web content as well as deploying Node.js based web applications.

Recovering deleted files in Ubuntu with ext4 filesystem

Recently, I deleted some files by mistake in a Ubuntu machine with an ext4 fs. These notes document the steps I took to get them back.

Important

  • this procedure assumes that the partition that contained the deleted files is different from the root partition, as that was the scenario with which I had to deal (deleted files were in my home dir). The procedure needs that the partition that contained the files is unmounted, so if the deleted files were in the root partition, the process would be a bit different (e.g. storing the fs journal in a USB stick, using a live CD/USB to boot and issue the commands, etc.)
  • if something is not clear, you need more information, etc. check the sources below

With that out the way, let's begin.

@rbeucher
rbeucher / index.html
Created January 19, 2022 10:33 — forked from danswick/index.html
Add draw control to a Mapbox GL JS map
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.css' rel='stylesheet' />
<script src="mapbox-gl-draw.js"></script>
<link href='mapbox-gl-draw.css' rel='stylesheet' />
@rbeucher
rbeucher / slcn_supg.ipynb
Last active August 16, 2019 07:55 — forked from julesghub/slcn_supg.ipynb
The rotating cone problem SLCN vs SUPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rbeucher
rbeucher / demo.ipynb
Created August 12, 2019 23:31 — forked from jmansour/demo.ipynb
UW28 blog post demo2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rbeucher
rbeucher / projection.py
Created June 20, 2019 05:02 — forked from joferkington/projection.py
Spießbürger's stereonet: Fixed coordinate conversions. See http://stackoverflow.com/questions/27622007
import matplotlib
from matplotlib.axes import Axes
from matplotlib.patches import Circle
from matplotlib.path import Path
from matplotlib.ticker import NullLocator, Formatter, FixedLocator
from matplotlib.transforms import Affine2D, BboxTransformTo, Transform
from matplotlib.projections import register_projection
import matplotlib.spines as mspines
import matplotlib.axis as maxis
import matplotlib.pyplot as plt
@rbeucher
rbeucher / django-shell-notebook-setup.md
Created May 14, 2019 11:59 — forked from madyasiwi/django-shell-notebook-setup.md
Guide to setup Django-shell Jupyter notebook running in Docker container

Setting Up Django-Shell Jupyter Notebook in Docker Container

This guide assumes that your django application already running in the container.

1. Install required python packages

You will have to make sure that django-extensions and jupyter packages are installed in the container's python virtual environment.

If you need to shell into the container as root user to do this, you can do so from the host PC: