Skip to content

Instantly share code, notes, and snippets.

Avatar

Jon Austen djangofan

View GitHub Profile
@djangofan
djangofan / .bash_profile
Last active Feb 21, 2018 — forked from natelandau/.bash_profile
Mac OSX Bash Profile for Developers
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
View minor-swing.json
{
"title": "Minor Swing",
"author": "Django Reinhardt",
"key": "Am",
"content": [ ["Am", "Am", "Dm", "Dm", "E7", "E7", "Am", "Am"], ["Dm", "Dm", "Am", "Am", "F7", "E7", "Am", "E7"] ]
}
@djangofan
djangofan / jdk8_optional_monad_laws.java
Created Jun 30, 2017 — forked from ms-tg/jdk8_optional_monad_laws.java
Does JDK8's Optional class satisfy the Monad laws? Yes, it does.
View jdk8_optional_monad_laws.java
/**
* ```
* Does JDK8's Optional class satisfy the Monad laws?
* =================================================
* 1. Left identity: true
* 2. Right identity: true
* 3. Associativity: true
*
* Yes, it does.
* ```
@djangofan
djangofan / java_ocp_exam_1.8_study_notes.txt
Last active Jun 17, 2022
My notes while studying for the OCP exam
View java_ocp_exam_1.8_study_notes.txt
ACP notes: https://gist.github.com/djangofan/a8b3e82e585525467c454515a8fb9ecf
Practice Tests $9.99: http://enthuware.com/index.php/ocpjp-8-average-scores
Guided Practice $140: http://www.ucertify.com/exams/Oracle/1Z0-809.html
Transcender: https://www.transcender.com/premium-solution/oracle/1z0-809.kap
Remember: javac -Xprint package.classname
https://ocpjava.wordpress.com/presentations/
http://www.java2s.com/Tutorials/Java/java.util.stream/Collectors/ !! STUDY THIS!!!
https://github.com/eugenp/tutorials/tree/master/core-java
https://www.slideshare.net/ibrahimkurce/oca-java-se-8-exam-chapter-6-exceptions
https://docs.oracle.com/javase/8/docs/api/java/util/function/class-use/BiPredicate.html
@djangofan
djangofan / java_acp_exam_1.8_study_notes.txt
Last active Aug 7, 2021
java acp exam 1.8 study notes
View java_acp_exam_1.8_study_notes.txt
Java 1.8 ACP Exam Study Factoids
------------------------
http://docs.oracle.com/javase/specs/jls/se8/html/index.html
http://stackoverflow.com/documentation/java/topics
http://www.programcreek.com/simple-java/
https://www.compilejava.net/
IOException and NumberFormatException are always thrown programmatically while other exceptions such as ArrayIndexOutOfBounds, ExceptionInitializerError, and NullPointerException are thrown by the JVM at runtime.
Initialize all local variables (unless they arent used)!
@djangofan
djangofan / nodedash-js-error.txt
Created Oct 18, 2016
NodeDash-JS Install Error
View nodedash-js-error.txt
I am on Windows 10
I installed Python 2.7.12 from here: https://www.python.org/downloads/
I installed NodeJS 4.6.0 from here: https://nodejs.org/en/
ERROR
----------------------------------
PS C:\Users\austenjt> cd .\NodeDash
PS C:\Users\austenjt\NodeDash> npm install -g dashing-js
npm WARN deprecated jade@0.35.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
We couldn’t find that file to show.
@djangofan
djangofan / preRun.bat
Created Jul 14, 2016
Turns off IE save-as dialog for JSON files and JavaScript warnings in browser.
View preRun.bat
@ECHO off
reg add "HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json" /v CLSID /t REG_SZ /d {25336920-03F9-11cf-8FD0-00AA00686F13} /f
if errorlevel 1 (
echo Failure Reason Given is %errorlevel%
exit /b %errorlevel%
)
req query "HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json" /v CLSID
reg add "HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json" /v Encoding /t REG_SZ /d hex:08,00,00,00 /f
if errorlevel 1 (
@djangofan
djangofan / CreateThrowable.java
Created Mar 18, 2016
Class to create a Throwable in Java for testing expected exceptions from a mock framework.
View CreateThrowable.java
package com.healthsparq.qa.framework.util;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
/**
* Use this to create a new Exception for a unit test.
*/
public class CreateThrowable
{