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.
This file contains 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
#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 |
This file contains 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
#!/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 |
This file contains 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
#!/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 |
This file contains 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
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 |
This file contains 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
# 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 \ |
This file contains 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
#!/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) |