Skip to content

Instantly share code, notes, and snippets.

View ArnisLielturks's full-sized avatar
🎯
Focusing

Arnis Lielturks ArnisLielturks

🎯
Focusing
  • Latvia, Riga
View GitHub Profile
[
{
"from_email": "newsletters@newsletters.com",
"author": "NewsLetter",
"subject": "awesome title 1",
"content": "this is actual email content 111",
"created_at": "2021-07-08 21:22:00",
"read_at": null
},
{

Keybase proof

I hereby claim:

  • I am arnislielturks on github.
  • I am arnislielturks (https://keybase.io/arnislielturks) on keybase.
  • I have a public key ASB1J2DFmxGTiHpw0uxcd6yFSQ3wXS1agzyhtX7_RYyLJQo

To claim this, I am signing this object:

@ArnisLielturks
ArnisLielturks / .bashrc
Created August 10, 2017 12:57
ubuntu terminal styling
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
source ~/.git-prompt.sh
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@ArnisLielturks
ArnisLielturks / .vimrc
Last active August 15, 2017 11:45
vi setup
set nocompatible
set backspace=2
set tabstop=4
set expandtab
set term=builtin_ansi
@ArnisLielturks
ArnisLielturks / parse_yaml.sh
Created August 1, 2017 14:10 — forked from pkuczynski/parse_yaml.sh
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "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;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}