Skip to content

Instantly share code, notes, and snippets.

@bajorekp
bajorekp / test_shell_themes.md
Created December 21, 2021 00:10
Lists shell themes in your terminal environment

In order to test all oh-my-posh templates:

  1. Set in your .zshrc file:
source ~/test_script.sh
  1. Save the script to the file ~/test_script.sh
@bajorekp
bajorekp / postgres.yml
Created September 12, 2018 17:12
Docker && postgres
version: "3"
services:
db:
image: postgres:10.1
env_file:
- postgres_env
ports:
- '5432:5432'
restart: always
@bajorekp
bajorekp / ip_monitor.rb
Created February 4, 2017 18:05
Monitor looking for changes in IP address. Written in ruby for being cron job.
#!/usr/bin/env ruby
require 'optparse'
require 'net/http'
options = {
last_ip_file: "/var/www/last_ip.txt",
@bajorekp
bajorekp / amazon_aws.sh
Last active February 2, 2017 21:02
Install software packages for Machine Learning stack on Amazon AWS distribution.
# komendy do installacji na ubuntu
GIT_NAME="bajorekp"
GIT_EMAIL="bajorekp@gmail.com"
sudo yum update
sudo yum groupinstall -y development
sudo yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel xz-libs python35
# komendy do installacji na ubuntu
GIT_NAME="bajorekp"
GIT_EMAIL="bajorekp@gmail.com"
# install Java 8 from oracle
sudo apt-get update && \
sudo add-apt-repository -y ppa:webupd8team/java && \
sudo apt-get update && \
rsync -azP --delete source_dir/ destination
# -a (archive mode) sync option (recursion, keep the same symlinks, preserve file attributes ex. premissions, time)
# -z compress file data during the transfer
# -P show progress
# --delete delete extra files
# -e specify the remote shell to use
rsync -azP --delete -e "ssh -p 22 -i ~/.ssh/key" source destination
# receiving file list ...
# 1 file to consider