Skip to content

Instantly share code, notes, and snippets.

@jimathyp
jimathyp / git-usage.md
Last active July 13, 2021 23:01
Git usage
@jimathyp
jimathyp / terminal-tools.md
Last active July 29, 2020 19:20
Terminal tools
@jimathyp
jimathyp / apache-spark.md
Last active August 10, 2022 23:29
Using Apache Spark

Apache Spark

Session setup

Reading CSV

spark.read.format('csv').load('path')

@jimathyp
jimathyp / postgres-usage.md
Last active July 13, 2021 00:46
PostGres usage

PostgreSQL usage

Start/stop/check Linux postgres service

sudo service postgresql start
sudo service postgresql status
sudo service postgresql stop

Connect to server using psql

@jimathyp
jimathyp / .bash_profile
Last active August 4, 2020 06:09
bash_profile
# WSL ~/.bash_profile
echo "Function 'login <aws_vault_profile_name>'"
login() {
echo '$(date) login to $1' | tee --append ~/aws_logins.log
# aws-vault version 5
aws-vault login -s $1 | xargs nohup chrome.exe --incognito &> ~/chrome.nohup.out
}
@jimathyp
jimathyp / linux-sys-admin.md
Last active August 4, 2020 20:15
LInux Sysadmin

Linux sysadmin

Login as a user

sudo -u postgres -i

Process with memory leak?

@jimathyp
jimathyp / linux-kernel.md
Last active May 25, 2021 23:26
Linux Kernel
@jimathyp
jimathyp / rst-usage.md
Last active August 22, 2022 23:35
RST usage

RST documentation

Navigation Breadcrumbs

  • added a page and subpages, but when clicking on the subpages it is 'disconnected' from the menu;
  • ie. get Docs > bw_table
  • but expect: Docs > Catalogue > Ingest > BW Logs > bw_table
@jimathyp
jimathyp / athena-s3-website-logs.md
Last active November 19, 2020 10:14
Setup of Athena to query Amazon S3 website logs