Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
tuxfight3r / validate_zone.py
Last active January 22, 2018 09:30
Ansible Filter to Validate a IP address and give out the corresponding zone.
#!/usr/bin/python
# Date: 21/01/2018
# Author: Mohan Balasundaram
# File path: filter_plugins/validate_zone.py
# Purpose: script to validate ip address and issue the corresponding zone name
# the ip belongs to and if the ip doesnt match the range, it will give the default "NA"
import ipaddress
class FilterModule(object):
@doctorpangloss
doctorpangloss / install_caffe.sh
Last active October 16, 2024 14:28
Installing Caffe on Mac 10.11.5 and later in the 10.11 series, and 10.12.1 and later in the 10.12 series
#!/bin/sh
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Apple hides old versions of stuff at https://developer.apple.com/download/more/
# Install the latest XCode (8.0).
# We used to install the XCode Command Line Tools 7.3 here, but that would just upset the most recent versions of brew.
# So we're going to install all our brew dependencies first, and then downgrade the tools. You can switch back after
# you have installed caffe.
# Install CUDA toolkit 8.0 release candidate
# Register and download from https://developer.nvidia.com/cuda-release-candidate-download
@tuxfight3r
tuxfight3r / sslserver_notes.txt
Last active February 13, 2022 03:28
openssl tricks
#connect to ssl site
openssl s_client -connect ip:port
#vhost connect
openssl s_client -servername mysite.co.uk -connect mysite.co.uk:443
#Reading CSR
openssl req -noout -text -in uat-mobi.scotrail.co.uk.csr
#Reading certificates