Skip to content

Instantly share code, notes, and snippets.

@xlfe
xlfe / private_health_variables.txt
Last active August 29, 2015 13:58
Private Health Insurance - Variables that make up a policy in Australia
This is a list of all the variables that Private Health Funds in Australia define for their policies
(and are required to provide to consumers and in one PDF per policy on the Private Health
Insurance Ombudsman website at www.privatehealth.gov.au). There are almost 40,000 plans available
in Australia currently.
Hospital.GapCoverProvided
State
Category
ProductType
@xlfe
xlfe / disable-non-usb.sh
Created April 19, 2014 00:43
Disable non-USB drives in linux
#!/bin/bash
for d in $(find /sys/block -type l -name "sd*")
do
if [ -z "$(readlink -f $d | grep -i usb)" ]
then
echo "$d is a non-USB device, disabling access"
sudo bash -c "echo 1 > $d/device/delete"
else
echo "$d is a USB device"
@xlfe
xlfe / screenshot.jpg
Last active October 4, 2015 05:44
Test one
screenshot.jpg
@xlfe
xlfe / gist:8660411
Last active January 4, 2016 18:28
Facebook for Android Background Services
I wanted to see how many of Facebook for Android's background services I could
disable and still have a functioning Facebook app.
Using the 'DisableService' app
https://play.google.com/store/apps/details?id=cn.wq.disableservice
(I've also disabled all permissions using AppOps except for the camera).
### Versions
Android 4.2.2 (Rooted)

Keybase proof

I hereby claim:

  • I am xlfe on github.
  • I am felixb (https://keybase.io/felixb) on keybase.
  • I have a public key whose fingerprint is B8A0 2DB9 3753 397B 6370 F99C A1DB 190F D1C0 E873

To claim this, I am signing this object:

@xlfe
xlfe / generate_ioc_chart.py
Last active September 14, 2017 22:26
convert an xml openIOC (Stuxnet) to a graphical form
from graphviz import Digraph
from lxml import etree, objectify
import random
#https://stackoverflow.com/questions/30232031/how-can-i-strip-namespaces-out-of-an-lxml-tree
def strip_ns_prefix(tree):
query = "descendant-or-self::*[namespace-uri()!='']"
for element in tree.xpath(query):
element.tag = etree.QName(element).localname
return tree
@xlfe
xlfe / make_docset.sh
Created October 26, 2017 00:46
Bash script that generates a Kapeli Dash docset for the google-cloud-java API Docs
#!/bin/bash
wget http://kapeli.com/javadocset.zip
unzip javadocset.zip
wget https://github.com/GoogleCloudPlatform/google-cloud-java/archive/gh-pages.zip
unzip gh-pages.zip google-cloud-java-gh-pages/latest/apidocs/*
./javadocset google-cloud-java google-cloud-java-gh-pages/latest/apidocs/
@xlfe
xlfe / numpy_os_x_10_9.sh
Last active February 12, 2018 17:24 — forked from goldsmith/numpy_os_x_10_9.sh
How to install numpy, scipy and scikit-learn on OS X 10.9 Mavericks
# Pre-requsites:
# X-code 5.0.1 with command line tools
# Homebrew, homebrew python, homebrew pip
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
export CC=gcc-4.2
export CXX="g++ -arch i386 -arch x86_64"
brew install gfortran
@xlfe
xlfe / CVE-download.py
Last active March 10, 2018 23:26
CVE and CWEs to CSV files
# coding: utf-8
# #CVE and CWE formatting to TSV
# In[217]:
from jsonpath_ng import jsonpath, parse
import csv
@xlfe
xlfe / NIB-J20-N0500S.xml
Created April 18, 2014 09:07
Private Health Insurance - Example XML File
<?xml version="1.0"?>
<Product xmlns="http://admin.privatehealth.gov.au/ws/Schemas" ProductID="cbccc173-486f-413d-b01f-2aa14e17da34" FundID="669a2e89-165a-4419-b1a8-f1e01db76178" ProductCode="J20/N0500S" Iteration="9" Status="Approved" StatusDate="2014-02-13T11:19:00" DateModified="2014-02-04T12:06:00" DateCreated="2014-02-04T12:06:00" PublishDate="01-Apr-14 00:00" DateApproved="2014-02-13T11:19:44">
<FundCode>NIB</FundCode>
<TableCode>J20</TableCode>
<Name>Basic Saver $250 Excess</Name>
<ProductStatus>Open</ProductStatus>
<DateValidFrom>2014-04-01</DateValidFrom>
<DateIssued>2014-04-01</DateIssued>
<State>NSW</State>
<Category>Single</Category>