Skip to content

Instantly share code, notes, and snippets.

View gwpantazes's full-sized avatar

George Pantazes gwpantazes

View GitHub Profile
@gwpantazes
gwpantazes / AtomHighlightedTODOKeywordsList.md
Last active December 11, 2017 15:22
Atom Highlighted TODO Keywords List
@gwpantazes
gwpantazes / How to Install JDK MacOS Homebrew.md
Last active August 3, 2025 15:14
How to install different JDK versions on MacOS with Homebrew

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

@gwpantazes
gwpantazes / isScreenSecure.Java
Created November 2, 2017 20:53
isAnyScreenLayerSecure() Android secure screen detection
import org.apache.commons.io.IOUtils;
import se.vidstige.jadb.JadbDevice;
import se.vidstige.jadb.JadbException;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.nio.charset.Charset;
private static final int FLAG_SECURE_BITMASK = 0x2000;
@gwpantazes
gwpantazes / envByProperties.md
Last active February 11, 2023 13:39
Environment Variables via properties file in bash
@gwpantazes
gwpantazes / a.sh
Created October 18, 2017 22:52
Running scripts from other directory
echo "a.sh is run"
pwd
echo ""
echo "First B"
# Doesn't work if in a different directory
source b.sh
echo ""
echo "Second B"
@gwpantazes
gwpantazes / testHeader.md
Last active August 17, 2017 04:58
Test Markdown Header Linking to Sections

TestFile.java

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi viverra, lectus at interdum eleifend, tortor arcu egestas dolor, sit amet venenatis magna diam in leo. Mauris eros ex, malesuada lacinia ultricies a, feugiat sed sapien. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus nec est tellus. Praesent lobortis posuere lacus, vulputate bibendum diam tincidunt nec. Suspendisse rutrum leo a dolor sagittis hendrerit. Nullam a accumsan velit. Sed lobortis nulla magna, sit amet blandit leo sagittis ut. Morbi mollis nibh ac mauris vulputate vulputate. Nunc ullamcorper ac metus a fermentum.

Donec et convallis urna. Maecenas aliquet orci id rhoncus posuere. Mauris sit amet vestibulum dolor. In mattis, nibh dignissim ornare aliquet, erat sem imperdiet tellus, a dignissim ligula nunc non sapien. In hac habitasse platea dictumst. Nullam tincidunt faucibus vehicula. Duis eget magna non elit accumsan aliquet. Mauris faucibus mass

@gwpantazes
gwpantazes / CodeBlockScope.java
Created August 16, 2017 22:41
Code Block Scoping
class CodeBlockScope
{
public static void main(String[] args)
{
{
int x = 5;
}
System.out.println(x); // Won't even compile
}
}
@gwpantazes
gwpantazes / LibGDX Generate Output.log
Last active October 25, 2017 16:41
LibGDX Gradle Build WARNING: An illegal reflective access operation has occurred
Generating app in /Users/george/IdeaProjects/TestProject
Executing '/Users/george/IdeaProjects/TestProject/gradlew clean --no-daemon idea'
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.gradle.internal.reflect.JavaMethod (file:/Users/george/.gradle/wrapper/dists/gradle-2.14.1-bin/2r579t5wehc7ew5kc8vfqezww/gradle-2.14.1/lib/gradle-base-services-2.14.1.jar) to method java.lang.ClassLoader.getPackages()
WARNING: Please consider reporting this to the maintainers of org.gradle.internal.reflect.JavaMethod
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html.
Configuration on demand is an incubating feature.
@gwpantazes
gwpantazes / ParentChildPolymorphismDemo.java
Created July 13, 2017 22:28
Demonstrating that child classes can be in a list of Type Parent
import java.util.ArrayList;
import java.util.List;
class GrandParent {}
class Parent extends GrandParent {}
class Child extends Parent {}
class Grandchild extends Child {}
class Unrelated {}
// https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.22.2
class BitwiseOperatorAsLogicalTest {
public static void main(String[] args)
{
System.out.println("Bitwise AND operator still works as logical.");
System.out.println(true & true);
System.out.println(true & false);
System.out.println(false & true);
System.out.println(false & false);