<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Featured on LunaticThinker.me</title><link>https://lunaticthinker.me/categories/featured/</link><description>Recent content in Featured on LunaticThinker.me</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 18 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://lunaticthinker.me/categories/featured/index.xml" rel="self" type="application/rss+xml"/><item><title>We are using AI badly</title><link>https://lunaticthinker.me/posts/2026-10-18-we-are-using-ai-badly/</link><pubDate>Sun, 18 Oct 2026 00:00:00 +0000</pubDate><guid>https://lunaticthinker.me/posts/2026-10-18-we-are-using-ai-badly/</guid><description>&lt;p&gt;I have used language models since GPT-2. They were awkward, often wrong, and occasionally useful. Their limits were obvious. You gave them a small job, checked the answer, and never mistook confidence for knowledge.&lt;/p&gt;
&lt;p&gt;Coding models are much better now. They can find their way through a repository, propose a change, write tests, and keep working for longer than the models I first used. I like that. They can take boring work off a developer&amp;rsquo;s plate and leave more time for design, debugging, and decisions that need context.&lt;/p&gt;</description></item><item><title>Giving AI Eyes and a Keyboard in the Terminal</title><link>https://lunaticthinker.me/posts/giving-ai-eyes-and-a-keyboard-in-the-terminal/</link><pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate><guid>https://lunaticthinker.me/posts/giving-ai-eyes-and-a-keyboard-in-the-terminal/</guid><description>How I built mcp-tuikit to give AI agents a virtual terminal, enabling them to visually test TUIs, take screenshots, and send keystrokes.</description></item><item><title>k6 Metrics to Datadog via Logs, StatsD, and OTEL</title><link>https://lunaticthinker.me/posts/k6-metrics-to-datadog-via-logs-statsd-and-otel/</link><pubDate>Wed, 10 Dec 2025 00:00:00 +0000</pubDate><guid>https://lunaticthinker.me/posts/k6-metrics-to-datadog-via-logs-statsd-and-otel/</guid><description>How we wired k6 to send metrics to Datadog using logs, StatsD, and OpenTelemetry, including the extra bits needed for AWS Fargate.</description></item><item><title>A TypeScript RESTful API Using Design Patterns, Creational</title><link>https://lunaticthinker.me/posts/2024-11-11-ts-01-restful-todo-design-patterns-creational/</link><pubDate>Mon, 11 Nov 2024 00:00:00 +0000</pubDate><guid>https://lunaticthinker.me/posts/2024-11-11-ts-01-restful-todo-design-patterns-creational/</guid><description>&lt;p&gt;Let’s talk about &lt;strong&gt;creational design patterns&lt;/strong&gt;—arguably the foundation of any well-architected system. At their core, these patterns focus on how objects are created. Why does this matter? Well, if you’ve ever written code that tightly couples object creation to the logic that depends on those objects, you’ve likely felt the pain of trying to refactor it later.&lt;/p&gt;
&lt;p&gt;Creational patterns abstract that creation process, giving us flexibility and reuse. By adopting these patterns, our systems become more scalable, maintainable, and adaptable. In this article, we’ll explore how creational patterns can bring order and elegance to a RESTful API built with TypeScript. And yes, we’ll sprinkle in some practical examples to keep things grounded.&lt;/p&gt;</description></item><item><title>A TypeScript RESTful API Using Design Patterns</title><link>https://lunaticthinker.me/posts/2024-11-10-ts-01-restful-todo-design-patterns-intro/</link><pubDate>Sun, 10 Nov 2024 00:00:00 +0000</pubDate><guid>https://lunaticthinker.me/posts/2024-11-10-ts-01-restful-todo-design-patterns-intro/</guid><description>&lt;p&gt;&lt;strong&gt;Design patterns&lt;/strong&gt; represent foundational approaches to recurring challenges in software architecture. They encapsulate best practices in object-oriented design, providing flexible, adaptable templates that developers can apply to construct robust, maintainable, and scalable systems. By adhering to established, reusable strategies, design patterns facilitate problem-solving in complex software environments and contribute to systematic, reliable development practices.&lt;/p&gt;
&lt;h3 id="the-significance-of-design-patterns"&gt;The Significance of Design Patterns&lt;/h3&gt;
&lt;p&gt;The application of design patterns offers multiple, distinct advantages within the software development lifecycle:&lt;/p&gt;</description></item><item><title>What Are Design Patterns</title><link>https://lunaticthinker.me/posts/2024-07-03-what-are-design-patterns/</link><pubDate>Wed, 03 Jul 2024 00:00:00 +0000</pubDate><guid>https://lunaticthinker.me/posts/2024-07-03-what-are-design-patterns/</guid><description>&lt;p&gt;Design patterns are one of those topics that sound academic until the day you recognize one in a gnarly codebase and realize, “Oh, this is just a badly implemented Strategy/Factory/Observer.”&lt;/p&gt;
&lt;p&gt;At their core, &lt;strong&gt;design patterns&lt;/strong&gt; are reusable solutions to recurring design problems. They’re not copy‑paste snippets, but named approaches for handling object creation, composition, and interaction so your systems stay robust, scalable, and maintainable.&lt;/p&gt;
&lt;p&gt;Think of them as a shared vocabulary and a set of time‑tested shortcuts. Instead of reinventing the wheel—or arguing endlessly about shapes—you reach for patterns that many teams have already battle‑tested.&lt;/p&gt;</description></item><item><title>What Are Coding Principles</title><link>https://lunaticthinker.me/posts/what-are-coding-principles/</link><pubDate>Sat, 15 Jun 2024 00:00:00 +0000</pubDate><guid>https://lunaticthinker.me/posts/what-are-coding-principles/</guid><description>&lt;p&gt;I’ve spent enough hours untangling legacy code to see how quietly entropy spreads: a duplicated validation, a helper that knows too much, a 200‑line function nobody wants to touch. The principles below are habits that keep change local and predictable. Reach for one when a concrete symptom shows up—duplicate logic, volatile dependencies, unreadable flow—not for the comfort of ticking a box.&lt;/p&gt;
&lt;p&gt;For each principle you get: intent, indicators, refactor moves, examples, and trade‑offs. Use what solves the pain in front of you; ignore the rest until it hurts.&lt;/p&gt;
&lt;p&gt;So what are coding principles, exactly? In this article, I’m using the term to mean shared heuristics for writing and shaping code: compact rules of thumb that help multiple people on a team make compatible design decisions over time. They are not laws or style‑guide pedantry; they are reusable decision patterns that reduce surprise, keep behavior consistent, and make change cheaper. A good principle gives you a way to name a kind of problem (&amp;ldquo;this is a DRY violation&amp;rdquo;, &amp;ldquo;this is YAGNI&amp;rdquo;) and a default direction for fixing it.∂&lt;/p&gt;
&lt;p&gt;Practice:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Implement for current, confirmed requirements.&lt;/li&gt;
&lt;li&gt;Introduce pattern only after distinct variants appear.&lt;/li&gt;
&lt;li&gt;Cull unused scaffolding periodically.&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>The Necessity of Clean Code</title><link>https://lunaticthinker.me/posts/the-necessity-of-clean-code/</link><pubDate>Wed, 12 Jun 2024 00:00:00 +0000</pubDate><guid>https://lunaticthinker.me/posts/the-necessity-of-clean-code/</guid><description>&lt;p&gt;Clean code is the bedrock of sustainable software development. It is not an aesthetic preference or a luxury for “perfect” teams—it is the difference between a codebase that accelerates value delivery and one that silently taxes every future change.&lt;/p&gt;
&lt;p&gt;Inspired by the principles popularized by Robert C. Martin (Uncle Bob), clean code emphasizes clarity of intent, separation of concerns, simplicity over cleverness, and a relentless focus on reducing accidental complexity. When code is written cleanly, it becomes a living system that can evolve safely. When it isn’t, every change becomes a negotiation with risk.&lt;/p&gt;</description></item><item><title>The controversy of JavaScript runtime environments</title><link>https://lunaticthinker.me/the-controversy-of-javascript-runtime-environments/</link><pubDate>Thu, 16 May 2024 23:39:51 +0000</pubDate><guid>https://lunaticthinker.me/the-controversy-of-javascript-runtime-environments/</guid><description>&lt;p&gt;For nearly a decade, I have honed my skills as both a frontend and backend developer. Over the past five years, my focus has primarily been on backend development, specializing exclusively in &lt;a href="https://en.wikipedia.org/wiki/JavaScript"&gt;JavaScript&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Hold on, isn&amp;rsquo;t JavaScript both a programming language and a standard? Actually, no. &lt;a href="https://en.wikipedia.org/wiki/ECMAScript"&gt;ECMAScript&lt;/a&gt; is the &lt;a href="https://tc39.es/ecma262/"&gt;standard&lt;/a&gt;, and &lt;a href="https://en.wikipedia.org/wiki/JavaScript"&gt;JavaScript&lt;/a&gt; is just an implementation of that standard.&lt;/p&gt;
&lt;p&gt;Do I, as a programmer, need to concern myself with the distinction above? Perhaps I should. However, my intent isn&amp;rsquo;t to debate the nuances of the programming language or the standard that underpins this elegant and versatile language. I&amp;rsquo;m also not here to delve into the complexities and debates surrounding &lt;a href="https://en.wikipedia.org/wiki/List_of_ECMAScript_engines"&gt;&lt;strong&gt;JavaScript Engines&lt;/strong&gt;&lt;/a&gt; and the emerging concept of &lt;strong&gt;JavaScript Runtime Environments&lt;/strong&gt; (&lt;em&gt;admittedly, I haven&amp;rsquo;t found a definitive source that encapsulates what I&amp;rsquo;m about to discuss, but let&amp;rsquo;s dive in anyway, shall we?&lt;/em&gt;).&lt;/p&gt;</description></item><item><title>Where to store uploaded files? File System versus Database storage.</title><link>https://lunaticthinker.me/where-to-store-uploaded-files-file-system-versus-database-storage/</link><pubDate>Thu, 23 Jul 2020 16:43:42 +0000</pubDate><guid>https://lunaticthinker.me/where-to-store-uploaded-files-file-system-versus-database-storage/</guid><description>&lt;p&gt;The purpose of this research, as described in the title, comparing the idea of storing files using either a Database or the mere FileSystem of the operating system by studying the experience of other people’s or companies’ and learning as much as possible from their experience.&lt;/p&gt;
&lt;p&gt;Almost all analyses and discussions present on different speciality websites, as well as dedicated database companies, present almost the same answer, and the same principles in storing uploaded files.&lt;/p&gt;</description></item><item><title>Cross Programming Language Encryption – C# vs JavaScript vs Go, Part 4</title><link>https://lunaticthinker.me/cross-programming-language-encryption-c-vs-javascript-vs-go-part-4/</link><pubDate>Wed, 10 Jun 2020 19:59:11 +0000</pubDate><guid>https://lunaticthinker.me/cross-programming-language-encryption-c-vs-javascript-vs-go-part-4/</guid><description>&lt;p&gt;&lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-cs"&gt;&lt;img src="https://img.shields.io/github/stars/lunaticthinker-me/demo-cross-lang-encryption-cs?label=Crypt%20C%23%20Demo&amp;amp;style=social" alt="GitHub stars"&gt;&lt;/a&gt; &lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-go"&gt;&lt;img src="https://img.shields.io/github/stars/lunaticthinker-me/demo-cross-lang-encryption-go?label=Crypt%20Go%20Demo&amp;amp;style=social" alt="GitHub stars"&gt;&lt;/a&gt; &lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-js"&gt;&lt;img src="https://img.shields.io/github/stars/lunaticthinker-me/demo-cross-lang-encryption-js?label=Crypt%20NodeJs%20Demo&amp;amp;style=social" alt="GitHub stars"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/dragoscirjan"&gt;&lt;img src="https://img.shields.io/github/followers/dragoscirjan?style=social" alt="GitHub followers"&gt;&lt;/a&gt;&lt;br&gt;
See a demo at &lt;a href="https://github.com/lunaticthinker-me"&gt;Github&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This 4th section of the article was written about a week after I finished the other 3 to clarify a mistake I kinda perpetuated from the begging. After reviewing my code, one of my colleagues raised the following issue: &lt;em&gt;even though I was using RSA encryption, I was using the wrong public and private key&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So I had to go back, to the beginning:&lt;/p&gt;</description></item><item><title>Cross Programming Language Encryption – NodeJs vs Go, Part 3</title><link>https://lunaticthinker.me/cross-programming-language-encryption-javascript-vs-go-part-3/</link><pubDate>Sun, 07 Jun 2020 02:12:19 +0000</pubDate><guid>https://lunaticthinker.me/cross-programming-language-encryption-javascript-vs-go-part-3/</guid><description>&lt;p&gt;&lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-cs"&gt;&lt;img src="https://img.shields.io/github/stars/lunaticthinker-me/demo-cross-lang-encryption-js?style=social" alt="GitHub stars"&gt;&lt;/a&gt; &lt;a href="https://github.com/dragoscirjan"&gt;&lt;img src="https://img.shields.io/github/followers/dragoscirjan?style=social" alt="GitHub followers"&gt;&lt;/a&gt;&lt;br&gt;
See a demo at &lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-js"&gt;Github&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Previous parts of this article treated encryption from the point of view of C# and GoLang programming languages.&lt;/p&gt;
&lt;p&gt;What I did not mention, was the full architecture of our application, which I should probably not and which eventually would also imply a module that will also need to send encrypted content from a &lt;strong&gt;NodeJs&lt;/strong&gt; module, towards our &lt;strong&gt;Go Lang&lt;/strong&gt; module.&lt;/p&gt;
&lt;p&gt;This also gave me the chance to extend a bit my research and try to make a 3 programming languages implementation of the same two crypto algorithms that I have started with: AES and RSA.&lt;/p&gt;</description></item><item><title>Cross Programming Language Encryption – CSharp vs Go, Part 2</title><link>https://lunaticthinker.me/cross-programming-language-encryption-csharp-vs-go-part-2/</link><pubDate>Sat, 06 Jun 2020 20:00:42 +0000</pubDate><guid>https://lunaticthinker.me/cross-programming-language-encryption-csharp-vs-go-part-2/</guid><description>&lt;p&gt;&lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-cs"&gt;&lt;img src="https://img.shields.io/github/stars/lunaticthinker-me/demo-cross-lang-encryption-go?style=social" alt="GitHub stars"&gt;&lt;/a&gt; &lt;a href="https://github.com/dragoscirjan"&gt;&lt;img src="https://img.shields.io/github/followers/dragoscirjan?style=social" alt="GitHub followers"&gt;&lt;/a&gt;&lt;br&gt;
See a demo at &lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-go"&gt;Github&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href="https://lunaticthinker.me/cross-programming-language-encryption-csharp-part-1/"&gt;The first part of this article&lt;/a&gt;{.aioseop-link}, discussed Encryption coding at C# level. It introduced you in the world of &lt;a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard"&gt;AES&lt;/a&gt;{.aioseop-link} and &lt;a href="https://en.wikipedia.org/wiki/RSA_(cryptosystem)"&gt;RSA&lt;/a&gt;{.aioseop-link} encryption algorithms. But the role of this story is not only to introduce you to some encryption algorithms but also show you how to code them under some programming languages.&lt;/p&gt;
&lt;p&gt;As mentioned before, our team goal was to encrypt messages from a module written in &lt;strong&gt;C#&lt;/strong&gt;, and decrypt them in a module written in &lt;a href="https://golang.org/"&gt;&lt;strong&gt;Go lang&lt;/strong&gt;&lt;/a&gt;{.aioseop-link}.&lt;/p&gt;</description></item><item><title>Cross Programming Language Encryption – CSharp, Part 1</title><link>https://lunaticthinker.me/cross-programming-language-encryption-csharp-part-1/</link><pubDate>Tue, 05 May 2020 08:04:07 +0000</pubDate><guid>https://lunaticthinker.me/cross-programming-language-encryption-csharp-part-1/</guid><description>&lt;p&gt;&lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-cs"&gt;&lt;img src="https://img.shields.io/github/stars/lunaticthinker-me/demo-cross-lang-encryption-cs?style=social" alt="GitHub stars"&gt;&lt;/a&gt; &lt;a href="https://github.com/dragoscirjan"&gt;&lt;img src="https://img.shields.io/github/followers/dragoscirjan?style=social" alt="GitHub followers"&gt;&lt;/a&gt;&lt;br&gt;
See a demo at &lt;a href="https://github.com/lunaticthinker-me/demo-cross-lang-encryption-cs"&gt;Github&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;One of our challenges at work, lately, was to send encrypted messages between multiple applications, written in different programming languages: &lt;a href="https://docs.microsoft.com/en-us/dotnet/csharp/"&gt;C#&lt;/a&gt;, &lt;a href="https://golang.org/"&gt;Go&lt;/a&gt; and &lt;a href="https://www.ecma-international.org/"&gt;JavaScript&lt;/a&gt;{.aioseop-link}.&lt;/p&gt;
&lt;p&gt;In our case, it was more like &lt;a href="https://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt;{.aioseop-link}, but from this point of view, it is safe to talk about JavaScript from two simple reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TypeScript compiles to JavaScript&lt;/li&gt;
&lt;li&gt;The library used for cryptography was written with JavaScript.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Our team debated between two encryption algorithms for this job: AES and RSA.&lt;/p&gt;</description></item><item><title>Resizing Transparent PNG in ColdFusion</title><link>https://lunaticthinker.me/resizing-transparent-png-in-coldfusion/</link><pubDate>Sun, 18 Mar 2018 01:03:15 +0000</pubDate><guid>https://lunaticthinker.me/resizing-transparent-png-in-coldfusion/</guid><description>&lt;p&gt;Hello guys,&lt;/p&gt;
&lt;p&gt;Needed to do this for a project my team is maintaining, but I could only find the solution for ColdFusion, which looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;JavaImport = structNew();

