Skip to content

Instantly share code, notes, and snippets.

import apt, apt.debfile
import pathlib, stat, shutil, urllib.request, subprocess, getpass, time, tempfile
import secrets, json, re
import IPython.utils.io
import ipywidgets
import os
from IPython.display import clear_output
class _NoteProgress(apt.progress.base.InstallProgress, apt.progress.base.AcquireProgress, apt.progress.base.OpProgress):
def __init__(self):
#include <iostream>
class Ulong {
private:
long long value;
public:
Ulong(long long x) : value(x){}
~Ulong(){}
friend bool operator ==(const Ulong x1, const Ulong x2){
return x1.value == x2.value;
}
@bphucc
bphucc / get_mac_address.cpp
Created October 25, 2021 03:21
Get local device's MAC address.
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "WS2_32")
#include <iphlpapi.h>
#pragma comment(lib, "iphlpapi")
#define IP_LOCALHOST 0x0100007F
void print_ip(DWORD nAddr)
{