-
Logitech Spotlight on Linux It's a point-and-present controller for computers, and surprisingly useful for other uses as a remote control.
-
GCP (Google Cloud) notes When using the gcloud tool with CloudSQL and CloudRun, if you really want to get ahead, use the command line instead of the slow and cumbersome web interface.
-
GCP (Google Cloud) and gcloud cli primer Some of the basic and essential features of the Google Cloud CLI tools.
-
Fountain Pen Ink A list of inks for fountain pens and how I feel about them
-
Random notes on nodejs, npm, nvm, and more A mix of ideas, notes, and workaround for front-end development
-
How to update dependency and plugin versions for Maven projects Refresh Maven projects with the latest dependencies and plugin versions automatically
-
SSH on Windows and the "invalid format" error Windows is really picky about SSH key formats
-
Change video resolution on HyperV Linux VMs HyperV doesn't like linux framebuffers much
-
A guide for securing domains that don't send or receive email What should you do to prevent bad actors abusing domains that don't send email.
-
On backups and restores Why should you make a backup? So you don’t have to redo complex or lengthy work. So you don’t lose valuable data, like code or documents. So you don’t lose unique data that cannot be reproduced, like photography or sales...
-
Task priorities in Agile, an opinionated guide Like most of Agile, task priorities are an opinion-driven and highly debatable subject. Do we go low-high and have only two, as medium is meaningless in most contexts? Do we have high-medium-low, because three is the magic number and there...
-
Choices for Web Analytics Web analytics are tools to capture data on website visitors, aggregate them, then present them in a way that enables formulation of actionable insights. There are a number of decent choices for web analytics. Google Analytics Pros: free (as in...
-
Reverse Hungarian You’ve heard of Hungarian Notation? Now try the ‘logical’ progression from this, Reverse Hungarian! Instead of starting the name with the type, end with type. For simplicity, here’s a lightweight list of types. In the true spirit of this naming...
-
Rust lang kickstart notes Rust is a really good systems programming language as well as a useful application development language. Here’s a quick primer to get going and learn more about Rust. Installation To install rust, use rustup. Useful terms rust - the name...
-
Things for Chroma Key video, AKA Green Screening I’ve been experimenting with greenscreens and chromakey to record videos and for online conferencing with MS Teams. This is what I’ve worked out so far. In brief: light up the green screen properly, use a good camera and the right...
-
Default values in the Jekyll Liquid template Defaults in the Liquid templates used by Jekyll is easy but is something I always forget. Here’s how to do it: randonomicon It will use the default if ‘something’ has no value. That’s all there is to it.
-
JavaScript as a Hazard In my mind, JavaScript is a hazard that all developers in the modern era need to be aware of and savvy to in order to survive their career. I call it JavaScript-as-a-Hazard: JSaaH. It is as ubiquitous as it is...
-
CSS typography notes Notes and thoughts on CSS typography Rendering options Setting rendering options can help make text look better than the defaults. It also gives a chance to chose what to optimise for, which can have an impact on mobile devices if...
-
OSI 7 Layer Model My notes on the 7 Layers of the OSI model. Taken during CISSP revision. HOST layers User The thing between the keyboard and the chair, and only interacts directly with the application. They don’t directly use the lower levels. Application...
-
Definition of Done & Definition of Ready Here are some definitions useful in Agile processes. Definition of TASK An entry on a to-do list. Sometimes called a story, task, ticket, defect, bug, line item, or post-it. Definition of READY: When the task can be worked on. It’s...
-
Pomodoros as Agile Storypoints A ‘pomodoro’ is a tomato, but as part of the Pomodoro Technique it’s a unit of time, nominally 25 minutes, where someone can focus exclusively on a single task and defer any interuptions. A storypoint is a unit of effort...
-
Favicon generator A good simple generator when you want a simple icon with a letter or two on it. Allows for typeface selection from Google Fonts and selection of colours, as gives different sizes and a code snippet. The website manifest file...
-
Aliases in Windows 10 cmd.exe If you are like me and constantly typing ls in the windows command prompt, you’ll like this. Step one, create a text file somewhere that will run every time a command prompt is started that sets the aliases. This uses...
-
Build a Developers menu with Python and NCurses If you are anything like me then you get bored and tired of remembering mundane commands that you have to type every day and sometimes find that the shell history is somewhat forgetful. My answer to this is to build...
-
Bash alias for the weather To get the weather in a terminal/console/bash shell: alias weather="curl https://wttr.in/London" Obviously this needs internet access so won’t work offline, and is dependent on wttr.in remaining online.
-
Quick changing Java versions on MacOS These bash aliases help with Java development by making it easy to switch between Java JDK versions: alias JAVA8='export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"' alias JAVA9='export JAVA_HOME="$(/usr/libexec/java_home -v 9)"'
-
Get your current IP address from the terminal On a Mac (and probably FreeBSD & Linux too) this will give you your current external IP address. curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
-
Mac - Tools for Homebrew Tools for Mac Homebrew Here’s a list of common tools for OSX Homebrew, at least in my setup. Now in non-random alphabetical order (mostly). antigen This is a kind of plugin tool to extend ZSH with themes and features. cowsay...
-
Adobe AEM - links Adobe AEM This entire page was outdated and beyond curation. You can find the old content on Wayback Machine if you need to use one of the links. It was mostly links to other blogs or to the documentation on...
-
ZSH Shell zsh Shell alternate shell oh-my-zsh antigen Tab completion on everything. Globbing case insensitive matching spelling correction global aliases improves on command history navigation http://fendrich.se/blog/2012/09/28/no/ installing zsh installing oh-my-zsh installing antigen https://github.com/zsh-users/zsh-syntax-highlighting
-
ZMQ - bind vs connect ZMQ bind versus connect In brief, you should use bind for: stable things; use connect for volatile things when there is on; use connect when the number is unknown when listening; use connect when broadcasting long-lived process should bind; short-lived...
-
XMonad Window Manager create a new pane - alt-shift-enter What is XMonad? It’s a tiling window manager, that you can control extremely well purely from the keyboard without a mouse. It’s also very good with multiple monitors. A tiling window manager takes away...
-
Code snippet - XML in Java XML in Java //setup a document DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db; db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); //create a root node Element rootElement = doc.createElement("root"); doc.appendChild(rootElement); //get the root node Element rootNode = document.getDocumentElement(); assert (rootNode != null);...
-
Wordpress plugins Wordpress Vital plugins for wordpress GA Editorial calendar Yoast AddThis Google forms From a development POV I steer clear of modifying Wordpress, but I’ve no problem with using plugins Great tools for Wordpress Mars Edit is about top of the...
-
CSS - SASS Bourbon Bourbon http://bourbon.io A simple and lightweight mixin library for Sass. \secion{Normalise CSS} http://git.io/normalize Zurb Foundation http://foundation.zurb.com
-
Ansible in a venv Ansible in a venv ‘venv’ is the Python system for setting up virtual environments. The tool you need to use to manage this is ‘virtualenv’. # install virtualenv pip install virtualenv # create a virtualenv named venv virtualenv venv #...
-
Varnish - The VCL language The VCL language VCL version declaration The first thing you need to have in your VCL file in Varnish 4, you need a vcl format declarion. # this is a VCL file for Varnish 4.0 vcl 4.0; # ... rest...
-
Varnish tests Varnish tests One of the great things about Varnish is that is has a baked-in and fully featured test system that really works for TDD - it’s absolutely possible to write the tests first, and a little care with this...
-
Adobe AEM - vanity urls [diagram] A graphviz diagram for vanity URLs in Adobe AEM
-
Vagrant Vagrant Introduction Vagrant is a tool rather than a technology unto itself, but as there are a lot of options and configuration that can ruin you day I’ve catalogued many things I find useful. Provisioning with SaltStack Provisioning a Vagrant...
-
Code snippet - Java Unirest library HTTP requests made easy with Unirest
-
ZMQ - socket types Socket types http://api.zeromq.org/4-0:zmq-socket push pull pub sub req rep router dealer pair xpub xsub stream
-
Test-Driven ideologies Test-Driven ideologies The twin philosophies of [TDD]{acronym-label=”TDD” acronym-form=”singular+short”}; fail-fast versus try/catch These two things belong together; they are seemingly opposites sides of the coin, but they are the same coin nonetheless. They may well be polar opposites and share certain...
-
Varnish - cache time controls Controlling cache time There are three primary properties that affect how long an object ‘lives’ in the cache, and what happens when that time expires. The first and most important of these is ‘ttl’, which is set as beresp.ttl, and...
-
MacOS Developers Tools - Emacs Running Emacs Daemon on OSX
-
Docker - notes Loose notes on docker (from 2018)
-
Tmux tmux ‘tmux’ is a seemingly small program that attempts to turn a terminal console into a text-only window manager. It’s called tmux because it’s a terminal multiplexer - it can show multiple shells in a single terminal window. It’s sole...
-
Threads in C Threads in C pthreads.h
-
Docker - things Things https://registry.hub.docker.com/u/antonyh/cucumber/ Webbit maybe useful. https://github.com/webbit/webbit Another example, this time from The Guardian newspaper, discussing frontend integration https://github.com/guardian/frontend/tree/master/integrated-tests
-
Things ending in IO Things ending in IO This is a bucket of *io things, mostly libraries that match the pattern /[.]*.io/ or are hosted on .io domains. License information is provided as a hint only and may have changed by the time you...
-
Things for Java Things for Java This is a bucket of 4J things, mostly libraries that match the pattern /[.]*4J/ License information is provided as a hint only and may have changed by the time you read this. Hire a lawyer if the...
-
Maven Failsafe plugin Maven Failsafe plugin \epigraph{ The Failsafe Plugin is designed to run integration tests while the Surefire Plugin is designed to run unit tests. The name (failsafe) was chosen both because it is a synonym of surefire and because it implies...
-
Ansible templates Templates Ansible templates use Jinga2, a Python-based template system. The ‘templates’ folder contains Jinja2 template files that the tasks can use to generate files. These templates have the file extension .j2 and are used to create files or set configuration...
-
Ansible tasks Tasks The tasks folder contains a ‘main.yml’ file, and possibly other YAML files, to define the tasks needed to realise the role. A task is an action that needs to be taken to change the state. This takes the form...
-
Cucumber - Controlling the System-Under-Test Controlling the System-Under-Test One way to control the target of the tests is to use a JVM property with the URL for the server that you wish to test. -Dcucumber.target=http://localhost:8080/ /** String HOST is the server under test, including context...
-
Varnish - built-in subroutines Built-in subroutines All the code in the VCL files used by Varnish go into sub-routines. Varnish uses it’s own procedural language called ‘VCL’ - Varnish Control Language - and has a pre-defined set of routine names that are used during...
-
Docker storage Docker storage Docker, like virtually everything else, needs a way to persist files and have local configuration and data. Docker provides mechanisms to not only store container specific information but to also share it between containers running in the same...
-
Static Site Generators Static Site Generators roots http://roots.cx What is Roots? (blurb) Roots is a static site compiler, that generates static html, css, and javascript files. It’s very good at helping to build static front-ends. It is sponsored heavily by Carrot Creative, and...
-
Splunk Splunk Splunk is an awesome product that has a terrible, terrible name. It’s a log indexer on steroids, which is such a dreadful cliché. It’s great power comes from ingesting (another terrible word) all the log data you can feed...
-
IRC irc http://www.codeography.com/2012/09/23/howto-irc-server.html
-
Agile - SMART SMART specific measurable achievable realistic timeboxed
-
Adobe AEM - Apache Sling testing tools Apache Sling testing tools https://sling.apache.org/documentation/development/sling-testing-tools.html The testing tools provided by Apache Sling have a number of important benefits that may be difficult to reproduce using other tools. Unit testing Sling test tools can execture junit test cases from OSGi bundles...
-
Sledgehammerism Sledgehammerism Smash everything with the same tool This generally manifests itself as defensibly using familiar tools, frameworks, even languages with the rationale revolving around familiarity. If you can only have hammers, pick the right one for the job A tenet...
-
Adobe AEM - Sightly drop targets Drop targets http://stackoverflow.com/questions/25143752/sightly-and-cqdroptargets Drop target is configured using node cq:dropTargets node under the cq:editConfig and it doesn’t depend on the used markup language. The only thing that markup has to produce is a <div> tag with class cq-dd-CONFIGNAME which will...
-
Docker - Shipyard Shipyard What is [Shipyard]{acronym-label=”Shipyard” acronym-form=”singular+short”}? http://shipyard-project.com/ "Composable Docker Management Built on the Docker cluster management toolkit Citadel, [Shipyard]{acronym-label=”Shipyard” acronym-form=”singular+short”} gives you the ability to manage Docker resources including containers, hosts and more. According to Shipyard, it differs from other management...
-
HTTPd - ModSecurity setup ModSecurity setup ‘modsecurity_crs_10_setup.conf’ is the base file for configuring ModSecurity, and should be included first. It configures some vital values, such as if the rules engine is off, in a detect-only mode, or fully active. It also defines score thresholds...
-
Maven settings Maven settings You can use a global settings file to avoid littering the pom.xml files with non-project-related settings, such as the location on you local disk for the repository cache, and settings for proxies and remote servers. To set this...
-
Serenity [BDD] Serenity [BDD] What is Serenity? This is a re-brand of Thucydides. Create a sample Serenity BDD project This is straightforward thanks to the Maven Archetype. mvn archetype:generate -DgroupId=com.example -DartifactId=webtests -DarchetypeGroupId=net.serenity-bdd -DarchetypeArtifactId=serenity-cucumber-archetype -DarchetypeVersion=1.0.7 -DinteractiveMode=false
-
Docker Tricks and Tips Deprecated; Docker Tricks and Tips Docker security mount your docker.sock You can just mount your docker.sock as a file using the volume options to provide a container access to the docker API. You can then run docker commands from within...
-
Cucumber - Taking screenshots Cucumber - Taking screenshots This code hooks an ‘after’ event to the tests, and if it fails a screenshot is taken and put into the target folder. The example uses millis-since-1970 to give a unique name. import org.openqa.selenium.WebDriverException; import org.openqa.selenium.OutputType;...
-
Scala Scala Beyond Hello World A quick primer on lists and iterators, try to keep up, this is basic stuff, and fairly trivial. object HelloWorld { def main(args: Array[String]) { val numbers = List(1, 2, 3, 4, 5) numbers foreach printme...
-
Cucumber-JVM - sample step definitions Sample step definitions @Given("^I am on the homepage$") public void i_am_on_the_homepage() throws Throwable { this.visit("/"); } private void visit(String s) throws Exception { webDriver.get(HOST + s); } @When("^I change language to \"(.*?)\"$") public void i_change_language_to(String expected) throws Throwable { webDriver.findElement(By.className("dropdown-toggle")).click();...
-
Gherkin - an example @wip @javascript Feature: Change locale As a visitor, I want to pick my region Scenario: When I am on the homepage I should see the country chooser Given I am on the homepage Then I should be on "Country Chooser"...
-
Rust Lang Rust Lang http://www.rust-lang.org Variables let x = 1; let mut y = 2; y = y + x; other stuff println("something"); println("x={}",x); curl -s https://static.rust-lang.org/rustup.sh | sudo sh [sudo] password for antonyh: rustup: gpg available. signatures will be verified rustup:...
-
Gatling - Running a simulation Running a Gatling simulation invoke ./bin/gatling.sh pick the simulation add a description wait open the html output $ ./bin/gatling.sh GATLING_HOME is set to /Users/h7788808/git/gatling/gatling Choose a simulation number: [0] antonyh.BookRecordedSimulation 0 Select simulation id (default is 'bookrecordedsimulation'). Accepted characters are...
-
Maven - Running Jetty Run Jetty using Maven Some projects can be run using Jetty using the jetty:run mojo or with jetty:run-war. You’ll probably need to set MAVEN_OPTS to give enough heap space for the server, and with Java 7 or earlier you might...
-
Ansible roles Ansible Roles Roles define the duties that the server must fulfil. The common pattern seems to be to have a ‘common’ role that is applied to all servers. Beyond this there are service-based roles for each part of a stack,...
-
rkt rkt CoreOS Appc - Application Container try out with Vagrant git clone https://github.com/coreos/rkt cd rkt git checkout v1.8.0 vagrant up
-
HTTPd - Reverse proxy configuration HTTPd - Reverse proxy configuration If you are using ModSecurity with embedded into the application server then it behaves differently to how it works when used in conjunction with an external backend via mod_proxy. Compression If you are serving compressed...
-
Maven reporting Reporting: Quick "Site" Build The site report has all the information from the enabled plugins such as Findbugs, Checkstyle, Cobertura, as well as Javadocs. Building this is trivial, although it can take some time to process. Using the ‘site’ goal...
-
Maven release plugin Maven release plugin http://maven.apache.org/maven-release/maven-release-plugin/ The Maven release plug-in is designed to automate many of the dull repetitive and error-prone tasks that are associated with releasing a version of the code-base. It is a two-step process where the release is first...
-
Docker Registry Docker Registry There are three basic options for storing the layers required to produce the containers. Docker Hub, the ‘official’ repository Self-hosted docker repository Third-party hosted repository services Official Docker Registry https://github.com/docker/docker-registry#quick-start Self-hosted Repository Run in Docker and backed with...
-
Gatling Recorder Gatling Recorder a proxy that records requests and creates a simple simulation in Scala. to run the recorder application, run bin/recorder.sh Network options HTTP proxy If you need to set an outbound proxy enter the details here. Most of the...
-
Varnish - common tasks Common tasks in Varnish This section aims to help you kickstart your understanding of Varnish and make rapid progress at the beginning. It’s probably best if you already understand the general gist of Varnish, and know the concepts, as the...
-
Git Rebase Git Rebase What’s the difference between rebasing and merging? Well, let me tell you. Rebasing is changing the baseline for your changes, moving the point at which the branch started. This is an over-simplified view, but it’s far easier to...
-
Python Python Whitespace is significant. Use indents instead of { curly braces } Things are imported with ‘import’ to print to stdout use print("message) Lines don’t end with semicolons to declare a variable just assign it to create a function def...
-
Purism Purism Thou shalt not mix Sometimes a platform vendor has a set pattern, selection of tools, an IDE, or a prescribed workflow that has been shown to have a good success rate and is documented. Developers can sometimes take a...
-
Adobe AEM - Integration tests with Prosper Adobe AEM - Integration tests with Prosper What is ‘Prosper’? Prosper is an integration testing framework based on Spock, a framework to create high quality tests. It uses Groovy test scripts and a selection of Mocks to emulate the functionality...
-
Projects Misc Projects Wetty https://registry.hub.docker.com/u/nathanleclaire/wetty/ GitLab Docker GitLab - https://gitlab.com/gitlab-org/gitlab-ce/tree/master/docker 12 factor Store config in the environment - http://12factor.net/config Cross Browser Testing Saas testing tool; http://crossbrowsertesting.com http://webpagetest.org
-
Maven and Git Maven Git Project Setup Git and Maven Git Ignore It’s useful to have some files and folders ignored by Git because you don’t want to put them under version control, or you don’t need to share them with others. Here’s...
-
Ansible - profiling Profiling Ansible In order to do realistic and effective performance optimisation, one must always profile. This is true for all development. Collecting basic benchmarks from a test run and identifying slow and often-run sections is a key technique for improving...
-
Processing (lang) .pde files void setup() size(1000, 500); //size(400, 400, PDF, "output.pdf"); background(0, 64, 0); fill(127,0,0); //saveFrame("output-####.png"); int xcount = 100; int ycount = 50; int x = width/xcount; int y = height/ycount; for (int j = 0; j < ycount; j++)...
-
Ansible - upgrading to v2 Upgrading to Ansible 2.0 https://github.com/ansible/ansible/blob/devel/docsite/rst/porting_guide_2.0.rst
-
Maven POM files Maven - Anatomy of the pom.xml file The pom.xml is the Project Object Model, a declarative XML document that describes the build and it’s dependencies. There’s little need to reproduce the information published in the Maven POM reference https://maven.apache.org/pom.html#Introduction Instead,...
-
Ansible playbooks Ansible Playbook What is a playbook, and what does a playbook look like? In terms of format, it’s just YAML with a few settings and the roles required for the target hosts. In short, the playbook is what to do,...
-
Docker performance Docker Performance In order to get the best out of Docker, it’s important to measure and collect some metrics and identify areas that are bottlenecks and can be improved. Docker Filesystem performance This article discusses the different storage mechanisms and...
-
Patternism Patternism An obsession with patterns This can quickly manifest itself as Sledgehammerism and weigh down otherwise light code especially when coupled with the use of inappropriate patterns which then effectively become anti-patterns for the use-case in hand. What are patterns?...
-
Maven command line paramters Maven command line paramters Skip tests You can stop tests from running by setting a command line option when invoking Maven: mvn install -Dmaven.test.skip=true There are plenty of reasons why you should avoid doing this, but the most common reason...
-
Adobe AEM - Sightly templating Adobe AEM - Sightly templating Sightly These are templates in AEM. Also known by some as HTL. data-sly-use <div data-sly-use.barry="com.example.Component"> <h1>${barry.someValue}</h1> </div> data-sly-use.clientLib data-sly-call data-sly-unwrap stops Sightly from wrapping the element with a surrounding element in the output that is...
-
Vanish Objects Varnish Objects Objects are things referenced by URL. pages, images, and so on - requests, cached items, clients, servers - these are all objects. Please note that a URL isn’t a unique identifier, as it’s possible to cache variants of...
-
System Monitoring Monitoring Riemann Riemann aggregates events from your servers and applications with a powerful stream processing language. Send an email for every exception raised by your code. Track the latency distribution of your web app. See the top processes on any...
-
Ansible modules Ansible Modules Modules are essentially Python programs that can be used in the Ansible roles. They extend Ansible by providing additional actions that can be used in the YAML to do things that aren’t bundled with Ansible or provided by...
-
LaTeX lists LaTeX Lists Lists are an incredibly useful construct, and let you present information in a way that shows they are connected. Wikibooks has a very useful reference on lists: http://en.wikibooks.org/wiki/LaTeX/List_Structures A simple bullet list is very easy to do. Lists...
-
Minimalism Minimalism Less is more, more or less The basic premises of Minimalism as an approach to software development are to write as little code as possible, to leave everything with the default settings until a change is needed, and to...
-
Maximalism Maximalism The Swiss-Army-Knife approach Maximalism is an attempt to cover all bases, trap all exceptions, validate all inputs, check all values, test all possible execution branches, and foresee all possible futures for the codebase. It revolves heavily around ‘what if’...
-
Cucumber-JVM - Maven Dependencies Maven Dependencies Running cucumber-jvm with phantomjs needs these dependencies in the pom. <dependencies> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-picocontainer</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-common</artifactId> <version>2.0b1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.44.0</version> <scope>test</scope> </dependency> <dependency> <groupId>com.github.detro.ghostdriver</groupId> <artifactId>phantomjsdriver</artifactId> <version>1.1.0</version> <scope>test</scope>...
-
Code snippet - Makefile for C Makefile for C example CC=g++ CFLAGS=-c -Wall LDFLAGS= SOURCES=main.cpp hello.cpp factorial.cpp OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=hello all: $(SOURCES) $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ .cpp.o: $(CC) $(CFLAGS) $< -o $@ \subsection{references} \url{http://mrbook.org/blog/tutorials/make/}
-
Magnolia - Spring Blossom Spring Blossom What is String Blossom? Previous incarnations of Magnolia CMS used JCR nodes to define almost everything, which made unit testing difficult. Spring Blossom addresses this by using plain Java. It is an annotation-based framework that works using code...
-
Mac hacks Mac hacks Chrome Print dialog To make Google Chrome use the system print dialog instead of it’s own version defaults write com.google.Chrome DisablePrintPreview -boolean true general OSX Mountain Lion settings changes: defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 defaults write NSGlobalDomain...
-
Git log Git log It’s important to get information on the state of the repository and the commits that it’s made up from in a simple, clean, and clear way. There are quite a few options that can help with this. Useful...
-
Librarianism Librarianism In this context, a Librarian not only uses and manages libraries of code, but also seeks to build new libraries.
-
Languages All the content here is the blurb, copied directly from the respective web site. Rust http://www.rust-lang.org Rust is a systems programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races. Featuring zero-cost abstractions move semantics guaranteed...
-
Lang Programming Languages Elixir is Erlang gcov gcov is gnu coverage tool. lcov makes reports from gcov output. gcovr is useful to plug it into jenkins; cobertura? Intel has some tools too. IBM look at developerworks, again. Nim Rust Racket Dropwizard...
-
JUnit JUnit What is JUnit? JUnit is a testing framework for running unit tests. Unit tests are highly focussed test cases designed to check that given a known state, when a single action is performed, then the state is change to...
-
Things using JS Things using JS This is a bucket of JS things, mostly libraries that match the pattern /[.]*js/ Almost all the text in this chapter will be copied directly from the frameworks / websites referenced. License information is provided as a...
-
Code snippet - build a JRuby plugin for Jenkins JRuby and Jenkins This was how to build a Jenkins plugin using JRuby, as featured here: https://github.com/jenkinsci/jenkins.rb/wiki/Getting-Started-With-Ruby-Plugins brew install jruby brew install ruby193 jruby -S gem install bundler jruby -S bundle install jruby -S rake jruby -S rake rspec jruby...
-
Java 8 refactoring Java 8 refactoring This is how Netbeans refactored Java 7 into Java 8. Anonymous inner class final Provider<RenderingContext> renderingEngineProvider = new Provider<RenderingContext>() { @Override public RenderingContext get() { return RenderContext.get().getRenderingContext(); } }; BECOMES final Provider<RenderingContext> renderingEngineProvider = () -> RenderContext.get().getRenderingContext();...
-
Agile - INVEST INVEST independent negotiable valuable estimated sized appropriately timed
-
Ansible - inventory Inventory What is an inventory? Seriously? If you have to ask... An inventory is a collection of hosts organised into groups. With Ansible, that’s a poor answer though. There’s a lot more nuance to inventories than just a simple list....
-
Shell and terminal Shell and terminal Mastering shell and terminal commands is a challenge, but with some careful selection of tools, creating some useful aliases, and making good notes it’s possible to make rapid gains. With the Unix philosophy that most of the...
-
Infinitest notes Infinitest needs infinitest.filters file containing: .*ITCase to filter out integration tests. Eclipse: install from marketplace Intellij: install as 3rd party plugin IntelliJ: needs to be set to compile automatically.
-
Internationalisation Internationalisation http://www.w3.org/International/questions/qa-html-dir If the overall document direction is right-to-left, add dir="rtl" to the html tag <!DOCTYPE html> <html dir="rtl" lang="ar"> <head> <meta charset="utf-8"> ... This also changes browser chrome in IE and Opera. [versions?] unit test: Assert.assertEquals("html", page.getDoctype().getNodeName());
-
HTTPd Apache HTTPD config goes in httpd.conf know which version you are using generally, it’s better if you set KeepAlive on socket backlog can help with timeouts and heavy connections ListenBacklog 8192 Listen sets the port number it’s common for all...
-
Headless browsers Headless browsers Zombie.js headless browser, using node https://github.com/assaf/zombie/blob/master/README.md http://zombie.labnotes.org SpookyJS drive casper from node https://github.com/WaterfallEngineering/SpookyJS Headless Firefox Using Xvfb – the X Virtual FrameBuffer http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/ http://www.semicomplete.com/blog/geekery/xvfb-firefox.html On a Mac in X11: http://afitnerd.com/2011/09/06/headless-browser-testing-on-mac/ HTML5Robot HTML5Robot is Windows only. http://html5robot.com
-
Ansible Handlers Ansible Handlers This contains a handlers file named ‘main.yml’. I sure wish they had named all these YAML files after their purpose instead of ‘main’, it would have made it easier when using an editor with multiple panes or tabs,...
-
Groovyscript Groovyscript to find out things "top -b -n 1".execute().text "cat /proc/cpuinfo".execute().text settings in build.gradle for maven repositories maven url "http://nexus/content/groups/public"
-
Graphviz Graphviz A brief introduction to Graphviz and DOT files syntax, which will undoubtedly grow as I do more advanced things with this powerful tool and as I get more bored with having to constantly look up information, especially as the...
-
Docker workflow [diagram] digraph graphname node [shape="box",style="rounded,filled",fillcolor="palegreen",fontsize="16"]; jenkins [fillcolor="yellow"]; nexus [fillcolor="lightblue"]; git -> jenkins; jenkins -> nexus ->jenkins; git -> fig; fig -> docker; github -> dockerhub; dockerhub -> fig; docker -> containers; nexus -> docker; #dockerrepo -> docker;
-
Glossary \newglossaryentry{bash} { name=Bash, description={The Bourne Again Shell} } \newglossaryentry{zsh} { name=Zsh, description={A shell} } \newglossaryentry{shell} { name=Shell, description={A console where you can type in comannds and receive feedback} } \newglossaryentry{commandline} { name=Command line, description={This is what Windows users call their...
-
GitLab and Jenkins GitLab and Jenkins https://github.com/elvanja/jenkins-gitlab-hook-plugin.git 1.597 Jenkins - 1.597 Git Client 1.16.1 (also tried with 1.15.0) Git Plugin - 2.3.4 Ruby - 0.12 https://github.com/elvanja/jenkins-gitlab-hook-plugin elvanja/jenkins-gitlab-hook-plugin Enables Gitlab web hooks to be used to trigger SMC polling on Gitlab projects
-
Gatling - Generating load Generating load with Gatling The recorded simulation is a single user walkthrough. This might be useful in some cases, but in general making it soak the application in requests will give you information on how it behaves under stress. The...
-
Java GC JVM GC settings Avoid optimising the Java Garbage Collector unless you have very specific performance model requirements that demand a specific GC, or if you have a known problem with the throughput or JVM pauses. Class unloading http://stackoverflow.com/questions/3334911/what-does-jvm-flag-cmsclassunloadingenabled-actually-do -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC...
-
Ansible Galaxy Ansible Galaxy Ansible Galaxy is a collection of shared ‘content’ for Ansible. It contains roles that you can use. As the quality of the roles in Ansible Galaxy is highly likely to vary, it’s mentioned here for completeness and won’t...
-
Freemarker Freemarker Freemarker is an almost-logicless that template language used to create markup that results in HTML output. In essence it is plain text HTML with some tokens that insert content from a model map object or call some template functions....
-
FreeBSD notes Random BSD Notes to install a package pkg pkg search xyz pkg install xyz to set DHCP add to /etc/rc.conf interface_em0="DHCP" and reboot to install X11 pkg install xorg to install virtualbox guest additions pkg install virtualbox-ose-additions to start X11...
-
Code snippets - Random Code Fragments Random Code Fragments Unity3D Unity3D web player preferences Unity3D web player stores player preferences here: /Library/Preferences/Unity/WebPlayerPrefs/ using this script api: http://docs.unity3d.com/ScriptReference/PlayerPrefs.html Git .gitconfig file cat ~/.gitconfig [core] excludesfile = /Users/antonyh/.gitignore_global [user] name = Antony Hutchison email = [email protected] [push] default...
-
Git force push Git - Force push To ‘force push’ is exactly as it sounds, to forcefully push your changes onto a remote. Opinions are split on this feature, as it is considered highly hazardous. On one hand, this is a useful feature...
-
Mac Homebrew - Fixing things Mac Homebrew - Fixing things fix problems with Brew (on OS X) brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup When I run brew update && brew upgrade brew-cask && brew cleanup && brew cask...
-
LaTeX - Figures and images LaTeX - Figures and images This is better explained here: https://www.sharelatex.com/learn/Lists_of_tables_and_figures but I keep these notes as I find it useful to have a reference I can relate to. % graphicx for images \usepackage{blindtext} \usepackage{comment} \usepackage{array} \usepackage{graphicx} \graphicspath{ {figures/} }...
-
Docker Compose Docker Compose Docker-Compose was previously known as Fig until the Orchardup team joined Docker. ‘docker-compose’, like ‘fig’, is a orchestration and provisioning tool for Docker. It provides an array of options, configured using a YML file to control the Docker...
-
Cucumber - Features and feature files Cucumber - Features and feature files A feature file is a definition, a specification of sorts, that states clearly a number of scenarios that must be tested. It’s written in a lingo known as humourously as ‘Gherkin’. The basic format...
-
Experimentarianism Experimentalism The desire to try something new, always This is the converse and polar opposite to Sledgehammerism. Given any project, if there is a new technology available or a tool that might sound good on a CV, then attempts should...
-
Jenkins Wallboard plugin Wallboard Jan Molak Build Monitor is a good wallboard.
-
Emacs - rough notes Emacs ROUGH NOTES rust enable rust mode install rust mode flycheck rust add hooks OS X ;;osx fixes for utf8 (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (prefer-coding-system 'utf-8) MELPA ;;add melpa packages (when (>= emacs-major-version 24) (require 'package) (package-initialize) (add-to-list 'package-archives '("melpa"...
-
Elvisism Elvisism Wham! Bang! Thank You Ma’am! There is a class of coder who believes it is their solemn duty to complete tickets as quickly as possible, to get things done regardless of the consequences, to ‘finish’ things as rapidly as...
-
Eclipse IDE notes Eclipse IDE Making Eclispe work properly stop it hiding the dot files make it show whitespace but not spaces except trailing spaces add a code coverage tool link to task managers like jira or bugzilla make it run related tests...
-
Code snippet - Selenium - Using different web drivers Selenium: Using different web drivers This code negates the need to compile the driver into the test, allowing a system variable to control the class used. This example uses PhantomJS. import org.openqa.selenium.WebDriver; //PhantomJS 1.9.8 works String driver = "org.openqa.selenium.phantomjs.PhantomJSDriver"; Class...
-
Documentarianism Documentarianism If it isn’t written down, it doesn’t exist There are some who believe that the only way to develop software is to have specifications. It doesn’t matter if this is in a formal document in PDF or Work format,...
-
Docker - The Dockerfile The Dockerfile We will cover the basics and introduce ourselves to Docker, then we can look at some of the more interesting topics and explore some of the ways we can build images and containers. In brief This is a...
-
Docker - The 'docker' command The ‘docker’ command Having a Dockerfile is great but it does nothing by itself - it’s just a plain text file. To use it you will need to invoke ‘docker’ and ask it to build the image you want to...
-
Docker basics Docker basics As with all such things that are not widely understood, it’s often much easier and definitely more productive to start with running rather than walking. For the truly lazy, use a Docker image, such as https://hub.docker.com/r/blinkmobile/apache-httpd/ If you’re...
-
DNS and domains DNS and domains Intro DNS record types A Address record, used to associate a name with an IPv4 Address AAAA Similar to an A record, except for IPv6 CNAME Canonical name, used to create domain aliases MX Mail Exchange, this...
-
Docker - diagnosing issues Diagnosing issues with Docker Sometimes, things go awry. Fact. Happily, there’s an arsenal of tools available to help figure out what is going down with Docker, and although some of them are slightly cryptic it’s possible to get a vast...
-
Development Workflow digraph G graph[compound=true]; node [shape=hexagon, style="filled", fontname="Verdana", fontsize=10]; subgraph EXTERNAL node [fillcolor=lightyellow]; info [shape=underline, label="The development workflow", fillcolor=lightgrey] # person [label="Person", shape=tripleoctagon, fillcolor=lightyellow]; # SCM [label="SCM", shape=egg, fillcolor=lightpink]; subgraph FeatureDevelopment node [fillcolor=lightblue]; dev [label="Programmer", shape=tripleoctagon, fillcolor=lightyellow]; releaser [label="Releaser", shape=tripleoctagon, fillcolor=lightyellow];...
-
Windows 10 design guidelines Design guidelines Windows 10 If you are interested in designing for the forthcoming Universal Windows 10 Platform, here is the place to start: http://design.windows.com Design UWP apps A great app starts with a great user interface. Learn how to design...
-
Agile - DEEP DEEP Detailed Emergent Estimated Prioritised
-
Java debugging Debugging Java debug: slow: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044 debug: quicker: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
-
Cucumber JVM Cucumber JVM Cucumber In Java, Cucumber-JVM http://cucumber.github.io/api/cucumber/jvm/javadoc/index.html?cucumber/api/junit/Cucumber.html https://github.com/cucumber/cucumber-jvm http://cukes.info/install-cucumber-jvm.html https://github.com/masterthought/jenkins-cucumber-jvm-reports-plugin-java
-
Adobe AEM - ldap configuration cq5 ldap This was for CQ5 but should hold water for later versions. working ldap sample; for Apache DS com.day.crx { com.day.crx.core.CRXLoginModule sufficient; com.day.crx.security.ldap.LDAPLoginModule required principal_provider.class="com.day.crx.security.ldap.principals.LDAPPrincipalProvider" host="localhost" port="10389" secure="false" authDn="uid=admin,ou=system" authPw="secret" userRoot="o=users,dc=example,dc=com" userRdnAttribute="cn" userIdAttribute="cn" groupRoot="o=groups,dc=example,dc=com" groupMembershipAttribute="uniqueMember" autocreate="create" autocreate.user.mail="profile/email" autocreate.user.cn="profile/givenName" autocreate.user.sn="profile/familyName"...
-
Conventionalism Conventionalism Also known as convention over configuration In the negative form, also known as cargo cult programming
-
Ansible general configuration Ansible general configuration There’s a file names ‘ansible.cfg’. Here you set preferences in these sections: defaults - some basic values and general settings paramiko connection - pure Python SSH connectivity, if you are forced to used this ssh connection settings...
-
Shell Commands Shell Commands These generally apply to all Linux / Unix / BSD variants, although the options will vary depending on versions. ‘man’ is your friend. ‘man’ will tell you what the options are. ‘man’ may even give you useful examples....
-
Jenkins CLI Jenkins CLI (this is for quite an old version of Jenkins) You can access various features in Jenkins through a command-line tool. To get started, download jenkins-cli.jar, and run it as follows: java -jar jenkins-cli.jar -s http://dockerhost:8080/ help Note that...
-
Jenkins build per branch Jenkins build per branch This might be a little out of date… http://entagen.github.io/jenkins-build-per-branch/ 1. install plugins git gradle, known as "Gradle plugin" groovy, known as "Hudson Groovy plugin" 2. hit update on plugins page otherwise it doesn’t download gradle. in...
-
Docker - Boot2Docker Boot2Docker Boot2Docker is now deprecated in favour of docker-machine / docker-tools some of this information will still apply, and if you have to use older tools then maybe this will help you until you are able to upgrade. What is...
-
Bash Shell Bash Shell Bash is the default shell on many operating systems in this era, including Apple OSX / MacOS, most Linux distributions, and on Windows when using Cygwin or the Microsoft-supplied Linux for Windows subsystem (itself based on the Ubuntu...
-
Varnish - the Ban Lurker Varnish ‘ban lurker’ Banning and purging content from the cache is an invalidation technique and is necessary to remove items that have changed or expired. Banning leaves the object in the cache and can allow it to be served ‘stale’...
-
Vanish - Backend servers Backend servers Varnish backends are application servers. If you are familiar with CDN platforms, you might know these as ‘origins’ that hosue the content to be delivered, and are defined by IP address and port. Varnish uses backends to get...
-
Docker articles, blogs, and links Docker Articles, Blogs, and Links This content is somewhat outdated any may not be useful. Sing a Whale Song This useful blog post has ten tips and tricks that might help. http://nathanleclaire.com/blog/2014/07/12/10-docker-tips-and-tricks-that-will-make-you-sing-a-whale-song-of-joy/ Note that this article is from 2014 and...
-
Arch Linux Notes Arch Linux Notes I’ve stopped using Arch for the moment, but these notes are still useful to me. mount /dev/... /mnt mkdir /mnt/home mount /dev/... /mnt/home mkdir /mnt/boot mount /dev/... /mnt/boot arch-chroot /mnt pacman -S grub pacman -S lvm2 vi...
-
ANTLR ANTLR ANTLR is an acronym of ‘ANother Tool for Language Recognition’, and is in effect a compiler-compiler along the same lines as yacc or bison. Right or wrong, I pronounce it ‘antler’ as an allusion to it’s fore-bearers. It enables...
-
Adobe AEM Adobe AEM 6 What is AEM6 Adobe Experience Manager, version 6, is a Web CMS platform with page management, (digital) asset management, heaps of marketing tools and campaign management, and unsurprisingly many integrations with other parts of the Adobe Cloud....
-
Adobe AEM with SAML SAML SSO with ADFS What you’ll need the XML from the IdP or the .crt file, the public certificate file The URL to redirect to for the login page the Path in AEM to go to after the user has...
-
Docker Abuses Docker abuses and anti-patterns There are quite a few abuses possible with Docker; I’m sure there are many more than this section suggests even for such a young platform as Docker. Don’t use the ‘host’ network stack It’s possible to...
subscribe via RSS