This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eventconsumer | |
import ( | |
"context" | |
"fmt" | |
"math" | |
"os" | |
"time" | |
appconfig "github.com/custom/config" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, redirect, jsonify | |
import os | |
import secrets | |
import hashlib | |
import base64 | |
import requests | |
app = Flask(__name__) | |
# Requirement: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# source of how to process : http://stackoverflow.com/questions/27693120/convert-from-mac-to-ipv6 | |
# take the mac address: 52:74:f2:b1:a8:7f | |
# throw ff:fe in the middle: 52:74:f2:ff:fe:b1:a8:7f | |
# reformat to IPv6 notation 5274:f2ff:feb1:a87f | |
# convert the first octet from hexadecimal to binary: 52 -> 01010010 | |
# invert the bit at index 6 (counting from 0): 01010010 -> 01010000 | |
# convert octet back to hexadecimal: 01010000 -> 50 | |
# replace first octet with newly calculated one: 5074:f2ff:feb1:a87f |