Skip to content

Instantly share code, notes, and snippets.

View gwpantazes's full-sized avatar

George Pantazes gwpantazes

View GitHub Profile
@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 / 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 / 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 / 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 / envByProperties.md
Last active February 11, 2023 13:39
Environment Variables via properties file in bash
@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 / How to Install JDK MacOS Homebrew.md
Last active May 18, 2024 14:43
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 / AtomHighlightedTODOKeywordsList.md
Last active December 11, 2017 15:22
Atom Highlighted TODO Keywords List
@gwpantazes
gwpantazes / README.md
Last active February 15, 2018 17:23
TestNG Method Precedence

TestNG Annotation Precedence

This is an exploration of the precedence order for TestNG annotations so I can get a better understanding of which annotations come first.

As we can see in testOutput.log, there is a clear order to these methods (I wish they put that order more clearly in the TestNG Documentation...

The original question was "What is the difference between @BeforeMethod and @BeforeTest?" After seeing the results, it's clear that @BeforeMethod refers to each individual @Test annotated method, while @Test refers to the <test> organizational blocks in the testng.xml test suite file.

One thing that confused me is that @BeforeGroups and @AfterGroups both needed to be supplied with their groups, when I originally thought they would automatically run before all groups. It does make sense though, once I found out what was going on.

@gwpantazes
gwpantazes / ascii_movie_image_ver_1.py
Created May 1, 2018 19:38 — forked from MotionDesignStudio/ascii_movie_image_ver_1.py
Python ASCII Video And ASCII Image Creator
#!/usr/bin/env python
import sys
import cv2
import subprocess
from subprocess import call
import aalib
import Image