Skip to content

Instantly share code, notes, and snippets.

View roodee's full-sized avatar

roodee roodee

  • Berlin, Germany
View GitHub Profile
@fperez
fperez / ProgrammaticNotebook.ipynb
Last active November 14, 2024 11:22
Creating an IPython Notebook programatically
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@evantoli
evantoli / GitConfigHttpProxy.md
Last active November 14, 2024 06:03
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@Esl1h
Esl1h / bash_parse_example.sh
Last active September 19, 2023 11:12
How to parse and use yaml file in bash/shell script.
#!/bin/bash
function parse_yaml {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\):|\1|" \
-e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;