Skip to content

Instantly share code, notes, and snippets.

View CarlosLannister's full-sized avatar
🎯
Focusing

Carlos Cilleruelo CarlosLannister

🎯
Focusing
View GitHub Profile
#!/bin/bash
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get remove docker docker-engine docker.io* lxc-docker*
# install dependencies 4 cert
@CarlosLannister
CarlosLannister / kibana-guest-nginx
Last active February 13, 2022 13:41
Nginx configuration for kibana guest access
server {
server_name YOUR_DOMAIN;
listen 443 ssl;
ssl on;
ssl_certificate ROUTE_TO_SSL.cer;
ssl_certificate_key ROUTE_TO_SSL.pem;
location / {
proxy_set_header Host $proxy_host;
- 3coresec.rules
- app-layer-events.rules
- botcc.portgrouped.rules
- botcc.rules
- ciarmy.rules
- compromised.rules
- decoder-events.rules
- dhcp-events.rules
- dnp3-events.rules
- dns-events.rules
@CarlosLannister
CarlosLannister / zeek.yml
Last active October 5, 2020 13:32
Filebeat zeek.yml file
# Module: zeek
# Docs: https://www.elastic.co/guide/en/beats/filebeat/7.9/filebeat-module-zeek.html
- module: zeek
capture_loss:
enabled: true
var.paths: ["/opt/zeek/logs/current/capture_loss.log"]
connection:
enabled: true
import osmnx as ox
place = ["Berlin, Germany"]
G = ox.graph_from_place(place, retain_all=True, simplify = True, network_type='all')
import osmnx as ox
center_point = (40.4168, -3.7038)
G = ox.graph_from_point(center_point, dist=15000, retain_all=True, simplify = True, network_type='all')
# Lists to store colors and widths
roadColors = []
roadWidths = []
for item in data:
if "length" in item.keys():
if item["length"] <= 100:
linewidth = 0.10
color = "#a6a6a6"
for item in data:
if "footway" in item["highway"]:
color = "#ededed"
linewidth = 0.25
else:
color = "#a6a6a6"
linewidth = 0.5
roadWidths.append(linewidth)
#Center of the map
latitude = 40.4168
longitude = -3.7038
#Limit borders
north = latitude + 0.15
south = latitude - 0.15
east = longitude + 0.15
west = longitude - 0.15
import networkx as nx
import osmnx as ox
center_point = (40.4168, -3.7038)
G1 = ox.graph_from_point(center_point, dist=15000, dist_type='bbox', network_type='all',
simplify=True, retain_all=True, truncate_by_edge=False,
clean_periphery=False, custom_filter='["natural"~"water"]')
G2 = ox.graph_from_point(center_point, dist=15000, dist_type='bbox', network_type='all',