JavaImport.io = structNew();
JavaImport.io.File = CreateObject('java', 'java.io.File');

JavaxImport = StructNew();

JavaxImport.imageio = StructNew();
JavaxImport.imageio.ImageIO = CreateObject('java', 'javax.imageio.ImageIO');

imageBuffer = JavaxImport.imageio.ImageIO.read(JavaImport.io.File.Init(imagePath));

response = getPageContext().getFusionContext().getResponse();
response.setHeader('Content-Type', 'image/png');
response.setHeader('Cache-Control', 'max-age=604800, public');
JavaxImport.imageio.ImageIO.write(imageBuffer, &amp;quot;png&amp;quot;, response.getResponse().getOutputStream() );
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After consulting Railo documentation on &lt;a href="http://www.getrailo.org/javadoc-4-0/railo/runtime/functions/other/GetPageContext.html"&gt;GetPageContext&lt;/a&gt; method, we’ve come to the following result:&lt;/p&gt;</description></item><item><title>Docker Toolbox port forwarding to localhost or the network</title><link>https://lunaticthinker.me/docker-toolbox-port-forwarding-to-localhost-or-the-network/</link><pubDate>Sun, 18 Mar 2018 00:28:08 +0000</pubDate><guid>https://lunaticthinker.me/docker-toolbox-port-forwarding-to-localhost-or-the-network/</guid><description>&lt;p&gt;For a long time we avoided using &lt;a href="https://docs.docker.com/toolbox/toolbox_install_windows/"&gt;Docker Toolkbox&lt;/a&gt; because we didn’t understand how to allow the containers created within the docker Virtual Box machine by using local host and not the virtual machine’s ip (usually 192.168.99.100).&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This recently changed when one of my employees was forced to work for a while from within a client’s network, and even more, work under Windows while the application was to be accessed under network designated domains only. Long story short, the application had to be run on docker, however accessed on a domain like ‘myapp.domain.foo’, which also made it accessible not only to my developer as well as the rest of the group.&lt;/p&gt;</description></item><item><title>Atom – Changing ATOM_HOME</title><link>https://lunaticthinker.me/atom-changing-atom_home/</link><pubDate>Thu, 15 Sep 2016 08:41:57 +0000</pubDate><guid>https://lunaticthinker.me/atom-changing-atom_home/</guid><description>&lt;p&gt;How many of you didn’t try to make a propert IDE from &lt;a href="https://atom.io/"&gt;Atom&lt;/a&gt; by now. Let me tell you. From many many many many (I forgot how many) points of view, it’s one of the best &lt;strong&gt;text editors&lt;/strong&gt; out there. And yes, with a little work, the right plugins and a lot of think through, it can be transformed into a proper IDE.&lt;/p&gt;
&lt;p&gt;Not what I’m gonna talk abut today though… Gonna talk about a bugging issue, that always bothererd me because (at least in it’s early days (and I mean versions 1.5 to 1.8)) I experienced it A LOT. While not on SSD, but on &lt;strong&gt;old good and latent HDD&lt;/strong&gt;, if Atom had a lot of plugins installed (let’s be serious, &lt;strong&gt;npm&lt;/strong&gt; doesn’t do a great job with package management and neither does &lt;strong&gt;apm&lt;/strong&gt;), from time to time, Atom was crashing. It was refusing to load properly, couldn’t index either the project nor the plugin list and had to &lt;a href="https://lunaticthinker.me/coders-grave/resetting-atom-ide/"&gt;reset it (read here how)&lt;/a&gt;. Not saying it was Atom’s fault. I had like at least 100 plugins installed. Any of those could be the black sheep. But remember, I had Atom installed on both Win and Linux on SSDs drives, and never ever ever had this problem.&lt;/p&gt;</description></item><item><title>Resetting Atom IDE</title><link>https://lunaticthinker.me/resetting-atom-ide/</link><pubDate>Mon, 30 May 2016 07:25:08 +0000</pubDate><guid>https://lunaticthinker.me/resetting-atom-ide/</guid><description>&lt;p&gt;Too often now, my &lt;a href="https://atom.io"&gt;Atom&lt;/a&gt; setup fails to load giving the following message:&lt;/p&gt;
&lt;p&gt;Not a permanent solution, but one to help you move on, is resetting the window state.&lt;/p&gt;
&lt;pre&gt;atom --clear-window-state&lt;/pre&gt;</description></item><item><title>3DES Encryption with CFSCRIPT</title><link>https://lunaticthinker.me/3des-encryption-with-cfscript/</link><pubDate>Wed, 25 Nov 2015 13:26:40 +0000</pubDate><guid>https://lunaticthinker.me/3des-encryption-with-cfscript/</guid><description>&lt;p&gt;Won’t comment much about it. We needed it, you may need it, so here it is:&lt;/p&gt;
&lt;pre class="lang:cfml decode:true " &gt;&lt;cfscript&gt;

 key = '62v01fVsCWHfRcW';
 text = '66866996699';
 iv = BinaryDecode("0000000000000000","hex");

 function extendKey(key, size = 24, c = "0") {
 var i = 0;
 for (i = len(key); i lt size; i = i + 1) {
 key = key &amp; c;
 }
 return key;
 }
 
 function extendText(text, c = "0") {
 var i = 0;
 for (i = len(text) % 8; i lt 8; i = i + 1) {
 text = text &amp; c;
 }
 return text;
 }
 
 function encrypt3desCbcCF(text, key, iv) {
 return encrypt(
 text, 
 toBase64(extendKey(key, 24, urlDecode('%00'))), 
 'DESEDE/CBC/PKCS5Padding', 
 'Base64', 
 iv
 );
 }
 
 function javaCreateObject(obj) {
 return createObject('java', obj);
 }
 
 function encrypt3desCbcJava(text, key, iv) {
 var Cipher = javaCreateObject('javax.crypto.Cipher');
 var IvParameterSpec = javaCreateObject('javax.crypto.spec.IvParameterSpec');
 var SecretKeySpec = javaCreateObject('javax.crypto.spec.SecretKeySpec');
 
 var jkey = SecretKeySpec.init(
 extendKey(key, 24, urlDecode('%00')).getBytes(), 
 "DESede"
 );

 var jiv = IvParameterSpec.init(iv);

 var jcipher = Cipher.getInstance("DESede/CBC/PKCS5Padding");
 jcipher.init(Cipher.ENCRYPT_MODE, jkey, jiv);
 
 
 return toBase64(jcipher.doFinal(
 text.getBytes()
 ));
 }

