Skip to content

Instantly share code, notes, and snippets.

Davide Bertola davibe

  • Vercelli/Torino, Piedmont, Italy
Block or report user

Report or block davibe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rrweb_1570639615140_1570639666360.json
[
{
"type": 4,
"data": {
"href": "http://localhost:1234/workflow1.html",
"width": 877,
"height": 927
},
"timestamp": 1570639615140
},
@davibe
davibe / laptop_thinnest_2019.md
Created Nov 9, 2019
Thinnest 15" laptops (macbook pro alternatives) - 2019
View laptop_thinnest_2019.md
@davibe
davibe / monopattini_torino_email_bezzon_municipale.txt
Last active Nov 9, 2019
Monopattini torino email bezzon municipale
View monopattini_torino_email_bezzon_municipale.txt
Davide ----
Salve,
Mi scuso per il disturbo. Ho provato a cercare chiarimenti tramite la email generica della polizia municipale ma ho ricevuto risposte che non mi sono sembrate aderenti alle mie domande. Per questo motivo ho deciso di scrivere direttamente a lei.
In questi giorni molto del rumore causato dalle vicende legate alla mobilità elettrica si basano sul fatto che la polizia equipara i monopattini a motocicli. Il riferimento normativo su cui vi basate non mi sembra sia direttamente il codice della strada, ma piuttosto il "decreto del 31
gennaio 2003". Tale decreto è stato emanato per recepire una direttiva europea del 2002.
Rif: https://www.asaps.it/1705-decreto_31_gennaio_2003__gu_n_123_del_29-5-2003-_suppl_ordinario_n86.html
Nel 2013 però è stato emanato un altro regolamento europeo "168/2013" che è del tutto analogo alla direttiva del 2002 ma rende chiaro che i mezzi che non hanno un posto a sedere sono esclusi esattamente come i mezzi per disabili e i mezzi che costruttivamente vanno a meno di
@davibe
davibe / network_security_config.xml
Created Aug 21, 2019
app/src/main/res/xml/network_security_config.xml
View network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
@davibe
davibe / architecture-with-type-intersection-based-DI.swift
Last active Nov 10, 2018
Using protocol composition (intersection types) as simple DI in Swift
View architecture-with-type-intersection-based-DI.swift
// Providers
class Provider1 { }
protocol HasProvider1 { var provider1: Provider1 { get } }
class Provider2 { }
protocol HasProvider2 { var provider2: Provider2 { get } }
// a Provider that depends on the other two needs to be configured
protocol Configurable {
func configure(providerBag: HasProviders)
@davibe
davibe / rpicam-gstreamer.txt
Created Oct 19, 2018 — forked from muellermartin/rpicam-gstreamer.txt
Stream video from Raspberry Pi with camera attached to CSI port via RTP (UDP) using GStreamer
View rpicam-gstreamer.txt
Useful Links:
- http://stackoverflow.com/questions/25941171/how-to-get-gstreamer1-0-working-with-v4l2-raspicam-driver
- http://raspberrypi.stackexchange.com/questions/26675/modern-way-to-stream-h-264-from-the-raspberry-cam
- http://stackoverflow.com/questions/13154983/gstreamer-rtp-stream-to-vlc
- http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtp/README
- http://archpi.dabase.com/#sending-and-receiving-pi-camera-video-over-the-network
- http://emmanuelgranatello.blogspot.de/2013/10/raspberry-pi-gstreamer-streaming-h264.html
- http://stackoverflow.com/questions/15712983/why-rtp-streaming-of-a-avi-video-file-fails-to-be-received
View rpi_3_bplus_wifiapclientbridge_configure.sh
sudo apt-get update && sudo apt-get install -y hostapd dnsmasq iptables-persistent
export DEBIAN_FRONTEND=noninteractive
export ID=$(cat /sys/class/net/wlan0/address | sed 's/://g')
export AP_NAME=AP_$(date +%s)
export AP_PASS=raspberry
export WIFI_NAME=wifi_name
export WIFI_PASS=wifi_password
sudo bash -c 'cat > /etc/network/interfaces.d/ap' << EOF
@davibe
davibe / rpi_zero_w_wifiapclientbridge_configure.sh
Last active Sep 29, 2018 — forked from lukicdarkoo/configure.sh
Raspberry Pi: AP + client mode
View rpi_zero_w_wifiapclientbridge_configure.sh
#!/bin/sh
# The script configures simultaneous AP and Managed Mode Wifi on Raspberry Pi Zero W (should also work on Raspberry Pi 3)
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/6b92d182d37d0a10400060d8344f86e4/raw | sh -s WifiSSID WifiPass APSSID APPass
# Licence: GPLv3
# Author: Darko Lukic <lukicdarkoo@gmail.com>
# Special thanks to: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/
MAC_ADDRESS="$(cat /sys/class/net/wlan0/address)"
CLIENT_SSID="${1}"
CLIENT_PASSPHRASE="${2}"
@davibe
davibe / kotlinStructuredConcurrency.kt
Created Nov 13, 2017
Example of structured concurrency in Kotlin
View kotlinStructuredConcurrency.kt
import kotlinx.coroutines.experimental.*
import kotlinx.coroutines.experimental.channels.Channel
import java.util.*
/*
* Structured concurrency means that child co-routines should die when their father dies
* http://libdill.org//structured-concurrency.html
*
* In kotlin in order to have parent->child relationship you need to explicitly pass
* the coroutineContext to the child coroutine.
@davibe
davibe / kotlin_channels_combineLatest.kt
Created Nov 12, 2017
I tried to implement combineLatest for kotlin channels with corutines
View kotlin_channels_combineLatest.kt
import kotlinx.coroutines.experimental.channels.Channel
import kotlinx.coroutines.experimental.delay
import kotlinx.coroutines.experimental.launch
import kotlinx.coroutines.experimental.runBlocking
import kotlinx.coroutines.experimental.selects.select
import java.util.*
/*
* Combine multiple channels into one `output` channel.
You can’t perform that action at this time.