Skip to content

Instantly share code, notes, and snippets.

View marcelmaatkamp's full-sized avatar
🚢
Available

Marcel Maatkamp marcelmaatkamp

🚢
Available
View GitHub Profile
mvn org.antlr:antlr4-maven-plugin:help -Ddetail=tru
owl-shop:
image: quay.io/cloudhut/owl-shop:sha-042112b
entrypoint: /bin/sh
command: -c "echo \"$$OWLSHOP_CONFIG_FILE\" > /tmp/config.yml; /app/owlshop"
environment:
CONFIG_FILEPATH: /tmp/config.yml
OWLSHOP_CONFIG_FILE: |
shop:
requestRate: 1
interval: 0.1s
https://medium.com/@ingridwickstevens/chat-with-your-local-documents-privategpt-lm-studio-c6ff94d0dfe3
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"\n
brew install make tcl-tk sqlite pyenv-virtualenv
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
---
from sqlalchemy import create_engine
engine = create_engine('postgresql://postgres:postgres@postgres:5432/postgres', echo=False)
---
import pandas as pd
with engine.connect() as connection:
df = pd.read_sql('ais', connection)
df
@marcelmaatkamp
marcelmaatkamp / install_terraform_and_kubectl.sh
Created February 4, 2022 10:56
Install terraform and kubectl
$ \
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
&&\
curl -fsSL https://apt.releases.hashicorp.com/gpg | \
sudo apt-key add - &&\
sudo apt-add-repository \
"deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main" &&\
@marcelmaatkamp
marcelmaatkamp / install_docker.sh
Last active February 4, 2022 10:32
Install docker in a clean Ubuntu 20
$ \
sudo apt-get remove \
docker docker-engine docker.io containerd runc &&\
sudo apt-get update &&\
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release &&\
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
@marcelmaatkamp
marcelmaatkamp / install_github_desktop.sh
Created January 23, 2022 07:45
Install Gitub Desktop in linux
#!/bin/bash
wget -qO - https://packagecloud.io/shiftkey/desktop/gpgkey | sudo tee /etc/apt/trusted.gpg.d/shiftkey-desktop.asc > /dev/null
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/shiftkey/desktop/any/ any main" > /etc/apt/sources.list.d/packagecloud-shiftkey-desktop.list'
sudo apt-get update
sudo apt install github-desktop
@marcelmaatkamp
marcelmaatkamp / put_files_in_sqlite.sh
Last active August 8, 2021 10:25
put size, shasum and filename in sqlite
#!/bin/bash
sqlite3 files.db 'CREATE TABLE files( id INTEGER PRIMARY KEY AUTOINCREMENT, sum TEXT NOT NULL, size INT NOT NULL, date DATE NOT NULL, directory TEXT NOT NULL, filename TEXT NOT NULL, extension TEXT NOT NULL);'
id=0
find . -type f | while read file; do
IFS=$'\n'
sum=$(sha256sum $file | awk '{print $1}')
stat=$(stat -c %y,%s $file)
date=$(echo $stat | awk -F"," '{ print $1 }')
@marcelmaatkamp
marcelmaatkamp / size_and_name.sh
Created August 8, 2021 06:45
print size and filename
find . -type f -name \*.txt -printf '%s|%p\n'
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
$ kubectl port-forward --address 0.0.0.0 -n ingress-nginx service/ingress-nginx-controller 8443:443