This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws iam list-roles --profile sandbox --query "Roles[?RoleName == 'ABC']" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup IPs for two laptops | |
PC1 (master0 | |
IP - 192.168.1.2 | |
mask 255.255.255.0 | |
gw - 192.168.1.2 | |
PC2 (slave - live cd) | |
IP - 192.168.1.3 | |
mask 255.255.255.0 | |
gw - 192.168.1.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name '.gitlab-ci.yml' | ack -x -A 4 dependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prepares pendirve so i can install bootable os iso on it | |
umount | |
umount /dev/sdb1 | |
dd if=/dev/zero of=/dev/sdb bs=1M count=10 | |
cgdisk /dev/sdb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "http://tinygraphs.com/isogrids/$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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Demonstrate Bash | |
[Service] | |
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))" | |
ExecStart=/usr/bin/ech "2 + 2 = ${MYVAR}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker stats $(docker ps --format '{{.Names}}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; \ | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat file.txt | ssh develop "cat >> /tmp/file.txt" |