- vipe
- xclip
sudo apt-get -y moreutils xclip
| #!/usr/bin/env bash | |
| if [ -z "$1" ]; then | |
| echo "Missing container name parameter" | |
| echo " Using:" | |
| echo " poke <running_container_name>" | |
| exit(1) | |
| fi | |
| CONTAINER_NAME=$1 |
| #!/usr/bin/env sh | |
| echo Checking if the service port is available | |
| until nc -z <service> <port>; do | |
| printf '.' | |
| sleep 5 | |
| done | |
| echo Service available starting app | |
| exec $@ |
| cat <<EOS > /etc/docker/daemon.json | |
| { | |
| "bip": "192.168.1.5/24", | |
| "fixed-cidr": "192.168.1.5/25", | |
| "fixed-cidr-v6": "2001:db8::/64", | |
| "mtu": 1500 | |
| } | |
| EOS | |
| systemctl restart docker |
| class Driver | |
| class << self | |
| def list | |
| @list ||= {} | |
| end | |
| def add_subclass(subclass_name, subclass) | |
| list.store subclass_name, subclass | |
| puts "Added subclass #{subclass_name} -> #{subclass}" |
| docker stop $(docker ps -q) && docker rm $(docker ps -aq) && docker volume ls --format '{{.Name}}' | grep -v 'database' | xargs docker volume rm |
| docker stop $(docker ps -q) && docker rm $(docker ps -aq) && docker volume ls --format '{{.Name}}' | grep -v 'database' | xargs docker volume rm |
| # Calculate the euclidean distance between two arrays | |
| # Example: | |
| # euclidean_distance([1,2], [3,4]) #=> 2.8284271247461903 | |
| # euclidean_distance([1,2,3], [4,5,6]) #=> 5.196152422706632 | |
| def euclidean_distance(vector1, vector2) | |
| Math.sqrt(vector1.zip(vector2).collect { |a,b| (a - b)**2 }.sum) | |
| end |
| M104 S0 ;extruder heater off | |
| M140 S0 ;heated bed heater off | |
| G91 ;relative positioning | |
| G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure | |
| G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more | |
| G90 ;absolute positioning | |
| G1 X0 Y0 F3600 ;move extruder out of the way by moving the baseplate to the front for easier access to printed object | |
| M84 ;steppers off | |
| M300 S300 P1000 ;alert beep | |
| M82 ;absolute extrusion mode |