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
function openstack-cli() { | |
docker run -it --rm $(env | grep OS_ | sed 's/=.*//;s/^/--env /' | tr '\n' ' ') -v /etc/hosts:/etc/hosts gitlab.int.catalystcloud.nz:4567/catalystcloud/openstack-cli --insecure $@ | |
} | |
source openrc.sh | |
openstack-cli coe cluster config stas-test |
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
sudo apt-get update | |
sudo apt-get install docker-compose | |
mkdir ~/youtube-dl | |
cd ~/youtube-dl | |
cat >docker-compose.yml<<EOF | |
version: '3' | |
services: | |
youtube-dl: | |
build: |
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
[void@stas-console ~]$ VAR='qwe asd erty dfgh vbn' | |
[void@stas-console ~]$ echo $(awk -v var="$VAR" 'BEGIN { count=split(var,fields," "); print fields[count-2] }') | |
erty |
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
[void@stas-console ~]$ cat /tmp/t | |
foo=bar | |
boo=baz | |
zee=roo=zag | |
# this prints changed file but doesn't write changes to file | |
[void@stas-console ~]$ sed -e 's/=/="/' -e 's/$/"/g' -e 's/^/export /g' /tmp/t | |
export foo="bar" |
OlderNewer