Skip to content

Instantly share code, notes, and snippets.

View minhtran83's full-sized avatar

Minh Tran minhtran83

  • https://github.com/atlassian
  • Sydney, Australia
View GitHub Profile
@minhtran83
minhtran83 / git-aliases-export.sh
Created June 1, 2021 10:38 — forked from miguelbermudez/git-aliases-export.sh
Git Aliases from oh-my-zsh git plugin ported to fish shell
#
# Aliases
# (sorted alphabetically)
#
# GIT #
alias g 'git'
alias ga 'git add'
@minhtran83
minhtran83 / wget-jdk-oracle-install-example.txt
Created June 14, 2021 23:05 — forked from sr75/wget-jdk-oracle-install-example.txt
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@minhtran83
minhtran83 / get_oracle_jdk_x64.sh
Created June 14, 2021 23:05 — forked from n0ts/get_oracle_jdk_x64.sh
Get latest Oracle JDK package bash shell script for linux/osx/windows
#!/bin/bash
# You must accept the Oracle JDK License Update
# https://www.oracle.com/java/technologies/javase-downloads.html
# usage: get_oracle_jdk_x64.sh <jdk_version> <platform> <ext>
# jdk_version: 14
# platform: linux or osx or windows
# ext: rpm or dmg or tar.gz or exec
jdk_version=${1:-14}
@minhtran83
minhtran83 / slack.sh
Last active November 29, 2022 22:34 — forked from andkirby/slack.sh
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@minhtran83
minhtran83 / ListNetworkInterfaces
Created October 23, 2024 12:06
Java program that lists all the network interfaces and their details
import java.net.*;
import java.util.Enumeration;
public class ListNetworkInterfaces {
public static void main(String[] args) {
try {
// Get all network interfaces
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
// Loop through each network interface and print details