Skip to content

Instantly share code, notes, and snippets.


Josh Joshfindit

View GitHub Profile
#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)
Joshfindit / docker
Last active Jan 10, 2017 — forked from CliffordAnderson/docker
Docker Image for Neo4j 3.1 with just APOC (Spatial plugin not currently updated for 3.1)
View docker
# Adding APOC to Official Neo4j Docker Image
FROM neo4j:3.1
ENV NEO4J_PLUGINS_PATH /var/lib/neo4j/plugins/
RUN curl --fail --silent --show-error --location --output $NEO4J_APOC_FILE $NEO4J_APOC_URI \
Joshfindit /
Created Nov 30, 2016 — forked from fabiovalse/
External SVG import & zoom

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.

Joshfindit / dropbox-monit
Last active May 11, 2016 — forked from richhollis/dropbox-monit
Shell script for monit to keep the dropbox daemon running
View dropbox-monit
check process dropbox with pidfile /home/username/.dropbox/
start program = "/home/username/ start"
as uid username and gid username
stop program = "/home/username/ stop"
as uid username and gid username
# Installed to /etc/monit/conf.d/dropbox-monit
# Assumes that is installed at /home/username/
View visalloOnDigitalOcean.CentOS.2015-11-17
# 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
#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
Joshfindit / Looking for duplicates
Created Apr 16, 2014
Text analysis for word frequency (good for finding common words in marketing material)
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
You can’t perform that action at this time.