congx.dev https://congx.dev/ Recent content on congx.dev Hugo -- gohugo.io en-au Thu, 06 May 2021 00:33:00 +1100 Demysitifying the Cognitive Enterprise - What is it? https://congx.dev/posts/cognitive-enterprise-what-is-it/ Thu, 06 May 2021 00:33:00 +1100 https://congx.dev/posts/cognitive-enterprise-what-is-it/ This article was original posted on LinkedIn. This article is co-authored with Kevin Nguyen. The opinions shared in this article are our own and do not reflect those of our employer(s). What is a cognitive enterprise? The short version Cognitive enterprise is a data-driven organisation that has a thorough understanding of the technology between different business units and why they exist, i.e., what they can do for their users and their customers. Multi-objective Optimisation with IBM ILOG CPLEX - Part 2 https://congx.dev/posts/multiobjective-optimisation-with-ibm-ilog-cplex-2/ Mon, 04 Jan 2021 00:33:00 +1100 https://congx.dev/posts/multiobjective-optimisation-with-ibm-ilog-cplex-2/ Recap part 1 In part 1, I created some multi-objective optimisation models with OPL using both the CP Optimiser and CPLEX Optimiser. However, I hit a no-documentation barrier when started using the staticLexFull() function and found the DOcplex.mp Python example to be a more readable. In this post, I’ll take a look at first converting the existing weighted model to Python, proceed with adding additional weights to the model and finally deploy the model to run on IBM Cloud with Watson Machine Learning. Multi-objective Optimisation with IBM ILOG CPLEX - Part 1 https://congx.dev/posts/multiobjective-optimisation-with-ibm-ilog-cplex-1/ Sun, 03 Jan 2021 23:33:00 +1100 https://congx.dev/posts/multiobjective-optimisation-with-ibm-ilog-cplex-1/ Eons ago (2015), I played this online game called Tribal Wars 2 and created a report that summarised the best troops combination to build. Recently, however, the game maker Innogames wiped their online forums to its pre-historic ages, which happened to include my report on army sizes. Back then, I used MATLAB Optimization Toolbox. Now I’m going to give IBM ILOG CPLEX a try and see how it goes. In this first post, I’m going to: Custom Light Theme for Hugo Terminal https://congx.dev/posts/custom-light-terminal-theme/ Sat, 02 Jan 2021 03:55:00 +1100 https://congx.dev/posts/custom-light-terminal-theme/ I really like Panr’s Hugo theme Terminal. It’s beautiful. For long texts, however, the contrast can make texts a bit hard to read. This post outlines the files I made customisations to, to create a light theme with a dark blue accent. This is in no way a complete customisation of the Terminal theme, just enough of it that fits my current needs. Create a new theme variant To begin creating a new theme variant, I use my existing blog https://congx. Transcription: It can't be wrong https://congx.dev/posts/transcription-it-cant-be-wrong/ Sun, 19 Apr 2020 09:13:00 +0000 https://congx.dev/posts/transcription-it-cant-be-wrong/ Sung beautifully by Seven of Nine while she was under the neural link that falsely made her believed she was the lounge singer in the night club Le Coeur de Lion during a holographic recreation of 1944 Sainte Claire in occupied France, “It Can’t Be Wrong” is a beautiful arrangement with a soft accompanied bar piano. Sadly, however, the recording was never released and a part of the song was voiced over by other characters in the show. XPSL Docs: Functional requirements https://congx.dev/posts/xpsl-docs-functional-requirements/ Fri, 13 Dec 2019 04:57:00 +0000 https://congx.dev/posts/xpsl-docs-functional-requirements/ There are 4 types in XPSL: user, room, track, playlist. This blog post lists the functional requirements for each of these types. XPSL User A user must have access to either Spotify or Apple Music A user must authorise XPSL for their Spotify and/or Apple Music account User can only belong to 1 room User can create a room or join a room once they have authorised XPSL to access Spotify and/or Apple Music XPSL will refresh Spotify access token on the user’s behalf Each XPSL user has a unique ID A user must have a display name A user could have a short name XPSL user client is a NATS client that subscribe to a XPSL Room (NATS Topic) XPSL Room Each room has a group of users who manage a shared playlist Room is a NATS topic that multiple users can subscribe to Each room has a topic ID of xpsl-room- Each room can have 1 or more users. Building and shipping Hugo posts with Travis CI for Github Pages https://congx.dev/posts/build-ship-hugo-travisci-gh-pages/ Tue, 10 Dec 2019 14:40:00 +0000 https://congx.dev/posts/build-ship-hugo-travisci-gh-pages/ Since my blog source code is private, this blog post contains snippets of how I set up Travis CI to build and push Hugo’s public folder to another repository that hosts my public Github Pages. It’s a simple solution, yet the top Google results only feature custom scripts 🤷🤷‍♀️🤷‍♂️. Configuring Travis CI .travis.yml --- install: - curl -LO https://github.com/gohugoio/hugo/releases/download/v0.59.1/hugo_0.59.1_Linux-64bit.deb - sudo dpkg -i hugo_0.59.1_Linux-64bit.deb script: - git submodule init - git submodule update - hugo - rm -Rf . XPSL Docs: Motivation and Overview https://congx.dev/posts/xpsl-docs-motivation-overview/xpsl-docs-overview-and-motivation/ Tue, 10 Dec 2019 11:39:00 +0000 https://congx.dev/posts/xpsl-docs-motivation-overview/xpsl-docs-overview-and-motivation/ Motivation Walking on the street, listening to a song you like, sharing that song with your friends, do a bit of silent dancing on the street, groove a little bit. Maybe you like that song your friend suggests, and wants to add it into your own music library. Except you are on Apple Music and your mate is on Spotify. There are no services out there that offers a unified listening experience across multiple music providers. README https://congx.dev/readme/ Sat, 23 Nov 2019 22:31:00 +1100 https://congx.dev/readme/ Hi, my name is Cong. I am a developer advocate at IBM. I am passionate about learning new technologies and applying them to make people’s lives easier. I enjoy writing articles and giving talks at local meetups and conferences. You can find me at IBM Developers. On a day to day basis, I work proactively with clients across industries to implement and deliver enterprise IT projects using web and mobile, to cognitive and Blockchain. How Toddler plays https://congx.dev/posts/how-toddler-plays/ Fri, 20 Sep 2019 16:16:00 +1100 https://congx.dev/posts/how-toddler-plays/ Back when I first started looking into making the manager (like 4 years ago), looking through Github’s projects on automating Tribal Wars 2, I found most, if not all, of the projects relies on automating the browser instead of utilising the the game’s WebSocket connection. Therefore, I think it’s worthwhile to capture the essence of how the game client talks to the game server. Hopefully, this blog post may be helpful to those looking to automate this game. Logging with Papertrail https://congx.dev/posts/logging-with-papertrail/ Sun, 23 Jun 2019 16:44:00 +1100 https://congx.dev/posts/logging-with-papertrail/ IBM Cloud is deprecating Kibana as a method to view Cloud Foundry logs. Moving forward, they are recommending LogDNA as a 3rd-party service. That’s cool. The process of logging Cloud Foundry is simple enough anyway. With the general CF CLI, you would: Create a user-provided service with cf cups DRAIN-NAME -l SYSLOG-URL. Bind an app to the created service instance with name DRAIN-NAME as follows cf bind-service APP-NAME DRAIN-NAME. Simple right? Birth of Toddler https://congx.dev/posts/birth-of-toddler/ Thu, 13 Jun 2019 08:51:00 +1100 https://congx.dev/posts/birth-of-toddler/ Tribal Wars 2 Manager is now called Toddler! Why? It’s a shorter name. Additionally, there had been a few changes to project Toddler: RabbitMQ swapped out for NATS Project repos hosted on Github auth-svc is now called toddler-auth data-svc is now called toddler-world-data Elasticsearch is removed completely to simplify development World data is stored into a MongoDB database Deployment is sharply turned to Cloud Foundry - so much cheaper Beyond the basics with Cloud Foundry https://congx.dev/posts/beyond-the-basics-with-cloud-foundry/ Wed, 12 Jun 2019 23:00:00 +1100 https://congx.dev/posts/beyond-the-basics-with-cloud-foundry/ The advent of Docker changed the way we develop applications. Once you had written a Dockerfile and built the image, your application will run (almost) anywhere, regardless of the underlying operating system, and best of all, it just works. You can then expose ports, map volumes to persist data and deploy your image in Docker Swarm or Kubernetes (K8s). With great flexibility, however, comes greater costs, whether that is increased developer’s skillset requirements and time spent on writing multiple K8s YAML config files, or pricier services on your favourite cloud provider. There will be ThinkPad keyboard controllers https://congx.dev/posts/thinkpad-keyboards-controllers/ Sun, 31 Mar 2019 12:25:00 +1100 https://congx.dev/posts/thinkpad-keyboards-controllers/ A long long long time ago, finding an absence of projects on the internet to re-use a ThinkPad T60 keyboard to be used as a USB keyboard, I set out to research, make USB adapter kits and write documentation to this project. It was a success! I learned how to: Hunt down ThinkPad laptop schematics Design circuits in Eagle and eventually Altium Designer 3D modelling in Autodesk Inventor and rendering in Autodesk Showcase Send out PCB gerbers to abroad board houses for prototyping Write firmware for my first ever first USB microcontroller MSP430F5510 Develop a HID bridge firmware for Bluetooth 4. Tribal Wars 2 Manager - Authentication Service https://congx.dev/posts/tribal-wars-2-manager-authentication-service/ Mon, 31 Dec 2018 21:32:00 +1100 https://congx.dev/posts/tribal-wars-2-manager-authentication-service/ In the previous post, I mentioned the 6 services essential to wrap up the Tribal Wars 2 manager: data collection, alert, farm, ops and build-recruit services. Before that to happen however, we need to figure out a way to talk to the game i.e. the authentication service. Core service overview The source code for this service is hosted at https://bitbucket.org/cn-d/auth-service. The authentication service is sandwiched between the 6 services and the game server. Tribal Wars 2 Manager - Services Overview https://congx.dev/posts/tribal-wars-2-manager-services-overview/ Wed, 26 Dec 2018 06:53:00 +1100 https://congx.dev/posts/tribal-wars-2-manager-services-overview/ Merry Christmas everyone, and Happy Boxing day to folks in the Southern hemisphere. In the last post, I wrote about the tech I’d like to play with for this project, but never really go into what each of the services does. This prompts the question to some of my mates who don’t play Tribal Wars “does this application need to be this complex?”. Besides getting all the tech in, what functionalities and services should this project provide to the player? Adding Talk to Ghost https://congx.dev/posts/add-talk-commenting-to-ghost/ Sat, 22 Dec 2018 00:20:00 +1100 https://congx.dev/posts/add-talk-commenting-to-ghost/ Back when this blog still ran on Ghost, I added Mozilla Coral Project’s Talk to Ghost, and… Legit, adding Talk to Ghost is not as straightforward as the documentation. While the Quick Start is simple enough on running Talk on your own server, what they don’t mention is the amount of overhead setup that comes with it. Being a noob to Ghost, NGINX and hosting a blog on my own server made the setup experience frustrating for me. Tribal Wars 2 Manager - Architecture https://congx.dev/posts/tribal-wars-2-manager-architecture/ Thu, 20 Dec 2018 17:24:00 +1100 https://congx.dev/posts/tribal-wars-2-manager-architecture/ Earlier this year, I developed a single process NodeJS application for all the services in this manager (shown down below) and it started to raise out-of-memory errors due to Node’s limitation. This project aims to eliminate this problem by splitting the manager into multiple services. This blog post serves a documentation for the high-level design of my Tribal Wars 2 manager. The development for this project is not about cheating in Tribal Wars 2 but using the game as a motivator to learn new technologies. What is this blog about? https://congx.dev/posts/my-first-post/ Wed, 19 Dec 2018 12:12:01 +1100 https://congx.dev/posts/my-first-post/ This is my fresh start to personal blogging. Back in 2012, I was a huge advocate for Adobe Flash despite Apple’s decision to exclude it from the OS’s and remote-controlled toys. So I started flashandrc.wordpress.com. After a while, my interests grew past Adobe Flash and remote-controlled helicopters, and evolved onto transcribing music that I like and making electronics. Soon, my blog became the go-to knowledge base for ThinkPad keyboards and Machinarium bossa nova guitar piece transcription. Machinarium transcription https://congx.dev/posts/machinarium/ Tue, 08 Jan 2013 01:12:01 +0000 https://congx.dev/posts/machinarium/ Low-key, Machinarium was my favourite iPad game. It was an adventure-collecting game, where a little robot with his extendable arms and legs, going around his little world to collect items to help out his friend (I think, it’s been a while). In this one particular scene, when the robot enters a bar, there is this beautiful bossa nova piece. After a few fruitless Google searches, I decided to transcribe the piece.