Skip to content

Instantly share code, notes, and snippets.

View ravens's full-sized avatar
🏠
Working from home

Yan Grunenberger ravens

🏠
Working from home
View GitHub Profile
@ravens
ravens / Vagrantfile
Last active April 4, 2022 10:32
Antrea+BGP Lab using Vagrant + vmware/virtualbox (M1 compatible)
# -*- mode: ruby -*-
# vi: set ft=ruby :
def emulated
m1 = `sysctl -n sysctl.proc_translated 2>/dev/null`
if $?.success?
Integer(m1)
else
0
end
@ravens
ravens / Dockerfile
Created July 28, 2021 05:44
Dcokerfile for pycrate/corenet
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get -yq install build-essential git python3-dev libsctp-dev python3-pip
WORKDIR /root
RUN pip3 install pycrypto
RUN git clone https://github.com/mitshell/CryptoMobile.git
WORKDIR /root/CryptoMobile
RUN python3 setup.py install
WORKDIR /root
@ravens
ravens / Dockerfile
Created July 1, 2021 14:01
Dockerfile for srsRAN EPC
FROM ubuntu:20.04 as builder
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -yq --no-install-recommends \
cmake \
libuhd-dev \
uhd-host \
libboost-program-options-dev \
libfftw3-dev \
libmbedtls-dev \
libsctp-dev \
@ravens
ravens / foobar.yaml
Created November 18, 2020 19:53
sample deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: foobar-deployment
labels:
app: foobar
spec:
replicas: 1
selector:
matchLabels:
@ravens
ravens / test.yaml
Created November 3, 2020 17:30
nodePort service bug sample
apiVersion: apps/v1
kind: Deployment
metadata:
name: python-server-deployment
labels:
app: python-server
spec:
replicas: 2
selector:
matchLabels:
@ravens
ravens / vyos_iso_download.py
Created April 4, 2019 10:30
Latest rolling VyOS ISO URL+hash scraper
#!/usr/bin/python
from bs4 import BeautifulSoup
import requests
import json
base_url = "https://downloads.vyos.io/"
iso_url = base_url + "?dir=rolling/current/amd64"
base_hash_url = base_url + "?hash="
hash_type = "sha1"
@ravens
ravens / gist:4fb15b24293e2c1a9f169a3a6c09f414
Last active February 6, 2019 22:29
RTSP servers in oneliner
cvlc -v v4l2:///dev/video0:chroma="H264":width=1920:height=1080:fps=30 --sout="#rtp{sdp=rtsp://:8554/live}"
cvlc -v v4l2:///dev/video0:chroma="H264":width=1920:height=1080:fps=30 --live-caching=20 --sout-ts-dts-delay 100 --sout-udp-caching 20 --file-caching=0 --sout="#rtp{sdp=rtsp://:8554/live}"
@ravens
ravens / gist:236875db251b781f8650c0c6b88e26ba
Created September 25, 2018 05:36
checksum error on Scaleway ARM server
tcpdump -i eth0 port 4500 -vvv -nn
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
07:31:14.463350 IP (tos 0x0, ttl 54, id 0, offset 0, flags [DF], proto UDP (17), length 160)
REDACTEDIP1.4500 > REDACTEDIP2.4500: [bad udp cksum 0x258c -> 0x5b7d!] UDP-encap: ESP(spi=0xc4f6f449,seq=0x14), length 132
Lu sur FRNOG :
Tu appuies sur "1 4 7" tu gardes enfoncé et tu l'allumes,
Tu fais 7 6 2 0 0
Dans le menu service, tu coches "metering"
Cette manip est prévue pour des S810 ou des S650 calibrés, sur le 530 ca doit te donner un menu tout pourri en haut du téléphone avec :
@ravens
ravens / airquality_mendezalvaro_madrid_homekit_nodered.json
Created April 15, 2018 22:59
A virtual Air Quality sensor for NO2 values collected by the public sensor of Mendez Alvaro Air quality monitoring station in Madrid, Spain.
[{"id":"40bc1d3e.3f85ec","type":"http request","z":"41266fec.5eb1a8","name":"Hourly OpenData Madrid ","method":"GET","ret":"txt","url":"http://www.mambiente.munimadrid.es/opendata/horario.txt","tls":"","x":385.5,"y":39,"wires":[["2fad41b7.6ee53e"]]},{"id":"c4898b5.673edf8","type":"inject","z":"41266fec.5eb1a8","name":"10s then every 20m","topic":"","payload":"","payloadType":"date","repeat":"1200","crontab":"","once":true,"onceDelay":"10","x":138.5,"y":41,"wires":[["40bc1d3e.3f85ec"]]},{"id":"2fad41b7.6ee53e","type":"csv","z":"41266fec.5eb1a8","name":"parse CSV-like","sep":",","hdrin":"","hdrout":"","multi":"one","ret":"\\n","temp":"zone,city,station,sensor,unknown1,unknown2,year,month,day,1h,1v,2h,2v,3h,3v,4h,4v,5h,5v,6h,6v,7h,7v,8h,8v,9h,9v,10h,10v,11h,11v,12h,12v,13h,13v,14h,14v,15h,15v,16h,16v,17h,17v,18h,18v,19h,19v,20h,20v,21h,21v,22h,22v,23h,23v,0h,0v","skip":"0","x":614.5,"y":34,"wires":[["cfa50f56.ffe908"]]},{"id":"cfa50f56.ffe908","type":"switch","z":"41266fec.5eb1a8","name":"Filter MendezAlvaro Sta