Skip to content

Instantly share code, notes, and snippets.

View Urunov's full-sized avatar
🏆
Focusing

Hamdamboy Urunov

🏆
Focusing
View GitHub Profile
@Urunov
Urunov / gist:cd8f3a9284eccc38f7bbe5c9ba37f7c8
Created August 23, 2022 11:06
GET Client MAC and UUID in JAVA
public static String getMacAddress() throws Exception {
String macAddress = null;
String command = "ifconfig";
String osName = System.getProperty("os.name");
System.out.println("Operating System is " + osName);
if (osName.startsWith("Windows")) {
command = "ipconfig /all";
} else if (osName.startsWith("Linux") || osName.startsWith("Mac") || osName.startsWith("HP-UX")
@Urunov
Urunov / GET MAC adddress and IP address
Created August 23, 2022 10:11
GET MAC Address and IP address
package org.example;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Enumeration;
/**
* @project: ${MAC_IP}
@Urunov
Urunov / backend pom.xml
Last active August 18, 2020 13:30
Spring Boot and GraphQL integration maven dependency configuration.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>generate-resources</phase>