Skip to content

Instantly share code, notes, and snippets.

‏‏‎ Eating github stars for breakfast.

Andrzej Rehmann hoto

‏‏‎ Eating github stars for breakfast.
Block or report user

Report or block hoto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Setup IPs for two laptops
PC1 (master0
IP -
gw -
PC2 (slave - live cd)
IP -
gw -
# cgdisk is graphical
sudo cgdisk /dev/sda
sgdisk -o /dev/sda
sgdisk -n 1::+256MiB -u 1:fbf5660e-0474-4361-8b8f-22d8049e6920 -t 1:EF00 /dev/sda
sgdisk -n 2::+1024MiB -u 2:05ee6a32-f7ca-4379-9ac9-80cf6c63933b -t 2:8300 /dev/sda
sgdisk -n 3::+20480MiB -u 3:c522f8fe-01ee-433d-8642-e0c897e817aa -t 3:8304 /dev/sda
sgdisk -n 4::-9MiB -u 4:a086c08d-49f8-48ba-918d-e38d912d734b -t 3:BF01 /dev/sda
sgdisk -n 9::+8MiB -u 9:c3935f60-0315-427c-ac5b-db1808a72112 -t 3:BF07 /dev/sda
dd if=/dev/urandom of=/dev/sda3 bs=1MiB count=10
find . -name '.gitlab-ci.yml' | ack -x -A 4 dependencies
# prepares pendirve so i can install bootable os iso on it
umount /dev/sdb1
dd if=/dev/zero of=/dev/sdb bs=1M count=10
cgdisk /dev/sdb
for folder in $(ls); \
do CURRENT=$(ls ./$folder/) && echo CURRENT=$CURRENT && cp /avatars/blue/$folder.png ./$folder/$CURRENT; done
for name in $(seq 1 1000); \
do echo name=$name && wget --quiet -O $name.svg "$name?theme=seascape&numcolors=4&size=240&fmt=svg" & done
for name in $(seq 1 1000); \
do echo name=$name && inkscape -z -e $name.png -w 240 -h 240 $name.svg; done
hoto / systemd-prblm.service
Created Jun 27, 2017 — forked from nickjacob/systemd-prblm.service
execute arbitrary bash code/variable substitution in systemd units
View systemd-prblm.service
Description=Demonstrate Bash
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))"
ExecStart=/usr/bin/ech "2 + 2 = ${MYVAR}"
hoto /
Created Jun 22, 2017
docker stats (cpu, memory) with container names
docker stats $(docker ps --format '{{.Names}}')
hoto /
Created Jun 13, 2017
add forward agent to ssh config
for ip in $(fleetctl list-machines | cut -f 2); \
do \
ssh core@$ip \
bash -c "\
hostname && \
echo -e 'Host * \n ForwardAgent yes\n StrictHostKeyChecking no' > ~/.ssh/config && \
cat ~/.ssh/config"; \
hoto /
Created Jun 11, 2017
copy text file to remote server over ssh
cat file.txt | ssh develop "cat >> /tmp/file.txt"
hoto / ansible_append_line.yml
Created Jun 7, 2017
append line in file using ansible
View ansible_append_line.yml
- name: kernel and python-chardet updates are disabled
path: /etc/dnf/dnf.conf
regexp: '(\s+exclude=.*)$'
replace: '\1 kernel* python-chardet'
become: yes
You can’t perform that action at this time.