###To laptop
Specify an IP address to eth0 (here 192.168.56.1)
sudo ifconfig eth0 192.168.56.1 netmask 255.255.255.0
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'
The only information that aren't fetched are:
%B
: raw body (unwrapped subject and body)%GG
: raw verification message from GPG for a signed commit#!/usr/bin/env python3 | |
# Copyright: Witold Baryluk, 2019-2024. MIT license | |
# This small program takes one parameter, a binary (or library), and outputs | |
# a dependency graph. This is done recursively for all subdependencies. | |
# Some common dependencies are ignored like this ones to glibc basic libraries. | |
# The ones related to stdc++ / gcc are not ignored (otherwise the graph would be very dense). | |
# | |
# To generate and render dependency graph in one go, use something like this: |
#!/usr/bin/env bash | |
# Clear out all previous attempts | |
rm -rf "/tmp/source-git/" | |
# Get the dependencies for git, then get openssl | |
sudo apt-get install build-essential fakeroot dpkg-dev -y | |
sudo apt-get build-dep git -y | |
sudo apt-get install libcurl4-openssl-dev -y | |
mkdir -p "/tmp/source-git/" |
#!/bin/bash | |
# | |
# This version uses September 2017 august stretch image, please use this image | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi |
#!/bin/bash | |
# Script to convert a *simple* CSV file into an HTML table | |
# Will fail if field data contains comma or newlines | |
# | |
# USAGE: bash csv2html.sh CSV_FN [BORDER_WIDTH] > OUTPUT_HTML_FN | |
usage (){ | |
echo "USAGE: $0 CSV_FN [BORDER_WIDTH] > OUTPUT_HTML_FN" | |
echo "Examples:" | |
echo "$0 /tmp/input.csv > /tmp/output.html" |
import urlparse | |
import httplib | |
import base64 | |
proxy_uri = "http://user:password@proxy_host:proxy_port" | |
host = 'www.google.com' | |
port = 443 | |
url = urlparse.urlparse(proxy_uri) | |
conn = httplib.HTTPSConnection(url.hostname, url.port) |