Quantcast
Channel: Evilprofessor.co.uk » Code snippets
Browsing all 5 articles
Browse latest View live

Move a file to a subdirectory of the same name

A quick bash one liner to create and move a set of files in a directory to a sub-directory of the same name: IFS=$'\n'; for i in `find . -maxdepth 1 -type f`; do echo "$i"; dir=${i%.*}; \ echo "$dir";...

View Article



Generate a self-signed certificate

Quickly generate a self-signed certificate on the command line. Noting this information as the original source has disappeared and its handy to have around. mkdir -p /etc/certs openssl req -new \ -x509...

View Article

Image may be NSFW.
Clik here to view.

Protecting node.js from BEAST TLS attack

Copyright Disney, I don’t think they’ll sue me. Thanks for the image. After reading Eric Martindale‘s very useful blog post on “Mitigating TLS BEAST attack in node.js” I decided to implement this for...

View Article

NGINX configuration for proxing to websocket/nodejs processs

Here’s a simple configuration to allow nginx to proxy through to another process including forwarding websocket traffic. A simple set up currently in use to proxy to a nodejs process which is also...

View Article

Image may be NSFW.
Clik here to view.

Book Review: Instant Mock testing with PowerMock

I was recently asked to review “Instant Mock testing with PowerMock” by PacktPub. Part of their “instant” series which aims to get you up and running with a project quickly. My review follows. This...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images