&lt;/cfscript&gt;

&lt;cfdump var="#extendKey(key, 24, 'A')#" /&gt;&lt;br /&gt;
&lt;cfdump var="#extendText(text, 'A')#" /&gt;&lt;br /&gt;
&lt;cfdump var="#encrypt3desCbcCF(text, key, iv)#" /&gt;&lt;br /&gt;
&lt;cfdump var="#encrypt3desCbcJava(text, key, iv)#" /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Check also as an example here &lt;a href="http://trycf.com/gist/6c6d9bad3c4ae2838137/acf11?theme=monokai"&gt;on trycf.com&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Railo / ColdFusion – Writing Image to Outpout Stream</title><link>https://lunaticthinker.me/railo-coldfusion-writing-image-to-outpout-stream/</link><pubDate>Tue, 03 Jun 2014 10:37:35 +0000</pubDate><guid>https://lunaticthinker.me/railo-coldfusion-writing-image-to-outpout-stream/</guid><description>&lt;p&gt;Hello guys,&lt;/p&gt;
&lt;p&gt;Needed to do this for a project my team is maintaining, but I could only find the solution for ColdFusion, which looks like this:&lt;/p&gt;
&lt;pre class="prettyprint"&gt;JavaImport = structNew();

JavaImport.io = structNew();
JavaImport.io.File = CreateObject('java', 'java.io.File');

