Skip to content

Instantly share code, notes, and snippets.

View besmirzanaj's full-sized avatar

Besmir Zanaj besmirzanaj

  • Toronto, ON
View GitHub Profile
@besmirzanaj
besmirzanaj / ntp_servers.md
Last active April 19, 2024 18:21
some Official Government NTP stratum 1&2 servers

List of Official Stratum 1-2 public Time Dissemination Service over NTP

This list is generated from BIPM - International Bureau of Weights and Measures

more information - https://www.bipm.org/en/about-us.

I will list only publicly avaialable servers, not the ones that require you to have prior requests for access (eg. Australia).

Time Dissemination service is documented here as of April 2024

@besmirzanaj
besmirzanaj / technitium-sync.sh
Last active July 8, 2024 20:44
synch two technitium servers
#!/bin/bash
# Author: Besmir Zanaj, 2024
# This is a very raw script to backup configs (no logs and no stats) from a technitium server
# to another
#
# first create two tokens: one on the source server and another one on the destination one
# fill out the vars below
# create a cronjob with this script on the destinaton host
# eg:
@besmirzanaj
besmirzanaj / eds_pin_calculator.sh
Created February 16, 2023 17:10
calculate cert pin
#!/bin/bash
# EDS Certificate pin calculator
# 2023, Besmir Zanaj
# Usage:
# /ets_pin_calculator.sh <CERT_FILE>
# This script will calulate the EDS cert pin for a certificate file.
# More info in RFC-7469 - https://www.rfc-editor.org/rfc/rfc7469#section-2.1.1
@besmirzanaj
besmirzanaj / gist:44285988853ee171d3a219ea07ea1c7d
Created March 18, 2021 21:27 — forked from DanHam/gist:f2c860e925b269782c6f037798e08372
How to set up for and use Packer's Amazon Import post-processor
Packer has the ability to import Virtualbox OVA artifacts into AWS
using Amazons Import/Export feature. There are a number of prerequisites,
the setup of which are detailed below.
1. Create an S3 bucket to hold uploaded temporary build artifacts
$ aws s3 mb s3://my-organisation.com-eu-west-1-vmimport-bucket --region eu-west-1
make_bucket: s3://my-organisation.com-eu-west-1-vmimport-bucket/

An Ansible summary

Patterns

  • all (or *)
  • hostname: foo.example.com
  • groupname: webservers
  • or: webservers:dbserver
  • exclude: webserver:!phoenix
  • intersection: webservers:&amp;staging
### Keybase proof
I hereby claim:
* I am besmirzanaj on github.
* I am besmirzanaj (https://keybase.io/besmirzanaj) on keybase.
* I have a public key ASC6Or-qwENIhD35L9YdkxDzGjojzhFbaT0IkHjMy1t_tgo
To claim this, I am signing this object:
a script in you bashrc to sync locally your repos
alias gitdown='find . -name .git -type d | xargs -n1 -P4 -I% git --git-dir=% --work-tree=%/.. pull -v --progress'
@besmirzanaj
besmirzanaj / docker-learning-ref.note.md
Created May 30, 2018 03:51 — forked from aursu/docker-learning-ref.note.md
URLs related to docker (Training, Examples etc)
@besmirzanaj
besmirzanaj / check_ssl_key_crt.sh
Last active June 8, 2018 19:37
check if a certificate was generated by provided key
#!/bin/bash
# check certificate if it is generated from this key
# usage check_ssl_key_crt.sh "key file" "certificate"
[ $# -eq 0 ] && { echo "Usage: $0 'key file' ' ' 'cert file'" exit 999; }
if [[ $((openssl x509 -noout -modulus -in $2 | openssl md5 | awk '{print $2}'; openssl rsa -noout -modulus -in $1 | openssl md5 | awk '{print $2}') | uniq -c | wc -l) -eq 1 ]]
then printf "Everything ok with this certificate.\n It was generated by key $1\n"
else printf "Certificate $2 compromised or generated with another key."
fi
@besmirzanaj
besmirzanaj / bash-cheatsheet.sh
Created August 31, 2017 15:17 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04