Skip to content

Instantly share code, notes, and snippets.

View jtyr's full-sized avatar
🐧

Jiri Tyr jtyr

🐧
View GitHub Profile
@jtyr
jtyr / VirtualBoxKickstart.md
Last active February 23, 2024 01:38
How to use kickstart in VirtualBox

How to use kickstart in VirtualBox

This short howto describes how to install VMs via kickstart in VirtualBox. It's using PXE functionality built into the NAT network mode of the VirtualBox. The following instructions apply to CentOS installation but it should work for any RedHat-based distro.

Prepare directory structure

@jtyr
jtyr / corporate-linux-desktop-howto.md
Created November 3, 2015 17:09 — forked from anonymous/corporate-linux-desktop-howto.md
How to run Linux desktop in a corporate environment

How to run Linux desktop in a corporate environment

DISCLAIMER

Some of the practices described in this HOWTO are considered to be illegal as they often break internal corporate policies. Anything you do, you do at your own risk.

@jtyr
jtyr / Gitwebmarkdown
Last active January 3, 2017 15:49 — forked from nemoo/Gitwebmarkdown
Tampermonkey script for chrome to display README.md files rendered as html from markdown in gitweb
// ==UserScript==
// @name Gitwebmarkdown
// @version 0.2
// @description Renders readme files in markdown.
// @include http://yourserverhere.com/git/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
// @require https://cdn.rawgit.com/showdownjs/showdown/1.3.0/dist/showdown.min.js
// ==/UserScript==
var converter = new showdown.Converter();
@jtyr
jtyr / docker_image_builder.yaml
Last active September 25, 2022 15:45
Ansible Playbook to build multiple Docker images without any Dockerfile (requires Ansible v2.0)
---
### Inventory hosts file should contain this:
# test1 docker_source_image=centos:7
# test2 docker_source_image=centos:7
###
### Run the playbook like this:
# ansible-playbook -i hosts --diff ./docker_image_builder.yaml
###
@jtyr
jtyr / jtyr.zsh-theme
Last active February 23, 2025 22:24
jtyr's theme for oh-my-zsh
# jtyr's theme for oh-my-zsh
# Color shortcuts
RED=$fg_bold[red]
GREEN=$fg_bold[green]
YELLOW=$fg_bold[yellow]
BLUE=$fg_bold[blue]
CYAN=$fg_bold[cyan]
RESET=$reset_color
@jtyr
jtyr / Makefile
Last active April 27, 2016 11:30
Bundle and unbundle local Git repos
###
#
# This Makefile helps to bundle and unbundle local Git repos. Directories
# containing bare repos should end with `.git` (e.g. `mybarerepo.git`).
#
###
DIRS = $(shell find . -type d -maxdepth 1)
BUNDLES = $(filter-out $(wildcard *.git.bundle), $(wildcard *.bundle))
BUNDLES_BARE = $(wildcard *.git.bundle)
@jtyr
jtyr / hostsfile.py
Last active April 25, 2019 10:35
Ansible dynamic inventory script that reads any Ansible hosts file and transforms it into the JSON data structure.
This was moved to https://github.com/jtyr/ansible-ini_inventory
@jtyr
jtyr / sshpass_issue.txt
Created September 22, 2016 13:35
Set of steps which help to reproduce the issue when connection with sshpass through a proxy
# Create SSH keys to be able to use localhost as the proxy
ssh-keygen
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_key
chmod 700 ~/.ssh
# Create the SSH config
cat >~/.ssh/config <<END
Host *
# !!!Make sure this directory exists!!!
@jtyr
jtyr / Vagrantfile
Last active January 4, 2017 17:19
Vagrantfile with external configuration
Move to https://github.com/jtyr/vagrantfile_config
@jtyr
jtyr / rpm_deps_tree.sh
Created May 5, 2017 09:29
Bash function which helps to print out the RPM dependency tree for a specific package.
function walk() {
if [ $1 == 0 ]; then
echo -n "" > /tmp/deps;
fi
echo $2 >> /tmp/deps;
for N in $(seq $1); do
echo -n ' ';
done
echo -n '- ';
echo $2;