This example shows how to import an external SVG file into a web page. Furthermore, the D3 zoom bahaviour can be used for zoom in/out the image.
View clean_docker.sh
#!/bin/sh | |
#Exit `docker-compose run` containers | |
docker rm $(docker ps -a -f "name=_run_" -q) | |
#Make sure that exited containers are deleted. | |
docker rm -v $(docker ps -a -q -f status=exited) | |
#Remove unwanted ‘dangling’ images | |
docker rmi $(docker images -f "dangling=true" -q) |
View docker
# Adding APOC to Official Neo4j Docker Image | |
FROM neo4j:3.1 | |
ENV NEO4J_PLUGINS_PATH /var/lib/neo4j/plugins/ | |
ENV NEO4J_APOC_FILE apoc-3.1.0.3-all.jar | |
ENV NEO4J_APOC_URI https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.1.0.3/apoc-3.1.0.3-all.jar | |
RUN curl --fail --silent --show-error --location --output $NEO4J_APOC_FILE $NEO4J_APOC_URI \ |
View dropbox-monit
check process dropbox with pidfile /home/username/.dropbox/dropbox.pid | |
start program = "/home/username/dropbox.py start" | |
as uid username and gid username | |
stop program = "/home/username/dropbox.py stop" | |
as uid username and gid username | |
# Installed to /etc/monit/conf.d/dropbox-monit | |
# Assumes that https://www.dropbox.com/download?dl=packages/dropbox.py is installed at /home/username/dropbox.py |
View visalloOnDigitalOcean.CentOS.2015-11-17
#!/bin/sh | |
# This is to be run on the DigitalOcean CentOS image | |
# create 8GB swap file | |
sudo fallocate -l 8G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
# Set swap file to mount on boot |
View visalloOnDigitalOcean.2015-11-04
#!/bin/sh | |
#This is to be run on the ubuntu docker image | |
#screen HIGHLY suggested - The steps take a while (esp the apache archive downloads) and are not fault-tolerant | |
#create 8GB swap file | |
sudo fallocate -l 8G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
#Set swap file to mount on boot |
View Looking for duplicates
#First, create a folder and copy the raw text from each page in to it's own text file. | |
#Example: harv_eker1.txt , harv_eker2.txt , harv_eker3.txt , and so on. | |
#Open a terminal window in that folder, and run the following: | |
cat *.txt | tr -d '[:punct:]' | tr ' ' '\n' | tr 'A-Z' 'a-z' | sort | uniq -c | sort -rn | |
#most-used words will be at the top |