Skip to content

Instantly share code, notes, and snippets.

View fhightower's full-sized avatar
🎯
Focusing

Floyd fhightower

🎯
Focusing
View GitHub Profile
@fhightower
fhightower / emphasize_lines_increment
Created May 15, 2017 15:07
Increment :emphasize-lines: numbers
import os
import re
# read a file or define a variable that is a string here...
# this defines how much you would like to add to the values (can be a negative number)
delta = 2
matches = re.findall(':emphasize-lines: (.*)', file_text)
@fhightower
fhightower / indicator_complete_info.py
Last active May 12, 2017 13:23
Function to get all available data about an indicator in ThreatConnect.
def get_complete_indicator_data(indicator_object):
"""Function to get all available data about an indicator."""
# start off with the basic indicator information
indicator_data = indicator_object.json
# remove the description attribute of the json as we will this more completely later
del indicator_data['description']
indicator_data['associated_groups'] = list()
indicator_data['associated_indicators'] = list()
@fhightower
fhightower / blockade_io.sh
Created March 15, 2017 19:40
Installing Blockade.io on a Linux Server
# for more info on Blockadeio, see: https://github.com/blockadeio/cloud_node
# install necesary libraries
sudo apt-get update;
sudo apt install -y python-pip python-dev libssl-dev libffi-dev mongodb-server;
sudo pip install virtualenv;
sudo apt-get install -y git;
# clone the https repo
git clone https://github.com/blockadeio/cloud_node.git;