JavaxImport = StructNew();

JavaxImport.imageio = StructNew();
JavaxImport.imageio.ImageIO = CreateObject('java', 'javax.imageio.ImageIO');

imageBuffer = JavaxImport.imageio.ImageIO.read(JavaImport.io.File.Init(imagePath));

response = getPageContext().getFusionContext().getResponse();
response.setHeader('Content-Type', 'image/png');
response.setHeader('Cache-Control', 'max-age=604800, public');
JavaxImport.imageio.ImageIO.write(imageBuffer, "png", response.getResponse().getOutputStream() );&lt;/pre&gt;
&lt;p&gt;After consulting Railo documentation on &lt;a href="http://www.getrailo.org/javadoc-4-0/railo/runtime/functions/other/GetPageContext.html"&gt;GetPageContext&lt;/a&gt; method, we’ve come to the following result:&lt;/p&gt;</description></item><item><title>CFML Generating Random String</title><link>https://lunaticthinker.me/cfml-generating-random-string/</link><pubDate>Mon, 10 Mar 2014 10:27:40 +0000</pubDate><guid>https://lunaticthinker.me/cfml-generating-random-string/</guid><description>&lt;p&gt;While working on one of my client’s projects, I’ve encountered the need of generating RANDOM strings. Since, as almost, any other language, Cold Fusion does not have any type of support for this functionality, I had to create a function of my own.&lt;/p&gt;
&lt;p&gt;Hope you find it useful.&lt;/p&gt;
&lt;pre class="prettyprint"&gt;&lt;cfscript&gt;
 function RandomString(length, chars="ABCDEFGHIJKLMNOPQRST0123456789-") {
 var i = 0;
 var theString = "";
 for (i = 0; i &lt; length; i++) {
 theString &amp;= Mid(chars, RandRange(1, len(chars), "SHA1PRNG"), 1);
 }
 return theString;
 }
