Skip to content

Instantly share code, notes, and snippets.

View smortex's full-sized avatar
🌴
Eating 🥥 and ddrinking 🍹…

Romain Tartière smortex

🌴
Eating 🥥 and ddrinking 🍹…
View GitHub Profile
@smortex
smortex / enable-uart1-uart2-uart3-uart4-uart5.diff
Last active December 16, 2022 20:23
Enable UART on BeagleBone Black
Index: sys/gnu/dts/arm/am335x-bone-common.dtsi
===================================================================
--- sys/gnu/dts/arm/am335x-bone-common.dtsi (révision 326470)
+++ sys/gnu/dts/arm/am335x-bone-common.dtsi (copie de travail)
@@ -95,6 +95,40 @@
>;
};
+ uart1_pins: pinmux_uart1_pins {
+ pinctrl-single,pins = <
@smortex
smortex / backtrace
Created May 13, 2018 11:49
py-cryptography-with-libressl-2.7.3
λ ykman
Traceback (most recent call last):
File "/usr/local/bin/ykman", line 11, in <module>
load_entry_point('yubikey-manager==0.6.1', 'console_scripts', 'ykman')()
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
return ep.load()
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in load
return self.resolve()
--- templates/stretch/etc/fail2ban/jail.conf.erb.orig 2018-07-25 16:29:44.719352000 +0200
+++ templates/stretch/etc/fail2ban/jail.conf.erb 2018-07-25 16:41:19.272398000 +0200
@@ -1,855 +1,941 @@
#
+# THIS FILE IS MANAGED BY PUPPET
+# <%= file %>
+#
# WARNING: heavily refactored in 0.9.0 release. Please review and
# customize settings for your setup.
#
My traceroute [vUNKNOWN]
zappy.home.sigabrt.org (192.168.1.80) 2018-12-28T10:29:08-1000
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. 192.168.1.254 0.0% 4 6.5 6.0 5.3 6.5 0.6
2. 1.72.90.202.dsl.dyn.mana.pf 0.0% 4 7.5 8.9 7.5 10.9 1.6
3. 202.3.241.177 0.0% 4 10.1 8.3 7.2 10.1 1.3
4. 103.254.224.105 0.0% 4 8.3 8.0 6.6 8.7 0.9
5. 103.254.224.74
@smortex
smortex / vhost.pp
Created February 9, 2021 00:46
IAC-1186 issue
$hostname = 'service.example.com'
apache::vhost { $hostname:
port => 443,
docroot => "${dashboard_path}/public",
# [...]
}
apache::vhost { "${hostname}:5556":
servername => $hostname,
POST /_msearch HTTP/1.1
Host: localhost:9200
User-Agent: Grafana/8.5.6
Content-Length: 670
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Content-Type: application/x-ndjson
Dnt: 1
Sec-Fetch-Dest: empty
{
"request": {
"url": "api/datasources/proxy/1/_msearch",
"method": "POST",
"data": "{\"search_type\":\"query_then_fetch\",\"ignore_unavailable\":true,\"index\":\"samplerr-*\"}\n{\"size\":0,\"query\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":1656638495530,\"lte\":1656642095530,\"format\":\"epoch_millis\"}}},{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"service:\\\"disk\\\" AND host.keyword:(\\\"vps278346.vittoria.pro\\\") AND cfunc.keyword:\\\"avg\\\"\"}}]}},\"aggs\":{\"3\":{\"terms\":{\"field\":\"host.keyword\",\"size\":10,\"order\":{\"_key\":\"desc\"},\"min_doc_count\":1},\"aggs\":{\"4\":{\"terms\":{\"field\":\"service.keyword\",\"size\":10,\"order\":{\"_key\":\"desc\"},\"min_doc_count\":1},\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"min_doc_count\":0,\"extended_bounds\":{\"min\":1656638495530,\"max\":1656642095530},\"format\":\"epoch_millis\",\"interval\":\"20s\"},\"aggs\":{\"1\":{\"avg\":{\"field\":\"metric\"}}}}}}}}}}\n",
"hideFromInspecto
{
"request": {
"url": "api/datasources/proxy/1/_msearch",
"method": "POST",
"data": "{\"search_type\":\"query_then_fetch\",\"ignore_unavailable\":true,\"index\":\"samplerr-*\"}\n{\"size\":0,\"query\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":1656615403174,\"lte\":1656624084514,\"format\":\"epoch_millis\"}}},{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"service:\\\"memory\\\" AND host.keyword:(\\\"vps278346.vittoria.pro\\\") AND cfunc.keyword:\\\"avg\\\"\"}}]}},\"aggs\":{\"3\":{\"terms\":{\"field\":\"host.keyword\",\"size\":10,\"order\":{\"_key\":\"desc\"},\"min_doc_count\":1},\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"min_doc_count\":0,\"extended_bounds\":{\"min\":1656615403174,\"max\":1656624084514},\"format\":\"epoch_millis\",\"interval\":\"20s\"},\"aggs\":{\"1\":{\"avg\":{\"field\":\"metric\"}}}}}}}}\n",
"hideFromInspector": false
},
"response": {
"responses": [
{
{
"request": {
"url": "api/datasources/proxy/1/_msearch",
"method": "POST",
"data": "{\"search_type\":\"query_then_fetch\",\"ignore_unavailable\":true,\"index\":\"samplerr-*\"}\n{\"size\":0,\"query\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":1656640431659,\"lte\":1656642231660,\"format\":\"epoch_millis\"}}},{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"service:\\\"memory\\\" AND host.keyword:(\\\"vps278346.vittoria.pro\\\") AND cfunc.keyword:\\\"avg\\\"\"}}]}},\"aggs\":{\"3\":{\"terms\":{\"field\":\"host.keyword\",\"size\":10,\"order\":{\"_key\":\"desc\"},\"min_doc_count\":1},\"aggs\":{\"2\":{\"date_histogram\":{\"field\":\"@timestamp\",\"min_doc_count\":0,\"extended_bounds\":{\"min\":1656640431659,\"max\":1656642231660},\"format\":\"epoch_millis\",\"interval\":\"20s\"},\"aggs\":{\"1\":{\"avg\":{\"field\":\"metric\"}}}}}}}}\n",
"hideFromInspector": false
},
"response": {
"responses": [
{