Skip to content

Instantly share code, notes, and snippets.

View WebMaestroFr's full-sized avatar

Etienne Baudry WebMaestroFr

View GitHub Profile
@hofmannsven
hofmannsven / README.md
Last active February 2, 2024 20:47
Raspberry Pi Cheatsheet
@olliefr
olliefr / gdmpydemo.py
Created April 4, 2017 00:11
Google Distance Matrix API Python client example
# Google Distance Matrix Python Demo
# ==================================
#
# How to set up (Local part)
# --------------------------
#
# Must have Python (>= 3.4) installed with 'requests' library. On Windows, maybe try
# Anaconda Python? It has a 'conda' package manager, make sure 'requests' is installed.
#
# How to set up (Internet part)
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
#!/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
@wkjagt
wkjagt / remove_script_tags.php
Last active November 12, 2020 06:26
Remove script tags from html
<?php
function removeDomNodes($html, $xpathString)
{
$dom = new DOMDocument;
$dom->loadHtml($html);
$xpath = new DOMXPath($dom);
while ($node = $xpath->query($xpathString)->item(0)) {
$node->parentNode->removeChild($node);
}
@Lewiscowles1986
Lewiscowles1986 / adapter-passthrough
Last active March 11, 2019 20:27
Allows passthrough for bridges, wireless access-point's and range extenders
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
ADAPTER="eth0"
# Allow overriding from eth0 by passing in a single argument