Skip to content

Instantly share code, notes, and snippets.

View dweinstein's full-sized avatar
🚀
LFG

David Weinstein dweinstein

🚀
LFG
View GitHub Profile
@dweinstein
dweinstein / gist:9550105
Created March 14, 2014 15:32
Cached docker build
Uploading context 4.608 kB
Uploading context
Step 0 : FROM ubuntu
---> 9cd978db300e
Step 1 : MAINTAINER David Weinstein <david@bitjudo.com>
---> Using cache
---> 67aeca8f12ae
Step 2 : RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
---> Using cache
---> be8f73b1204f
@dweinstein
dweinstein / Dockerfile
Created March 14, 2014 15:37
testProject
FROM ubuntu
MAINTAINER David Weinstein <david@bitjudo.com>
# install our dependencies and nodejs
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install python-software-properties git build-essential
RUN add-apt-repository -y ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get -y install nodejs
@dweinstein
dweinstein / Bad-Dockerfile
Last active August 29, 2015 13:57
Avoid doing an `npm install` after an `ADD .` command
FROM ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install python-software-properties git build-essential
RUN add-apt-repository -y ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get -y install nodejs
WORKDIR /opt/app
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.14 (Darwin)
owGbwMvMwMW4qkN+F5u5ewLj6QPvkhiClZ2Dq5WS8lMqlayqlbJTwVRaZl56alFB
UWZeiZKVkkWiWbKhuWGyZVJyarKRsaFlSpJBUqqZUWKihYVhWlKigZmxuYm5mYGS
jlJGfjFIB9CYpMTiVL3MfKAYkBOfmQIUdXQEqndzckRSXwqWsDSztExKNE1MTbU0
sEg2NUpNMUpKMjZOMk0yT7VIMgArLE4tykvMTQWqTilPzcwrLgESSrU6SkDxsszk
VJCrofLpmSUZpUn49JRUFoAEy1OT4qHa45My81KAngbqKkstKs7Mz1OyMgSqTC7J
BOk3NLY0sTC0tDQy1lFKrSjILEqNzwSpMDU3szAAAh2lgqLUMqCRxmaGliYpZokp
JolGJkamliZpKRZAaJZmnmSabJSUamJkbpmUkpSYZmxhaGZkkJJsYmGRap5sYGqW
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"
#!/bin/bash
#Basic set up for an Application AndroidManifest Fuzzer
#this requires a preexisting ant buildable application project to be set up! so get the SDK and ant1.8
#this file reproduces the bug mentioned here http://ibrahimbalic.com/2014/android-os-memory-corruption-bug/
#NOTE: values from 260000 and up cause SIGSEGvs to be sent to the system_server (test on KitKat 4.4.2)
#NOTE: you should probably monitor $(adb logcat)||(/system/bin/gdbserver) for responsiveness to the issue
APP_PROJ_DIR="..." #<-- PATH TO PROJ DIR
APP_PACKAGE_NAME="..." #<-- PACKAGE NAME
APP_LAUNCH_COMP="..." # <--- MAIN ACTIVITY NAME
@dweinstein
dweinstein / Data Mining Books.md
Last active May 25, 2022 16:37
Free Data Mining books

Source: http://christonard.com/12-free-data-mining-books/

  • An Introduction to Statistical Learning with Applications in R by James, Witten, Hastie & Tibshirani – This book is fantastic and has helped me quite a bit. It provides an overview of several methods, along with the R code for how to complete them. 426 Pages.
  • The Elements of Statistical Learning by Hastie, Tibshirani & Friedman – This is an in-depth overview of methods, complete with theory, derivations & code. I’d definitely consider this a graduate level text. I’d also consider it one of the best books available on the topic of data mining. 745 Pages.
  • A Programmer’s Guide to Data Mining by Ron Zacharski – This one is an online book, each chapter downloadable as a PDF. It’s also still in progress, with chapters being added a few times each year. Probabilistic Programming & Bayesian Methods for Hackers by Cam Davidson-Pilson – This book is absolutely fantastic. The author explains Bayesian statistics, provides several diverse examples of how to a
N: ns0=http://schemas.android.com/apk/res/android
E: manifest (line=2)
A: ns0:versionCode(0x0101021b)=(type 0x10)0x5f66a185
A: ns0:versionName(0x0101021c)="15.0.1162.61541" (Raw: "15.0.1162.61541")
A: ns0:installLocation(0x010102b7)=(type 0x10)0x0
A: package="com.opera.browser" (Raw: "com.opera.browser")
E: uses-sdk (line=0)
A: ns0:minSdkVersion(0x0101020c)=(type 0x10)0xb
A: ns0:targetSdkVersion(0x01010270)=(type 0x10)0x11
E: permission (line=3)
@dweinstein
dweinstein / gist:debc10e13624cab4dcc1
Created September 4, 2014 17:08
walk a graph and generate an array of objects
function walk(obj) {
function root(key) {
return {key: key, text: key};
}
function node(parent, key, leaf) {
key = typeof key == 'number' ? String(key) : key;
parent = typeof parent == 'number' ? String(parent) : parent;
return {key: key, text: key, parent: parent, leaf: leaf};
}
@dweinstein
dweinstein / virustotal.js
Last active August 29, 2015 14:08
VirusTotal cacheing API
var restify = require('restify');
var jsonschema = require('jsonschema');
var lodash = require('lodash');
var util = require('util');
var fmt = util.format;
var Promise = require('bluebird');
var config = require('config').virustotal;
var logger = require('../logger');