Skip to content

Instantly share code, notes, and snippets.

View TomaszKlosinski's full-sized avatar
💭
#StandWithUkraine 🇺🇦

Tomasz Klosinski TomaszKlosinski

💭
#StandWithUkraine 🇺🇦
View GitHub Profile
@TomaszKlosinski
TomaszKlosinski / install_xelatex_on_mac.txt
Created February 1, 2024 13:28 — forked from taesiri/install_xelatex_on_mac.txt
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew cask install basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2020basic/bin/x86_64-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
@TomaszKlosinski
TomaszKlosinski / check_open_ports
Created November 30, 2023 10:04 — forked from adige/check_open_ports
Check open ports without netstat or lsof
declare -a array=($(tail -n +2 /proc/net/tcp | cut -d":" -f"3"|cut -d" " -f"1")) && for port in ${array[@]}; do echo $((0x$port)); done
@TomaszKlosinski
TomaszKlosinski / playbook.yml
Created May 9, 2019 14:48
Run Ansible task host by host
- name: start and enable rabbitmq (run task host by host)
service:
name: "rabbitmq-server"
state: "started"
enabled: true
delegate_to: "{{ item }}"
with_items: "{{ groups['rabbitmq'] }}"
run_once: true
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
@TomaszKlosinski
TomaszKlosinski / keybase.md
Last active December 8, 2018 17:54
keybase.md

Keybase proof

I hereby claim:

  • I am TomaszKlosinski on github.
  • I am tomaszklosinski (https://keybase.io/tomaszklosinski) on keybase.
  • I have a public key whose fingerprint is F7E0 D5E0 352D 9BA9 13EB 845F E625 2FC0 6087 ED6F

To claim this, I am signing this object:

@TomaszKlosinski
TomaszKlosinski / pedantically_commented_playbook.yml
Created July 11, 2018 07:52 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@TomaszKlosinski
TomaszKlosinski / molecule.yml
Created May 16, 2017 12:33
Molecule configuration for testing Ansible role of a systemd-based service in a docker container
---
dependency:
name: galaxy
driver:
name: docker
docker:
containers:
@TomaszKlosinski
TomaszKlosinski / circle.yml
Created May 16, 2017 09:42
CircleCI configuration file to test ansible roles on docker containers using molecule
---
machine:
python:
version: 2.7.10
services:
- docker
dependencies:
pre:
@TomaszKlosinski
TomaszKlosinski / .travis.yml
Created May 16, 2017 09:41
Travis CI configuration file to test ansible roles on docker containers using molecule
---
sudo: required
language: python
services:
- docker
before_install: