Skip to content

Instantly share code, notes, and snippets.

View lebowitz's full-sized avatar

Craig Lebowitz lebowitz

  • Bonterra
  • Washington, DC
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
@lebowitz
lebowitz / find_sql.ps1
Created June 28, 2023 18:28
Find Sql Servers On A Network
$nets = ('10.10.10.0/24');
foreach($subnet in $nets) {
$fn = "$($subnet.Replace('/','_')).txt"
c:\installs\nmap\nmap.exe $subnet -p T:1433 --min-parallelism 4 -Pn -oG $fn | Out-Null
gc $fn | select-string open
}
# DONE
# 10.11.75.0/24
# 10.10.2.14/24
@lebowitz
lebowitz / Jenkins444Rental.md
Last active May 20, 2017 15:59
Jenkins Row Unit 444 Rental Ad

1391 PENNSYLVANIA AVE SE UNIT 444

Contact Emily at 410-533-6182 or eas628@gmail.com

Available July 1. $2,300/month rent.

Location

Capitol Hill at the corner of Pennsylvania Ave and Potomac Ave, SE. Across the street from Potomac Ave Metro Station on the Blue, Orange, and Silver lines. Two station stops from the US Capitol.

@lebowitz
lebowitz / logstash.bat
Created December 8, 2015 14:30
General purpose logstash bootstrap
set LS_OPTS="-v "
set CLASSPATH=%~dp0\sqljdbc42.jar
set JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_66
..\logstash-1.5.4\bin\logstash agent --verbose -f "%~dp0\logstash.conf"

Keybase proof

I hereby claim:

  • I am lebowitz on github.
  • I am lebowitz (https://keybase.io/lebowitz) on keybase.
  • I have a public key whose fingerprint is 53DA F35A F717 2CF9 2061 171A F08F 2CC2 E867 13BF

To claim this, I am signing this object:

#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
#!/bin/sh
echo ">>>> Shell Copy >>>>"
echo ""
HOST=$1
BIN=`which scp`
if test -z $HOST
then
echo "You must specify a hostname or ip address as the first argument"
exit 1
fi