Skip to content

Instantly share code, notes, and snippets.

View pozgo's full-sized avatar
💭
¯\_(ツ)_/¯

Ozzy pozgo

💭
¯\_(ツ)_/¯
View GitHub Profile
@pozgo
pozgo / provision.sh
Last active April 22, 2024 14:31
Quick provision Debian 12 with OhMyPosh neovim and kickstart and few base packages
#!/bin/bash
set -eu
export TERM=xterm
# Bash Colors
green=`tput setaf 2`
bold=`tput bold`
reset=`tput sgr0`
# Functions
log() {
if [[ "$@" ]]; then echo "${bold}${green}[LOG `date +'%T'`]${reset} $@";
@pozgo
pozgo / radio
Created January 7, 2020 23:04
Polskie Radio Python Script
#!/usr/local/bin/python3
# Requirements:
# OS - mplayer
# Python3 - sudo pip3 install inquirer termcolor
import os
import sys
import inquirer
import termcolor
from termcolor import colored
@pozgo
pozgo / polinux-functions
Created August 18, 2017 21:49
Bash Basic Functions
#!/usr/bin/env bash
# Bash Colors
green=$(tput setaf 2)
red=$(tput setaf 1)
white=$(tput setaf 7)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
purple=$(tput setaf 5)
cyan=$(tput setaf 6)
bold=$(tput bold)
@pozgo
pozgo / I2C_LCD_driver.py
Created March 9, 2017 23:38
I2C LCD Driver
#!/usr/bin/python
# i2c bus (0 -- original Pi, 1 -- Rev 2 Pi)
I2CBUS = 1
# LCD Address
ADDRESS = 0x3f
import smbus
from time import sleep
@pozgo
pozgo / tmux-install.sh
Last active January 20, 2017 12:08
Tmux Installation
#!/usr/bin/env bash
# Supports only Linux(RedHat/Centos/Fedora) and OSX
# Bash Colors
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
white=`tput setaf 7`
bold=`tput bold`
reset=`tput sgr0`
separator=$(echo && printf '=%.0s' {1..100} && echo)
@pozgo
pozgo / polinux-orange.tmuxtheme
Last active January 20, 2017 11:23
Polinux Tmux Theme
#
# Powerline Orange Block - Tmux Theme
# Created by Jim Myhrberg <contact@jimeh.me>.
#
# Inspired by vim-powerline: https://github.com/Lokaltog/powerline
#
# Requires terminal to be using a powerline compatible font, find one here:
# https://github.com/Lokaltog/powerline-fonts
#
@pozgo
pozgo / .tmux.conf
Created January 20, 2017 10:38
Tmux Configuration File
set-option -g prefix C-a
set-option -g -q mouse on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-online-status'
@pozgo
pozgo / zsh-install.sh
Last active January 20, 2017 13:34
zsh-install
#!/usr/bin/env bash
# Supports only Linux(RedHat/Centos/Fedora) and OSX
# Bash Colors
red=`tput setaf 1`
green=`tput setaf 2`
yellow=`tput setaf 3`
white=`tput setaf 7`
bold=`tput bold`
reset=`tput sgr0`
separator=$(echo && printf '=%.0s' {1..100} && echo)
@pozgo
pozgo / .zshrc
Last active January 20, 2017 13:33
export ZSH=$HOME/.oh-my-zsh
export TERM="xterm-256color"
export LANG="en_US.UTF-8"
ZSH_THEME="powerlevel9k/powerlevel9k"
plugins=(git bundler osx rake ruby zsh-completions)
source $ZSH/oh-my-zsh.sh
[[ -e ~/.bashrc ]] && emulate sh -c 'source ~/.bashrc'
# Custom Settings
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
#!/bin/bash
# dnsmasq restarting snippet. Works with El Capitan 10.11.x and Sierra 10.12
sudo killall -9 mDNSResponder; sudo killall -9 dnsmasq
echo "DNS Restarted"