# Please define variables
packageName=<packageName>
packageVersion=<packageVersion>
# Create a new tab
brew tap-new local/$packageName
#!/bin/bash | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# exclude list - pipe sepearted e.g. ".terraform|test|foldername" | |
EXCLUDE=".terraform" | |
# Let the person running the script know what's going on. | |
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" |
--- | |
- name: Capture files in path and register | |
shell: > | |
ls -1 /path/to/files | |
register: files | |
- name: Remove files except specified | |
file: | |
path: "/path/to/files/{{ item }}" | |
state: absent |
For every command you enter with kubectl (if you have enough permissions) you can alternatively specify the namespace --namespace=default
<service>.<namespace>.svc.cluster.local
kubectl get nodes -o json | grep "\"address\": \"" | uniq | sort | awk '{print $2}'
### SUPERVISORD ### | |
RUN \ | |
apt-get update && \ | |
apt install -y \ | |
supervisor &&\ | |
mkdir -p /var/log/supervisor && \ | |
mkdir -p /etc/supervisor/conf.d | |
ADD supervisor.conf /etc/supervisor.conf | |
### SUPERVISORD ### |
I wrote this script to keep a file or a folder in sync local or remotely. This worked out very well to sync changes in the code to a remote server in seconds without touching any button on my keyboard. The method to check if anything has changed is even simpler. It checks the file or folder last change date 'ls --full-time'.
Set the variable path to a directory or file. This could be a remote path aswell.
FP_rsync_from='/folder/from'
FP_rsync_to='/folder/to'
# Switch User | |
su - | |
#General informations | |
printf "\nHostname: \n" && hostname && ip a s |grep "inet " | |
#Install Packages | |
apt install -y bash-completion vim curl wget git | |
#LAMP |
eval will set the variable to use Docker without the need to start "Docker Quickstart Terminal" eval takes a string as its argument, and evaluates it as if you'd typed that string on a command line. (If you pass several arguments, they are first joined with spaces between them.) eval $(docker-machine env)
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
# Composition of the containers | |
owncloud: | |
image: owncloud | |
ports: | |
- 80:80 | |
volumes_from: | |
- owncloud-data | |
links: | |
- postgres:owncloud-db |