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 / keybase.md
Created July 22, 2015 07:08
keybase.md

Keybase proof

I hereby claim:

  • I am ravens on github.
  • I am yangrunenberger (https://keybase.io/yangrunenberger) on keybase.
  • I have a public key whose fingerprint is 6C48 D00E 7D21 691B F6E3 E534 A31B A19F D370 7427

To claim this, I am signing this object:

@ravens
ravens / gist:4056fff9330798787b70c4c393423edf
Last active December 6, 2016 09:09
oneliner shell pour km de bouchon sous sytadin
curl -s http://www.sytadin.fr/sys/barometre_courbe_cumul.jsp.html | xmllint --html --xpath '//*[@id="main_content"]/p[1]/strong/text()' --format - 2>/dev/null | grep -E -o "[0-9]+"
Avec timestamp :
echo `date +'%s'`","`curl -s http://www.sytadin.fr/sys/barometre_courbe_cumul.jsp.html | xmllint --html --xpath '//*[@id="main_content"]/p[1]/strong/text()' --format - 2>/dev/null | grep -E -o "[0-9]+"`
@ravens
ravens / gist:b65fe139cd0d51f43814fc1b8a55c4de
Created April 12, 2017 06:53
Geoloc of mastodon instances
curl https://instances.mastodon.xyz/instances.json | jq '.[].name'| xargs -I '{}' geoiplookup '{}' | grep "GeoIP Country Edition:" | wc -l
523
curl https://instances.mastodon.xyz/instances.json | jq '.[].name'| xargs -I '{}' geoiplookup '{}' | grep "GeoIP Country Edition: FR" | wc -l
209
curl https://instances.mastodon.xyz/instances.json | jq '.[].name'| xargs -I '{}' geoiplookup '{}' | grep "GeoIP Country Edition: US" | wc -l
172
@ravens
ravens / Dockerfile
Created August 2, 2017 06:33
OpenLTE in a Docker
# Build : docker build -t openlte --rm .
# Run : docker run -it --privileged --rm -v /dev/bus/usb:/dev/bus/usb --network=host openlte
# then inside the terminal : source /pybombs/setup_env.sh && LTE_fdd_enodeb
# from the main PC, open a new terminal and run : telnet 0 30000
# need to change band, configure Ki/IMSI and start the radio....
FROM pybombs/pybombs-prefix
MAINTAINER Yan Grunenberger <yan@grunenberger.net>
RUN apt-get -qy update
RUN pybombs install openlte
RUN /pybombs/lib/uhd/utils/uhd_images_downloader.py
@ravens
ravens / madrid_opendata_no2.txt
Last active April 15, 2018 22:53
Madrid API Air quality
Maps : http://www.mambiente.munimadrid.es/sica/scripts/index.php
Raw data : http://www.mambiente.munimadrid.es/opendata/horario.txt
Code using those URL :
https://github.com/superzen/desktop-air-mad/blob/96e290c7661e4e89162e3bad2c440d4368edc60d/datasource/ayuntamientoMadridRepository.js
https://github.com/allancalderon/checkapp_webserver_pollution/blob/53e9249af3e76b668d2c228dc63ce88fc36762fe/pollution/geocode.php
https://github.com/blayhem/airmon/blob/494e0cd1ab0270095a303ffd568d89047f22557b/air.js#L45
Example of station (Mendez Alvaro, id = 47) : http://www.mambiente.munimadrid.es/opencms/opencms/calaire/SistemaIntegral/SistVigilancia/Estaciones/E47.html
http://www.mambiente.munimadrid.es/opencms/opencms/calaire/SistemaIntegral/SistVigilancia/Estaciones/E47.html -> codigo 28079047
to be converted into : 28079047 -> 28,079,047
@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
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 / 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
@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 / 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"