Skip to content

Instantly share code, notes, and snippets.

@JoeMyers
JoeMyers / raspbian-python3.6.rst
Created August 30, 2019 08:40 — forked from dschep/raspbian-python3.6.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).
@JoeMyers
JoeMyers / get_uniq_ip_country.sh
Created August 29, 2019 14:28
cut unique ip's out of IIS log and get the country from it
cat u_ex190822.log | grep -o -P '.*5/.*cfg.{0,1000}' | sed 's/.*- 443 -//' | sed 's/HTTP\/1\.1.*//' | uniq -u | while read line ; do echo "\n$line:: "; curl -s https://ipapi.co/$line/country; sleep 1; done
If you need to make additional configuration changes, you can modify
the settings in `./bwdata/config.yml` and then run:
`./bitwarden.sh rebuild` or `./bitwarden.sh update`
@JoeMyers
JoeMyers / splitFile.ps1
Created July 30, 2018 11:34
Split file into 100MB
## CREDIT: https://stackoverflow.com/a/11010158/8110037
$from = "C:\temp\large_log.txt"
$rootName = "C:\temp\large_log_chunk"
$ext = "txt"
$upperBound = 100MB
$fromFile = [io.file]::OpenRead($from)
$buff = new-object byte[] $upperBound
function l(x){
console.log(x)
}
$("button, #btn, .btn a").click(function(){
var td = $(this).data();
l("i_customer: " + $("#i_customer").val())
if ($("#i_parent").val() != 0) {
l("i_parent: " + $("#i_parent").val())
}