&lt;/cfscript&gt;&lt;/pre&gt;</description></item><item><title>Zend framework 2 generating route url with domain name</title><link>https://lunaticthinker.me/zend-framework-2-generating-route-url-with-domain-name/</link><pubDate>Fri, 25 Oct 2013 08:55:40 +0000</pubDate><guid>https://lunaticthinker.me/zend-framework-2-generating-route-url-with-domain-name/</guid><description>&lt;p&gt;Nothing more than this little line of code:&lt;/p&gt;
&lt;pre class="prettyprint"&gt;$homeUrl = $this-&gt;url(
 'youRouteName',
 array(/* your route params */),
 array('force_canonical' =&gt; true)
);&lt;/pre&gt;
&lt;p&gt;Of course, you need to call it within a code zone where you can invoke the URL helper. What you see above, assumes that you are in a .phtml file invoked by a controller’s action.&lt;/p&gt;</description></item><item><title>Dumping object inside cfscript tag</title><link>https://lunaticthinker.me/dumping-a-variable-inside/</link><pubDate>Tue, 12 Mar 2013 10:35:03 +0000</pubDate><guid>https://lunaticthinker.me/dumping-a-variable-inside/</guid><description>&lt;p&gt;I’ve been looking for this a few times now, until now i’ve found two interesting options.&lt;/p&gt;
&lt;p&gt;One is creating a cffunction of your own, and using it inside a cfscript afterwards:&lt;/p&gt;
&lt;pre class="prettyprint"&gt;&lt;CFFUNCTION NAME="MyDump"&gt;
 &lt;CFARGUMENT NAME="OBJ" Required="TRUE"&gt;
 &lt;CFDUMP VAR="#Obj#"&gt;
