Skip to content

Instantly share code, notes, and snippets.

View djangofan's full-sized avatar

Jon Austen djangofan

View GitHub Profile
@djangofan
djangofan / socat-config.sh
Last active January 25, 2023 09:03
socat daemon on OSX for Docker
#!/bin/bash
#brew install socat
# socat TCP-LISTEN:2377,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock
#file: docker.socat_listener
# <?xml version="1.0" encoding="UTF-8"?>
# <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
# <plist version="1.0">
# <dict>
@djangofan
djangofan / .bash_profile
Last active February 21, 2018 06:18 — forked from natelandau/.bash_profile
Mac OSX Bash Profile for Developers
# ---------------------------------------------------------------------------
#
# 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
{
"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 June 30, 2017 19:41 — forked from ms-tg/jdk8_optional_monad_laws.java
Does JDK8's Optional class satisfy the Monad laws? Yes, it does.
/**
* ```
* 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 February 27, 2023 01:58
My notes while studying for the OCP exam
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 August 7, 2021 16:46
java acp exam 1.8 study notes
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 October 18, 2016 03:08
NodeDash-JS Install Error
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 July 14, 2016 16:34
Turns off IE save-as dialog for JSON files and JavaScript warnings in browser.
@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 (