Skip to content

Instantly share code, notes, and snippets.

View IngmarBoddington's full-sized avatar

Ingmar Boddington IngmarBoddington

View GitHub Profile
@IngmarBoddington
IngmarBoddington / android
Last active October 16, 2017 15:09
Notes from Android / Java Study for Learning Tree exam
IDE
======
Recommended -> Android Studio
Common (Legacy) -> Eclipse with Android Development Tools (ADT)
Requires Android SDK + Java JDK
Applications are ran in an emulator -> Android Virtual Device (AVD) by the AVD Manager
Allows multiple configurations to be created
Different API versions and screen sizes
Detailed configuration, such as memory size and GPS emulation, available
Android applications can be developed on almost any platform
@IngmarBoddington
IngmarBoddington / Swift
Last active January 1, 2018 19:11
Swift notes from iOS dev learning - assumes Java knowledge. Test apps are here: https://github.com/IngmarBoddington/XcodeProjects
General
======
- Strongly typed, object oriented
- Semi-colons are optional to end statements
- // or /* */ for comments
- Used across Apple platforms
- Execution starts in main.swift
- Libraries imported using import statements
- Can use any unicode character in names
- Short circuits evaluations of conditional statements
@IngmarBoddington
IngmarBoddington / docker
Last active July 17, 2022 13:23
Docker / Dockerfile notes
TERMINOLOGY
-----------
Images - The file system and configuration of our application which are used to create containers
Dockerfile describes an image
Image identifiers can be repo:tag or ID
Containers - Running instances of Docker images — containers run the actual applications. A container includes an application and all of its dependencies. It shares the kernel with other containers, and runs as an isolated process in user space on the host OS. You created a container using docker run which you did using the alpine image that you downloaded. A list of running containers can be seen using the docker ps command.
Image ID != Container ID
When containers are recreated they will have lost any changes made since last created
Docker daemon - The background service running on the host that manages building, running and distributing Docker containers.
Docker client - The command line tool that allows the user to interact with the Docker daemon.
@IngmarBoddington
IngmarBoddington / vagrant
Last active November 18, 2019 18:00
Vagrant Commands
Settings contained in VagrantFile
vagrant up
- Pull dependencies and start VM (run from project root)
vagrant destroy -f
- Force destroy VMs
vagrant ssh <box>
- SSH onto a running VM
@IngmarBoddington
IngmarBoddington / URLCharacterEncodings
Created December 18, 2015 11:41
URL Character Encodings
Character From Windows-1252 From UTF-8
space %20 %20
! %21 %21
" %22 %22
# %23 %23
$ %24 %24
% %25 %25
& %26 %26
' %27 %27
( %28 %28
@IngmarBoddington
IngmarBoddington / mantras
Last active November 25, 2020 10:43
Coding Mantras
Don't Repeat Yourself - DRY
- Don't repeat code
- Use reusability
Keep It Simple Stupid - KISS
- Don't overcomplicate for it's own sake
OOP
- Program to an interface
- Favour composisition over inheritance
@IngmarBoddington
IngmarBoddington / jboss
Created August 2, 2015 11:15
JBoss cli commands
sudo jboss_user
jbmgr status
jbmgr mdb <item> stop
- Stop mdb related to service
jbmgr restart <list>
- Restart list of services
@IngmarBoddington
IngmarBoddington / exit
Created April 17, 2015 15:10
Exit Codes
1 Catchall for general errors let "var1 = 1/0" Miscellaneous errors, such as "divide by zero" and other impermissible operations
2 Misuse of shell builtins (according to Bash documentation) empty_function() {} Missing keyword or command, or permission problem (and diff return code on a failed binary file comparison).
126 Command invoked cannot execute /dev/null Permission problem or command is not an executable
127 "command not found" illegal_command Possible problem with $PATH or a typo
128 Invalid argument to exit exit 3.14159 exit takes only integer args in the range 0 - 255 (see first footnote)
128+n Fatal error signal "n" kill -9 $PPID of script $? returns 137 (128 + 9)
130 Script terminated by Control-C Ctl-C Control-C is fatal error signal 2, (130 = 128 + 2, see above)
255* Exit status out of range exit -1 exit takes only integer args in the range 0 - 255
@IngmarBoddington
IngmarBoddington / JMS
Last active August 29, 2015 14:16
JMS Specific Java Notes (Glassfish, ActiveMQ)
Message Types (http://docs.oracle.com/javaee/6/api/javax/jms/Message.html)
- String - Commonly used to avoid versioning issues
- Object (serialised)
- ByteMessage
- MapMessage
- StreamMessage
JNDI
- Java Naming Directory Index
- Dependancy Injections
@IngmarBoddington
IngmarBoddington / phpdocTemplates
Last active August 29, 2015 14:11
Doc Block templates (PHPDoc style)
/**
* IspPrimitives Product_SupplierProductRules
*
* @category category
* @package package
* @subpackage sub package
* @author Name <email>
*
* @copyright year company
* @link doc link