$ mkdir -p beaglelfs/{sources,rootfs_install,boot_mnt,rootfs_mnt}
Download the latest i686 Binary TAR of the ARM GNU/Linux (glibc-based) Lite Toolchain:
/* SPIDER -- a sample adventure game, by David Matuszek. | |
Consult this file and issue the command: start. */ | |
:- dynamic at/2, i_am_at/1, alive/1. /* Needed by SWI-Prolog. */ | |
:- retractall(at(_, _)), retractall(i_am_at(_)), retractall(alive(_)). | |
/* This defines my current location. */ | |
i_am_at(meadow). |
""" | |
Demo of json_required decorator for API input validation/error handling | |
""" | |
import inspect | |
import functools | |
import json | |
from traceback import format_exception | |
from flask import jsonify, request | |
import sys |
#!/bin/bash | |
set -ve | |
lxc-create -n vpn -t ubuntu | |
# ln -s /var/lib/lxc/vpn/config /etc/lxc/auto/vpn.conf | |
perl -i -ple 's/#lxc.aa_profile = unconfined/lxc.aa_profile = unconfined/' /etc/lxc/auto/vpn.conf | |
perl -i -ple 's/^exit 0/# exit 0/' /etc/rc.local | |
cat >>/etc/rc.local <<hello | |
mkdir -p /var/lib/lxc/vpn/rootfs/dev/net/ |
This Gist is created in 2014, and it's highliy outdated now, according to one of mitmproxy
's manjor contributor (check his comment below). Thanks for letting us know, @mhils!
Modern applications usually make use of back-end API servers to provide their services. With a non-transparent HTTPs proxy, which intercepts the communication between clients and servers (aka the man-in-the-middle scheme), you can easily manipulate both API requests and responses.
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
# | |
# Bash script to setup headless Selenium (uses Xvfb and Chrome) | |
# (Tested on Ubuntu 12.04) | |
# Add Google Chrome's repo to sources.list | |
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
# Install Google's public key used for signing packages (e.g. Chrome) | |
# (Source: http://www.google.com/linuxrepositories/) |
# Remove every file except "./somefile.txt" and the directory "./somedir". | |
# --prune-empty to remove empty commits. | |
git filter-branch --tree-filter "find . -not -path './.git' -not -path './.git/*' -not -path './somefile.txt' -not -path './somedir/*' -not -path './somedir' -delete" --prune-empty |