Ethan's Tech Blog

My Technical Blog [Valid RSS]

Playframework Optional Mappings of Objects 2017-06-30
Did you know that if only optional fields are sent in a play form, that it makes all other fields required? Here's how to deal with it!
Circe, beyond the basics 2017-05-26
Looking at examples of how to use the scala json library circe in more involved ways than what is explained in its guide
Do indices in playframework field names matter? 2017-01-15
In depth look at the way naming your field names can affect whats sent to the system. Useful if you're planning on creating dynamic markup on the fly with javascript and need to know what your limitations are.
Binding classes and enumerations in Play! routes and query parameters 2016-12-05
Curious how to use an Enum in your path or query parameters? How about binding a class from those? This post shows how and provides a factory for easily creating bindings for Enumerations
Custom Types & Enums in Anorm's RowParser definitions 2016-12-02
How to use an Enum as a type parameter for anorm's column is simple once you see how they do it for UUID. This post explains how to define your own Column type so that you can use any type when defining your RowParser's for anorm.
ElasticSearch: Matching a Regular expression for an entire field 2016-11-11
If you wanted to use elastic searche's match queries but when doing regular expression queries anchor the search against only the beginning of the field value, look no further.
Slick columnToOptionColumn deprecation warning fix 2016-10-14
Sometimes SBT's ^ isn't enough to figure out what's actually wrong with something until you dive into documentation. This post describes one such case that was non-obvious to me.
How to make custom form binders in play! 2016-9-27
If you've ever needed to handle a custom type within a form element, look no farther than here!
Guice in Scala: Checked Providers 2016-9-12
How to use Guice's @CheckedProvides method in scala
MySQL & JDBC timezone gotcha's 2016-9-1
Dealing with UTC to local timezone conversion problems from a JVM application. One way to get around issues.
Getting a String before another in MySQL 2016-7-5
A helpful database function and methodology for extracting strings from blob-like columns
Request Bodies and Java 2016-5-10
A look into the code that runs Java's HTTPUrlConnection that displays an inconsistency with the RFCs defining HTTP
Partial file uploads in Play with ResumableJS 2016-4-15
Implementing a backend for the ResumableJS library using the Play! framework.
Combining Asset's on the fly in Play (javascript example) 2016-3-1
An example of how to combine asset's and configuration data (or other assets as you'd like.
Dockerized Play! App continously restarts? 2016-2-24
How to fix an issue with play applications running inside a docker environment that can happen if the system quits unexpectedly.
Let's Exploit Magento! (< 2016-1-27
Educational example of how to create an Exploit for Magento systems running versions less than!
How to implement Subresource Integrity (SRI) 2016-1-9
SRI is an upcoming way to secure third party assets and provide defense against malicious code being ran within browsers. In this post I talk about how to implement and automate updating HTML elements with the required attributes
How to test the PlayFramework Mailer 2015-12-8
SMTP Servers can be a pain to setup, but if you're using a JVM based language you're in luck! This post shows how to integrate GreenMail with Play!
Upload binary data in play 2015-12-18
How to upload binary data in play and parse the bytes. Also shows how to grab EXIF data from an image as an example of the upload.
Bashing Logs 2015-12-15
Monitoring log files and performing an action once the file is silent for a period
Building Content State from Workflow and Audit Logs 2015-11-22
Workflows are integral to any business, and keeping track of changes is as well. There are many systems out there that do this, but what are some basics? This post explores some.
How to set Netty options in Playframework 2015-11-19
Setting netty options like timeouts or backlog's is easy if you know how. This is how to do it with play
How to connect VisualVM to Docker 2015-11-18
Connecting to a JVM is easy with VisualVM, butwhen it's a remote machine you need to add a few parameters. Dockers no different.
How to create an SBT task that takes an argument 2015-11-14
If a task only differs by a parameter, then use a parameter! How to do this in SBT isn't too hard, but SBT's documentation can be thick. This post will help.
Combine XML files with Bash 2015-10-23
How to handle simple XML with the built in CLI tools
Scala, XML, and XSD Validation 2015-10-15
Loading XML in scala is easy, but you can only gain a sense of type safety if your XML is loaded and validated against a schema. Here's how to do that
Spray ToResponseMarshallable "Too Many Arguments" error 2015-10-2
An error with a non-helpful error message and its solution.
NewRelic, Scala, and XML Instrumentation 2015-9-21
The XML Instrumentation of New Relic allows you to monitor your code without modifying the source itself. In order to do so you need to know classnames, and this post talks about finding out what classes those are.
WordPress 4.2 Exploit, SQL Injection Edition 2015-8-23
While looking through my email I saw CVE-2015-2213 and decided to try to exploit it on my local machine to compromise a wordpress site. Script Kiddies don't try this at home! (Post for educational purposes only)
Multiple Deploy Keys and Jenkins 2015-8-21
Setting up multiply deploy keys and continous integration in jenkins with github.
Administrative Gotcha when doing local proxying 2015-8-14
Attempts at security don't matter if people don't test things or understand the full configuration of a system
Spray's Transparent Head Requests and Testing 2015-7-11
It is not possible to fully test HEAD-only routes in spray, and this can lead to unexpected behaviors in production system. This post is about a gotcha to be wary of
Logging to a File in Spray 2015-8-6
Setting up logback files with AsyncAppenders for Spray
Serializing Generic Types with Spray JSON Library 2015-7-24
Continuing from the last post, this is how you can take generic base classes and allow the serialization code to convert them to the appropriate subclass.
Serializing java.util.Locale with Spray JSON library 2015-7-22
An example of how to serialize and deserialize the Locale class using the spray-json library
A Year of committing to Github 2015-7-14
I decided to challenge myself to commit every day for a year to github, so I did. And this is some reflection on what doing that has done for me
Aspect Ratios, Math, and Scala 2015-7-7
A post about implementing AspectRatio Enums and some helpful conversion implicits
401 Unauthorized and 400 Bad Request from Sonatype Nexus in SBT 2015-7-2
How to fix SBT and Nexus sonatype when you're just starting out and making mistakes. A few cautionary points
Type Error when using None as a default to Option.fold 2015-6-25
Using fold on option is a considered more functional, using None as a default will cause a compilation error because None doesn't share a common ancestor with the other result, this is how to get around that.
Scala Scrimage error solution: the org.apache.batik.transcoder.TranscoderException 2015-6-24
Ran into an error about not being able to find the SVGImageReader class with a root cause of TranscoderException, this is how to fix it
Manipulating XML with PHP 2015-6-17
A few ways to add, remove, and update XML node values with PHP's DOM libraries
Generate Conditional AWS Group Policies with AWScala 2015-6-15
How to programmatically generate a policy containing conditionals for AWS group S3 access with AWScala
Reverse routing with non-standard controller packages in Play 2015-6-11
Having a different package hierarchy than that shown in the play documentation can make one wonder how to link to actions in templates. This is how you do it!
Trigger Asynchronous Jobs in Play 2.3 2015-6-2
Since version 2 of the PlayFramework deprecated the jobs package, you need to create jobs in a different way. This is how to use the Akka System embedded in play to do so
Non Empty List Form Validation in Play 2015-5-22
How to use Play's form validation package to create non-empty constraints when binding forms
PHP Snippet 2015-5-21
A snippet of code displaying the elegance and usefulness of PHP
shell_exec with sudo in php 2015-5-15
How to setup your system to run shell_exec from a web server that needs root privilege.
Using sassc with play-sass plugin 2015-5-13
How to use the c sass compiler sassc with play-sass
Akka DSL's and Routing In Play with Cake Pattern 2015-5-12
A look at a basic Akka program, then into how to setup multiple routes using the Cake Pattern in Spray
Which is faster, string interpolation or addition in python? 2015-5-11
Ever wonder if string addition is faster than interpolation? Or if it's the other way around? In this post I show you just how to find out for yourself, and of course, which is faster
Dot Paths in Harp? Unexpected Behavior! 2015-5-9
Truncation of keys in _data.json results in 404s if you have dots in your url paths when you use HarpJS
Value EnablePlugins is not a member of sbt.Project error 2015-5-9
An error I ran into while setting up a project that had an unintuitive solution
Install and Backup a MongoDB Replica Set 2015-5-2
How to create a development mongo replica cluster and a simple way of backing up the data.
Handling Has-Many Relationships with Slick 2015-4-29
An example of how to query Slick for has many relationships and map the results to case classes
Value Raw is not a member of String, Scala Error 2015-4-27
Stumbled across an odd compilation and interpolation error today in my travels through scala.
Targeting Java Platforms with SBT 2015-4-25
How to target environments other than your own JVM for SBT. Just in case you're running a legacy environment or environments don't run the same JVMs
An Adventure with strace 2015-4-24
Troubleshooting an application running in Apache with strace
How to remove your entire google search history 2015-04-21
Google released the ability to remove your search history from their servers. This is how to do it
PlayFramework XML Templates and Scala 2015-3-31
XML Templates are easy to make in Play/Scala, and this is a simple tutorial on how to show that
Setting Thousands Separator in Drupal 7 2015-3-25
How to set the thousands operator in Drupal 7 for fields retrieved through field_view_value
Watermarking Images with Scala (play) 2015-3-18
Delegating your assets through a Watermarking controller can easily allow one to copyright their images
Elastic Search filtered Aggregations 2015-3-14
A small example of how to narrow down specificity within elastic search for search tools
Approaching Optimizations 2015-3-9
My friend requested I write about how I approached an optimization problem, so here it is!
Preparing for Green Up 2015-3-7
The configuration and setup of the API servers for this years green up vermont.
Write your own service init scripts 2015-3-6
Ever wonder how to make your services restart when your server does? This is how!
Encrypting your chat with mcabber 2015-2-21
How to use mcabber and gpg to easily establish a secure and private way of talking to loved ones
A brief look into Scala 2015-2-20
A random post about some parts of scala I found interesting
Lost and Found Application 2015-2-10
A highly customizable and user focused application. Meant to help support administrations at events track lost items and assist the people who need them found
Partial Processing of Slow Java Services with ExecutionService 2015-2-6
If you've ever needed to process partial data that a web service can return, then this post might help you time out so you don't block your whole application
Vim pgp/gpg macros to enhance mutt 2015-1-27
Two macros to encrypt and decrypt messages easily
Segfault in apt-get while trying to install 2015-1-26
While trying to install mutt, I ran into a segfault in apt-get, here's how I fixed it
Github Awesome Autocomplete Review 2015-1-21
A look into how awesome the GitHub Awesome Autocomplete really is, turns out, it's pretty wizard.
Adding Right Click context actions to Caja 2015-1-14
A simple script to enable stripping of exifdata from the caja file manager
Fixing Chromium's seccomp logging to dmesg 2015-1-12
If chromium is spamming seccomp error messages to your kernel log, here's how to stop and fix it
Attempting to install Gentoo into VirtualBox 2015-1-11
This fails, but hopefully if someone knows how to fix it they'll let me know.
Stopping mysql Upstart issues without reinstalling 2015-1-6
Troubleshooting a broken mysql installation without apt-purging
Plugin to Ban users and deny registration in WordPress 2015-1-5
An expansion on the last blog post, a simple plugin to help moderate your site
Deny spam emails from registering in WordPress 2015-1-3
It only takes a single function to mitigate spam accounts clogging your database with spam users.
Context Menu Button to remove Exif Metadata 2015-1-1
Make removing metadata from images easier by creating a context menu command to do it for you
Change Wordpress login URL 2014-12-31
It's been blogged to death, but this is how you change the login URL for Wordpress 3.7
Create an RSS feed with Harp 2014-12-19
If you want to add an RSS feed to your website and you're using Harp, this is the post for you
Setting Chromium as the default browser for GotoDocumentation in Sublime Text 2 2014-12-15
GotoDocumentation is a pretty cool package for ST2 that opens documentation in a keystroke, but it doesn't support chromium or chrome on all platforms, this is how you hack it.
Proxy Paranoia and DNS resolves 2014-12-12
A few updates and some non-thinking and it's solution. Just a chronicle of fixing a resolv.conf goof
Make your own Mailing List 2014-12-8
Making a mailing list to share websites and links with your friends is really easy, check out how to do it here.
Adding days with Java 2014-11-25
Adding and subtracting days in Java, also, how to get the end of the month and first of the month. Useful for database queries and jobs
Displaying Business hours with PHP 2014-11-19
Storing business hours in a database is a common usecase, having searchable business directories is even better. This is one way to do it
Shared Voice - Activist's tool 2014-11-17
A tool similar to, but more suited for anonymous culture
*Arc: My First Chrome Extension 2014-11-06
A simple archiving plugin, my first chrome extension and some thoughts on it
Dynamic Tablename's in Order By with NamedParameterJdbc 2014-10-31
When you want to have a parameterized Order By clause and you need to specify the table as well as the column, this is what you do
Use Native Library Classes in XML Beans (OpenCV) 2014-10-28
With normal Java classes you can use System.loadLibrary to use native libraries, but what do you do when you're configuring classes via XML?
Order by Rand without a starting ID of 1 2014-10-23
There are many posts that discuss how not to use order by rand. However all of these fail to address what to do when the distribution of numbers lies at only one extreme of a range. This is how you handle that.
Teaching Through Games 2014-10-17
Educating young students and mentoring people is a great way to give back to the community, when doing so it's great to engage them, and a great way to do so is through games
Fixing the flash player in Chromium Version 37 2014-10-14
How to fix pepper flash for chromium version 37 after upgrading
Using Encrypted Search in Chrome 2014-09-25
Showing how to set up your browser for more secure searches! For chrome only
Coloring Likert Scales with LESS CSS 2014-09-01
Showing how to use a recursive mixin in LESS CSS to create easily coloured likert scales.
Autoload your CSS and Javascript in Harp 2014-08-25
In a follow up to the last post, I'll show you how to use the same technique to load both CSS and Javascript
Loading JS dynamically in Harp 2014-08-24
How to dynamically include Javascript on a page served by harp
Let's make a chat server, Part 3 2014-08-23
Third installment of a C CGI and Harp powered chat platform. This post shows how to create the web interface to the server
Let's make a chat server, Part 2 2014-08-21
Second installment of a C CGI and Harp powered chat platform. This tutorial focuses on the CGI and qdecoder portions.
Let's make a chat server, Part 1 2014-08-16
First installment of a C CGI and Harp powered chat platform. The first part focuses on C-based internal functions.
Adding Scheduled Posts to your Harp Site 2014-08-13
How to create scheduled posts for your Harp Site
Authorize LineItem's, mixed free and paid for causes error 2014-08-06
Ran into a problem where's API wasn't accepting 0 as a unit price because it wasn't formatted as 0.00, but only when a free and non free item were in the line items.
Private Talk and plans for some tutorials 2014-08-03
Some thoughts after creating a private chat server with c and qdecoder. Planning to create a set of tutorials
Harp CDN Macro Revisited 2014-07-22
Revisiting a macro in a previous blog post, cleaning it up for browser caching performance
BGI, a way to track your spending 2014-07-21
Playing around with C CGI scripting in order to track spending habits is fun! A look into a side project.
XML Sitemap for Harp JS 2014-06-26
How to generate a valid XML sitemap for your HarpJS site. It's easy!
Custom Permalinks for Custom Tables and Pages 2014-06-25
How to create custom permalinks for custom pages and page templates. If you're using a custom table and need to alter information on a Page template based on this, then this blog post is for you!
'Caught in the Spiders Web' -- A googlebot Heisenbug 2014-06-23
An interesting bug occured today, and it was all googles fault...
HarpJS and Macros, Static Delivery for Static Content 2014-06-20
A HarpJS recipe for leveraging CDN's and Static content delivery for your HarpJs site
Spring Batch ItemProcessListener Example 2014-06-18
I couldn't find an example of an item processor being used anywhere, so I decided to make one myself! A simple and quick example of how to use an ItemProcessListener from Spring Batch's
Serial Hill Climber in GoLang 2014-05-20
My first foray into GoLang, creating a simple serial hill climber (the simplest of all evolutionary algorithms) in GoLang. Using some of the concurrent features of Go make it a very powerful language for Evolutionary method implementations.
Green Up Vermont 2014-05-04
A short look into what the Green Up VT launch day was like for the developers at XenonApps who monitored the application all day.
Varnish Directors and API Caching 2014-05-02
How to setup round robin, and health checks for multiple back ends behind Varnish HTTP Cache. GreenUp VT API Server as a case study.
Adding Actions to the WordPress User Lists 2014-04-25
How to add links and actions to the 'users.php' page of WordPress via filters.
404 Error from WordPress Form Submit with an input named 'name' 2014-04-05
Discovery of a bit of an oddity in WordPress's form input names, you can't have one named 'name'!
Grails Service Mocks 2014-03-26
Stubbing out unneccesary service calls in Grails without Mocks
Resource Replace, update js and css domain links 2014-03-06
Information about a small plugin to update javascript and css domain names for easier CDN usage for WordPress sites that I wrote.
Gripes with wordpress's postmeta and autoload 2014-02-28
A short tirade about how poor defaults for indexes and shoddy plugins can cause a large amount of pain for a WordPress site's performance
Varnish and API Servers 2014-02-17
How to configure Varnish for caching of RESTful resources for API Servers, the GreenUp Server configuration is used as an example
Harp and Smut 2014-01-27
A short post about the first time I used Harp to create a website
Incorrect Time in PHP despite Timezone 2014-01-16
A weird configuration problem with TimeZone settings in PHP and how it was fixed.
Using Chunked Encoding for Reporting in Wordpress 2014-01-9
When writing pages that have a lot of output, it's beneficial to use Chunked Encoding rather than Content-length, this post talks about doing it for reporting screens in WordPress
Hosts file and Testing deployment 2014-01-2
A easy way to trick your computer into using a test environment with a live URL.
My Cooking Recipes 2013-12-3
Blog post about creating the first design and implementation of the cooking section of my website.
Empty Post__in WordPress problem 2013-11-27
A short description of a small problem I ran into while using the WP_Query class with an Empty post__in field.
HTML Templates and Handlebar 2013-11-25
While looking into some new technology, I ended up messing around with HTML Templates and thought they were cool enough to write about
Numbers as Markers on Google Maps 2013-10-25
How to have custom markers on a google map that show numbers
Short Codes and Routing in WordPress 2013-10-3
While creating a WordPress module for work, I wanted to serve up a php page, nothing particularly WordPress-y about it, but I ran into some interesting snags that I documented.
Stack Smashing 2013-10-2
A short post about how I ran into an interesting case of Stack Smashing while working on the GreenUp VT REST API written in C.
Time Catcher Part 3 2013-09-25
The third part of the TimeCatcher program series, discussion on implementation of pausing and deleting tasks within the program.
Time Catcher Part 2! (Alpha) 2013-09-07
The second part of the 3 part blog series on my program, Timecather. In this post I talk about a few of the algorithms used within the programmer and a couple other interesting pieces of the code.
Time Catcher Part 1 2013-09-01
The first of a 3 part blog post where I kept running commentary as I created my TimeCatcher programmer.
How this site was made 2013-07-30
An (out of date) overview of how this website was made. I used my XeMark language as a static site generator for one of the versions of my website.
Git Crash Course 2013-07-30
A short tutorial on some of the basics of using Git version control.