&lt;/CFFUNCTION&gt;&lt;/pre&gt;
&lt;p&gt;The other one is using a 100% cfscript approach, which can also be placed in a function of your own:&lt;/p&gt;
&lt;pre class="prettyprint"&gt;createObject("component", "cfide.adminapi.base").dump(var);&lt;/pre&gt;
&lt;p&gt;Also, starting ColdFusion 9, you can use the &lt;strong&gt;writeDump&lt;/strong&gt; function.&lt;/p&gt;</description></item><item><title>Java Media Framework vs IP Camera JPEG/MJPEG – reviewed</title><link>https://lunaticthinker.me/java-media-framework-vs-ip-camera-jpegmjpeg-complete-overview-sources/</link><pubDate>Fri, 17 Dec 2010 11:00:43 +0000</pubDate><guid>https://lunaticthinker.me/java-media-framework-vs-ip-camera-jpegmjpeg-complete-overview-sources/</guid><description>&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I will try not to re-write again all the informations I already wrote in “&lt;a href="http://dragosc.itmcd.ro/it-stuff/java-media-framework-vs-ip-camera-jpegmjpeg/" target="_blank" rel="noopener noreferrer"&gt;Java Media Framwork vs IP Camera JPEG/MJPEG&lt;/a&gt;” a few years ago. This article is only a review of what I wrote back then, plus more info about my implementation of DataSource for JPEG/MJPEG IP Cameras.&lt;/li&gt;
&lt;li&gt;Another note is, that this project of mine, has been attached to my own company which I founded a few years ago and I’m still trying to grow it. Project licence will be LGPL.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;OK… Since Oracle bought SUN a few years ago, but their website still doesn’t reflect all info about Java Media Framework, it’s still best do &lt;a href="http://www.google.ro/search?aq=f&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=java+media+framework" target="_blank" rel="noopener noreferrer"&gt;Google&lt;/a&gt; after the info about JMF, than give you a specific link.&lt;/p&gt;</description></item><item><title>Java Media Framework vs IP Camera JPEG/MJPEG</title><link>https://lunaticthinker.me/java-media-framework-vs-ip-camera-jpegmjpeg/</link><pubDate>Tue, 22 Apr 2008 23:12:25 +0000</pubDate><guid>https://lunaticthinker.me/java-media-framework-vs-ip-camera-jpegmjpeg/</guid><description>&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This article is pretty deprecated. I do not say that the info here is false, but I would like to write a new article about this. Please leave me comments with what you want to know, and I will try do add more info to the article. And ofcourse, more sources.&lt;/li&gt;
&lt;li&gt;A Romanian translation for this article is found &lt;a href="http://dragosc.itmcd.ro/it-stuff/java-media-framework-vs-ip-camera-jpegmjpeg-ro" title=" Java Media Framework vs IP Camera JPEG/MJPEG"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I really don”t think I”m either the first or the last to try and obtain images from and ip camera and than use them with &lt;a title="Java Media Framework" href="http://www.google.ro/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fjava.sun.com%2Fproducts%2Fjava-media%2Fjmf%2F&amp;ei=kbcHSNCXGJygmwPmwKyCBQ&amp;usg=AFQjCNHFWA3xDh0qc9PpUvRQB83F9rl9sw&amp;sig2=oaN-RciWsAPLPXVf8C3E8w" target="_blank" rel="noopener noreferrer"&gt;JMF&lt;/a&gt;. So… after a few days of reading and trying to understand how JMF works, as I already had a JPEG/MJPEG grabber, here is my solutions:&lt;/p&gt;</description></item></channel></rss>