Skip to content

Instantly share code, notes, and snippets.

View lebowitz's full-sized avatar

Craig Lebowitz lebowitz

  • Searchlight Development
  • Washington, DC
  • 15:28 (UTC -05:00)
  • LinkedIn in/lebowitz
View GitHub Profile
@lebowitz
lebowitz / extract_har.py
Last active February 6, 2024 15:13 — forked from Lewiscowles1986/extract_har.py
Python 3 script to extract images from HTTP Archive (HAR) files
import json
import base64
import os
import pathlib
from urllib.parse import urlparse
# list of supported image mime-types
# Special thanks to https://gist.github.com/FurloSK/0477e01024f701db42341fc3223a5d8c
# Special mention, and thanks to MDN
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
#get root access
$su -
$ cd /tmp
#Remove old Ruby
$ yum remove ruby
# Install dependencies
$ yum groupinstall "Development Tools"
$ yum install zlib zlib-devel
@lebowitz
lebowitz / backup.sh
Last active August 29, 2015 13:57 — forked from karussell/backup.sh
# TO_FOLDER=/something
# FROM=/your-es-installation
DATE=`date +%Y-%m-%d_%H-%M`
TO=$TO_FOLDER/$DATE/
echo "rsync from $FROM to $TO"
# the first times rsync can take a bit long - do not disable flusing
rsync -a $FROM $TO
# now disable flushing and do one manual flushing
@lebowitz
lebowitz / es.sh
Last active December 20, 2015 01:09 — forked from AVVS/es.sh
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless curl -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.2.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share