Skip to content

Instantly share code, notes, and snippets.

View AlliotTech's full-sized avatar
🎯
Maker、DevOps、SRE

Alliot AlliotTech

🎯
Maker、DevOps、SRE
View GitHub Profile
@AlliotTech
AlliotTech / sources.list
Created June 29, 2022 09:09 — forked from vczb/sources.list
Ubuntu 20.04 /etc/apt/sources.list
#deb cdrom:[Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1)]/ focal main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://br.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://br.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://br.archive.ubuntu.com/ubuntu/ focal-updates main restricted
@AlliotTech
AlliotTech / export-node-stats.md
Created July 1, 2022 01:53 — forked from ScriptingSquirrel/export-node-stats.md
Setup prometheus-node-exporter and push stats to Pushgateway with cron job

(Assuming a Debian 8-like system)

  • Install prometheus-node-exporter

    $ sudo apt update && sudo apt install prometheus-node-exporter
  • Configure prometheus-node-exporter to expose metrics only to localhost, not on to all networks. Modify file /etc/default/prometheus-node-exporter:

    # Set the command-line arguments to pass to the server.
@AlliotTech
AlliotTech / nginx-alertmanager-prometheus
Created July 5, 2022 08:25 — forked from albertogviana/nginx-alertmanager-prometheus
Nginx reverse proxy for Prometheus and Alertmanager
upstream @prometheus {
server MY_IP:9090;
}
upstream @alertmanager {
server MY_IP:9093;
}
server {
listen 80;
@AlliotTech
AlliotTech / install-dnscrypt-proxy.md
Created July 19, 2022 04:53 — forked from quinncomendant/install-dnscrypt-proxy.md
Instructions to install dnscrypt-proxy via Homebrew on macOS

Prevent DNS leaks on macOS by using dnscrypt-proxy. dnscrypt-proxy is available for installation via Homebrew, and comes configured to use OpenDNS servers. After installing, dnscrypt-proxy will always run in the background and encrypt all your DNS queries:

  1. Open Terminal.app (press Command+Space and type terminal and hit return).
  2. Run in Terminal app: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" and press enter/return key. Wait for the command to finish.
  3. Run in Terminal app: brew install dnscrypt-proxy and press enter/return key. Wait for the command to finish.
  4. Run a DNS leak test: click the Standard test and ensure all DNS servers are owned by opendns.com.
@AlliotTech
AlliotTech / grafana-dashboard-exporter
Created September 6, 2022 04:17 — forked from crisidev/grafana-dashboard-exporter
Command to export all grafana 2 dashboard to JSON using curl
KEY=XXXXXXXXXXXX
HOST="https://metrics.crisidev.org"
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json
done
@AlliotTech
AlliotTech / run.tpl
Created November 2, 2022 09:00 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@AlliotTech
AlliotTech / README.md
Created March 20, 2024 06:45 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@AlliotTech
AlliotTech / a-domain.html
Created September 16, 2024 10:38 — forked from ufologist/a-domain.html
跨域通信机制 - postMessage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>a-domain</title>
</head>
<body>
<h1>跨域通信机制 - postMessage</h1>
<h2>a-domian.html</h2>
<iframe class="js-iframe" src="http://localhost:3000/other-domain.html"></iframe>