Skip to content

Instantly share code, notes, and snippets.

@lucabelluccini
lucabelluccini / dnsmasq-ingest-pipeline
Last active February 24, 2019 11:00
Elasticsearch Ingest Pipeline for DNSMasq
PUT _ingest/pipeline/dnsmasq
{
"description": "DNSMASQ Log Processor",
"processors": [
{
"dissect": {
"field": "message",
"pattern": "%{datetime} dnsmasq[%{?pid}]: %{message_body}"
}
},
@lucabelluccini
lucabelluccini / install_beats_on_arm.md
Created February 23, 2019 16:37
Install Beats on ARM

On a remote host:

git clone https://github.com/elastic/beats.git
cd beats
# checkout the version via tag
make crosscompile on the product
# pick the binaries and copy them

On the ARM system:

@lucabelluccini
lucabelluccini / ssh-jump.txt
Created December 12, 2018 01:07
How to perform SSH jump
Using ProxyJump with SSH and SCP
By Paul Heinlein | Nov 2, 2017
It’s somewhat common to have what’s known as a “jump host” serve as an SSH gateway to a remote network. You use ssh to log into the jump host (or “jump server”) and from there use ssh to log into an internal host that’s not directly accessible from the Internet.
With the release of ssh version 7.3, the OpenSSH folks made it easier to do the jump and internal login in one step.
The Old Way
I’ve used the ProxyCommand for some time now, relying on nc to push SSH traffic over an established tunnel. Without going into the gory details, the process boils down to
@lucabelluccini
lucabelluccini / youtube-domains.txt
Last active March 16, 2019 12:14
Domains of Youtube
googlevideo.com
m.youtube.com
youtu.be
youtube-ui.l.google.com
youtube.com
youtube.l.google.com
ytimg.com
ytimg.l.google.com
ytstatic.l.google.com
www.youtube.com
#!/bin/bash
# Raspberry Pi microSD card benchmark script.
#
# A script I use to automate the running and reporting of benchmarks I compile
# for: http://www.pidramble.com/wiki/benchmarks/microsd-cards
#
# Usage:
# # Run it locally.
# $ sudo ./microsd-benchmarks.sh
@lucabelluccini
lucabelluccini / AndroidAndChromeOS.md
Last active June 10, 2018 12:01
Android / ChromeOS

Docker on RPi

  • To install docker, just run curl -sSL https://get.docker.com | sh and add the user via sudo usermod -aG docker <user> or sudo setfacl -m user:$USER:rw /var/run/docker.sock
  • At least on 2017-12, on Raspbian Stretch, add to the file /boot/cmdline.txt the kernel parameter cgroup_memory=1 and cgroup_enable=memory
  • At least on 2017-12, on Raspbian Stretch, run sudo sysctl -w net.ipv4.ip_forward=1 to let docker port forward
  • Most common images can be found via docker search arm32v6 or docker search rpi
  • For Docker compose: sudo apt install -y python-pip and sudo pip install docker-compose

Useful links

@lucabelluccini
lucabelluccini / LinksWSL.md
Last active March 16, 2019 12:20
WSL Windows useful links