Skip to content

Instantly share code, notes, and snippets.

Josh Joshfindit

Block or report user

Report or block Joshfindit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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)
@Joshfindit
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/
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 \
@Joshfindit
Joshfindit / README.md
Created Nov 30, 2016 — forked from fabiovalse/README.md
External SVG import & zoom
View README.md

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
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/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
@Joshfindit
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.