Skip to content

Instantly share code, notes, and snippets.

@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 / _deploy.sh
Last active January 9, 2022 20:31
Deploy a jekyll site to a s3 bucket including gzip compression of html/js/css files
#!/bin/bash -x
# Deploy a jekyll site to a s3 bucket with gzip compression of html/js/css files
#
# To use - place in your root directory of your jekyll
# site, and edit the BUCKET="<YOUR_S3_BUCKET>" variable at the top
# to reflect the S3 bucket you're uploading to.
#
# You will need to have jekyll, and s3cmd already setup
# (and it relies upon standard *nix utilities like find,
@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)
@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 / 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>
@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

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 / create_chart.py
Created September 10, 2017 20:08
Generate OpenIOC Chart
from graphviz import Digraph
edges = set()
dot = Digraph(graph_attr={
'overlap':'false',
'outputorder':'edgesfirst'
})
ioc = dot.node('OpenIOC')
@xlfe
xlfe / terms.csv
Created September 10, 2017 20:10
curl http://openioc.org/terms/Current.iocterms | grep data-type | sed -E 's/^.* text=\"([^\"]+).*$/\1/g' > terms.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
ArpEntryItem/CacheType
ArpEntryItem/IPv4Address
ArpEntryItem/Interface
ArpEntryItem/PhysicalAddress
CookieHistoryItem/BrowserName
CookieHistoryItem/BrowserVersion
CookieHistoryItem/CookieFlags
CookieHistoryItem/CookieName
CookieHistoryItem/CookiePath
CookieHistoryItem/CookieValue