<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Daniel Smith on Medium]]></title>
        <description><![CDATA[Stories by Daniel Smith on Medium]]></description>
        <link>https://medium.com/@_ifnull?source=rss-c0cf7bde4bd5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Rbgob6oQ87l4ULw8pPUJjg.jpeg</url>
            <title>Stories by Daniel Smith on Medium</title>
            <link>https://medium.com/@_ifnull?source=rss-c0cf7bde4bd5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:01:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@_ifnull/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Turned My House Into a Simpsons Treehouse of Horror Special With AI and Projection Mapping]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@_ifnull/how-i-turned-my-house-into-a-simpsons-treehouse-of-horror-special-with-ai-and-projection-mapping-d6d6cacba642?source=rss-c0cf7bde4bd5------2"><img src="https://cdn-images-1.medium.com/max/1400/0*bD5WhSZX9ng-mMRy.jpg" width="1400"></a></p><p class="medium-feed-snippet">A two-projector Simpsons Halloween show, built with AI animation that never moves the house, about $41 of GPU time, and a DIY enclosure</p><p class="medium-feed-link"><a href="https://medium.com/@_ifnull/how-i-turned-my-house-into-a-simpsons-treehouse-of-horror-special-with-ai-and-projection-mapping-d6d6cacba642?source=rss-c0cf7bde4bd5------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@_ifnull/how-i-turned-my-house-into-a-simpsons-treehouse-of-horror-special-with-ai-and-projection-mapping-d6d6cacba642?source=rss-c0cf7bde4bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6d6cacba642</guid>
            <category><![CDATA[minimax-h3]]></category>
            <category><![CDATA[comfy-ui]]></category>
            <category><![CDATA[projection-mapping]]></category>
            <category><![CDATA[ai-video]]></category>
            <dc:creator><![CDATA[Daniel Smith]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 19:12:55 GMT</pubDate>
            <atom:updated>2026-11-17T19:14:41.843Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[dump3411: A Local Remote ID Receiver for Drones]]></title>
            <link>https://medium.com/@_ifnull/dump3411-a-local-remote-id-receiver-for-drones-f1b0cf28b5de?source=rss-c0cf7bde4bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1b0cf28b5de</guid>
            <category><![CDATA[home-automation]]></category>
            <category><![CDATA[drones]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Daniel Smith]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 03:36:52 GMT</pubDate>
            <atom:updated>2026-10-08T03:36:52.739Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*OSG4isCCk2fzJOUx.jpg" /><figcaption>dump3411 local dashboard</figcaption></figure><p>I have been running local aircraft receivers for a while. dump1090 handles ADS-B on 1090 MHz, dump978 handles UAT on 978 MHz, and together they turn aircraft broadcasts around me into data I can actually use.</p><p>When I started looking at drone Remote ID, the obvious question was: where is the equivalent of dump1090 for drones?</p><p>That question eventually became <strong>dump3411</strong>.</p><p>The idea is fairly simple: listen for the Remote ID broadcasts that drones are already transmitting, decode them locally, and expose the result in a form that other software can use. No cloud account is required, nothing needs to leave the local network, and the receiver can run on inexpensive Linux hardware.</p><p>The name is a little different from dump1090 and dump978 because Remote ID is not tied to one RF frequency. It can be carried over Bluetooth and Wi-Fi. 3411 comes from <strong>ASTM F3411</strong>, the standard behind broadcast Remote ID.</p><p><a href="https://altmake.com/posts/dump3411-local-drone-remote-id-receiver/"><strong>Read the full write-up on altmake.com →</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1b0cf28b5de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ha-airspace: Aircraft and Drones in Home Assistant, Without the Cloud]]></title>
            <link>https://medium.com/@_ifnull/ha-airspace-aircraft-and-drones-in-home-assistant-without-the-cloud-3b14fa717226?source=rss-c0cf7bde4bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b14fa717226</guid>
            <category><![CDATA[remote-id]]></category>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[aviation]]></category>
            <category><![CDATA[drones]]></category>
            <dc:creator><![CDATA[Daniel Smith]]></dc:creator>
            <pubDate>Sat, 03 Oct 2026 05:47:09 GMT</pubDate>
            <atom:updated>2026-10-03T06:31:31.343Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EeDqcWPGiK0NT8ps.jpg" /><figcaption>Home Assistant Airspace Add-on — Dashboard</figcaption></figure><p>Most of what a home ADS-B receiver hears isn’t worth a second look: airliners at cruise altitude on their way somewhere else. Now and then it’s something worth knowing about: a military helicopter circling the neighborhood, an aircraft a few miles out squawking 7700, or a drone hovering over the street. The receiver hears those too, but nothing marks them. Each one is another row in a long list of hex codes, and unless you’re watching the map at that moment, you never find out it was there.</p><p>I wanted my house to tell me when that happened. I didn’t want a map I’d have to remember to check. I wanted a push notification with a photo of the aircraft, how far away it is, and whether its course will bring it overhead in the next few minutes. I wanted that from the receivers I already run, not from someone else’s cloud API. Most drones are now required to broadcast their position and where they’re being flown from, so I wanted drones in the same picture.</p><p>Nothing I could find did all of that. The most popular Home Assistant flight integration, <a href="https://github.com/AlexandrErohin/home-assistant-flightradar24">home-assistant-flightradar24</a>, pulls from FlightRadar24’s API, so the receiver on your own network goes unused. The closest match, <a href="https://github.com/hook-365/adsb-aircraft-tracker">adsb-aircraft-tracker</a>, does read your own receiver and alerts on military aircraft and emergency squawks, but each receiver stays separate and it doesn’t know about drones. Building it from Home Assistant REST sensors and Jinja templates works for a sensor or two and falls apart after that.</p><p>So I built <a href="https://github.com/ifnull/ha-airspace">ha-airspace</a>. It reads ADS-B (1090 MHz), UAT (978 MHz), and drone Remote ID from my own receivers. It merges them into one view of the airspace, flags the traffic worth attention, and publishes the result to Home Assistant over MQTT, with no cloud API or account involved. The dashboard at the top of this post is the example that ships with it, rendered from a synthetic scene around the White House so it shows no real location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*uRku7eXYBRLZmX5w.jpg" /><figcaption>Home Assistant Airspace Add-on — Notifications</figcaption></figure><p><em>Sample alerts on my phone; the drone is my own Remote ID test transmitter. I blacked out the callsigns and one squawk code: matched against public flight tracks, the distances and bearings would show where I live.</em></p><p><a href="https://altmake.com/posts/ha-airspace-local-airspace-awareness-home-assistant/"><strong>Read the full write-up on altmake.com →</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b14fa717226" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AppsFlyer Web SDK Compromise: Independent Payload Analysis]]></title>
            <link>https://medium.com/@_ifnull/appsflyer-web-sdk-compromise-independent-payload-analysis-109afd72aba9?source=rss-c0cf7bde4bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/109afd72aba9</guid>
            <category><![CDATA[appsflyer]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Daniel Smith]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 17:17:54 GMT</pubDate>
            <atom:updated>2026-03-12T16:33:38.902Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LWDKIftOpG3tPTGHLwxxIA.png" /><figcaption>Modular Crypto-Theft Toolkit</figcaption></figure><h3>A deep-dive into the modular crypto-theft toolkit injected via AppsFlyer’s Web SDK on March 10, 2026, based on original deobfuscation of two independently captured samples.</h3><p>On March 10, 2026, AppsFlyer notified customers that their Web SDK had been compromised. Between 01:00 and 10:00 UTC, any website loading the SDK served malicious JavaScript to visitors.</p><p>The initial community analysis characterized this as a simple crypto clipper — a script that swaps cryptocurrency wallet addresses. After performing my own independent deobfuscation of two separate captures of the payload, I can confirm the crypto-clipping function, but the full picture is significantly more concerning. This is a professional-grade interception framework with seven distinct modules, anti-detection capabilities, value-threshold targeting, and a polymorphic obfuscation pipeline that defeats signature-based detection.</p><p>Here’s everything I found.</p><h3>Analysis Methodology</h3><p>The payload is a ~170 KB minified JavaScript file using multi-layered base91 string encoding with 17 distinct shuffled alphabets. Every meaningful string — function names, API methods, error messages, URLs — is encoded and resolved at runtime through a caching decoder.</p><p>I built a sandboxed Node.js VM that executed <em>only</em> the string decoding infrastructure while stubbing all browser APIs, network access, and DOM interaction. This extracted <strong>786 decoded strings</strong> from Sample A and <strong>cross-validated 319 readable strings</strong> from Sample B, confirming functional identity despite completely different obfuscation layers.</p><p>No network requests were made, no C2 servers were contacted, and no malicious functionality was invoked during analysis.</p><h3>Payload Architecture: 7 Modules</h3><p>The decoded string table reveals named module exports. This is not a simple clipboard hijacker — it is a modular toolkit:</p><pre>[166] ActuateElements      — DOM mutation surveillance<br>[167] ConsoleGuard         — Console output suppression<br>[168] Destinations         — Attacker wallet management<br>[169] KillElements         — Anti-forensics element removal<br>[170] NetHooksmith         — Network request/response interception<br>[171] XorCipherBytes       — XOR encryption for C2 comms<br>[713] Accounting           — Multi-currency portfolio tracking<br>[714] AccountingForTransfer — Value-threshold transfer logic</pre><p>Let’s go through each one.</p><h3>Module 1: NetHooksmith — Full Network Interception</h3><p>This is the most dangerous module. It replaces the browser’s native fetch function and patches XMLHttpRequest.prototype.open, .send, and .setRequestHeader to intercept <strong>all HTTP traffic</strong> on the page.</p><p><strong>Request manipulation:</strong> setUrl [519], setMethod [521], setHeader [522], deleteHeader [523], setBody [525] — full control over outgoing requests. block [526] can prevent requests entirely and return synthetic responses via respond [528].</p><p><strong>Response manipulation:</strong> getResponseBody [610], setResponseBody [611], setStatus [612], setResponseHeader [613] — can silently modify API responses before the application processes them. Supports json, text, blob, and arraybuffer response types.</p><p><strong>Interceptor registry:</strong> A register/unregister system with before/after hooks. A when field with test and match support suggests regex-based URL or content matching to selectively activate interceptors.</p><p><strong>Cookie manipulation:</strong> Strings expires= [509] and ;path=/ [510] indicate the payload can write cookies to the host domain — useful for session fixation, visitor fingerprinting, or C2 state tracking.</p><p><strong>XHR edge cases:</strong> The payload explicitly handles synchronous XHR edge cases (&quot;NetHooksmith: deleteHeader not supported in Sync XHR&quot;, &quot;NetHooksmith: responseType not supported in Sync XHR&quot;, &quot;Error: Async hook detected in Synchronous XHR. It will be ignored.&quot;) — indicating thorough engineering to handle all browser contexts without crashing the host page.</p><blockquote><strong><em>Bottom line:</em></strong><em> Any website loading this payload had every fetch/XHR request and response flowing through attacker-controlled proxy functions. This includes API calls carrying auth tokens, session cookies (</em><em>withCredentials is explicitly handled), and any data the server returns.</em></blockquote><h3>Module 2: ActuateElements — Shadow DOM-Aware DOM Surveillance</h3><p>A sophisticated MutationObserver-based system that monitors the entire DOM for changes — including inside Shadow DOM boundaries.</p><p><strong>Core watching:</strong> Uses MutationObserver with childList and subtree for full-tree monitoring. CSS selector-based targeting via selector and matches identifies specific elements (likely input fields).</p><p><strong>Shadow DOM penetration:</strong> This is a critical finding. The decoded strings includeShadowDOM [176], attachShadow [353], _patchAttachShadow [351], _patchedAttachShadow [352], and _origAttachShadow [447] reveal that the payload <strong>monkey-patches </strong><strong>Element.prototype.attachShadow</strong> so that every Shadow Root created on the page is automatically monitored. _coverExistingShadowRoots [344] also scans for Shadow DOMs created before the payload initialized.</p><blockquote><strong><em>Why this matters:</em></strong><em> Many modern payment forms, password managers, and secure input components use Shadow DOM to isolate sensitive fields from third-party JavaScript. This payload explicitly defeats that encapsulation by intercepting the </em><em>attachShadow call itself.</em></blockquote><p>Additional capabilities include rescanAncestors with configurable ancestorDepth, _queueRescan for deferred re-analysis, createNodeIterator with SHOW_ELEMENT for deep tree walking, and observeAttributes with attributeFilter for watching attribute changes on targeted elements.</p><h3>Module 3: KillElements — Anti-Forensics</h3><p>Actively removes DOM elements matching specified selectors: querySelectorAll → forEach → parentNode → remove. Operates across Shadow DOM boundaries. Has its own _pendingRescans system to catch newly added elements.</p><p>Likely uses: removing CSP violation banners, stripping security warning overlays, eliminating competing detection scripts or ad fraud tools.</p><h3>Module 4: Destinations — Wallet Rotation Pool</h3><p>Manages a pool of attacker-controlled cryptocurrency wallet addresses. addDestination stores wallets with currency + address + label. <strong>getRandomDestination</strong> uses Math.floor(Math.random()) to randomly select from multiple wallets per currency.</p><p>By distributing stolen funds across multiple wallets, the attacker makes blockchain analysis significantly harder — each wallet receives fewer transactions, reducing automated detection likelihood.</p><h3>Module 5: Accounting — Value-Threshold Targeting</h3><p><strong>This was not identified in the initial community analysis.</strong> It reveals the payload doesn’t blindly swap every crypto address — it evaluates economic value first.</p><p>A full multi-currency portfolio tracker: baseCurrency, setBaseCurrency, setBalance, setRate/rateToBase for exchange rate conversion, getBalanceValueInBase, getTotalInBase.</p><p>The key finding: <strong>getBalancesValuedAboveInBase</strong> with a minBaseValue parameter converts all observed wallet balances to a common base currency (likely USD) and filters for only those exceeding a configurable minimum. AccountingForTransfer [714] is a separate class for the steal-or-skip decision.</p><p>This is operationally sophisticated. By ignoring low-value wallets, the payload:</p><ul><li>Avoids triggering alerts on insignificant transactions</li><li>Reduces on-chain traces pointing to attacker infrastructure</li><li>Focuses on high-value targets where risk/reward is favorable</li></ul><p>Validation strings (&quot;currency must be a non-empty string&quot;, &quot;must be a finite number&quot;, &quot;Base currency rate must be exactly 1&quot;, &quot;rateToBase must be &gt; 0&quot;) confirm production-quality code with defensive error handling.</p><h3>Module 6: ConsoleGuard — Console Suppression</h3><p>Replaces every method on the console object with no-ops:</p><pre>log, info, warn, error, debug, dir, dirxml, table,<br>trace, group, groupCollapsed, groupEnd, count, countReset,<br>assert, profile, profileEnd, time, timeLog, timeEnd, timeStamp</pre><p>disableOnStart activates suppression immediately. Original methods stored in originalConsoleMethods for potential restoration. This means: if you had dev tools open during the incident window, you would not have seen any output from the payload&#39;s operation.</p><h3>Module 7: XorCipherBytes — C2 Encryption</h3><p>XOR-based symmetric encryption (encrypt/decrypt) with a configurable key. Used to obfuscate data sent to and received from the C2 server.</p><p>The payload also includes an <strong>inline SHA-256 implementation</strong>, confirmed by decoded string [507] containing the known SHA-256 hash of &quot;abc&quot; (ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad). Built-in hex encoding and Base64 utilities make the payload fully self-contained — it avoids browser crypto APIs that security tools might monitor.</p><h3>Polymorphic Obfuscation: Multi-Variant Builds</h3><p>Two independently captured samples were analyzed and confirmed to be <strong>functionally identical but structurally distinct</strong>. The attacker uses a polymorphic build pipeline.</p><p><strong>What changes per build:</strong> Every variable name (kFmXE0 → eD9kupT), every base91 alphabet (all 17 reshuffled), numeric encoding (hex vs decimal), file formatting (minified vs prettified), and all file hashes.</p><p><strong>What stays constant:</strong> Module export names, API method names, error message strings, the number of globalThis references (12), RegExp uses (18), fetch references (2), MutationObserver references (2), and stripped file size (~167 KB).</p><p><strong>Sample A</strong> (minified): 170,223 bytes, MD5 4be8975f21979a14d826cf07ad50a152</p><p><strong>Sample B</strong> (prettified): 222,156 bytes, MD5 f13a118acc7d5b1a1432d4bf48deb4d2</p><p>Both decode to byte-identical module names, method names, and error strings.</p><blockquote><strong><em>Detection implication:</em></strong><em> Signature-based detection (matching specific variable names, string hashes, regex patterns) will only catch the specific sample analyzed. A fresh build evades immediately. Detection must target structural patterns or runtime behaviors.</em></blockquote><h3>Exposure Assessment for Non-Crypto Sites</h3><p>While the primary objective is cryptocurrency address swapping, the infrastructure has far broader implications for any website that loaded the compromised SDK during the 9-hour window.</p><p><strong>CRITICAL — All network traffic visible.</strong> Every fetch/XHR request and response passed through attacker-controlled proxies, including API calls with auth tokens and session data.</p><p><strong>CRITICAL — Shadow DOM defeated.</strong> Secure form components using Shadow DOM for input isolation were penetrated via attachShadow monkey-patching.</p><p><strong>HIGH — Dynamic C2 control.</strong> Wallet addresses were fetched at runtime. The C2 could have served different instructions to different domains — a crypto clipper for exchanges, a credential harvester for banks.</p><p><strong>HIGH — Cookie write access.</strong> The payload could set cookies on the host domain for session fixation, visitor tracking, or persistent state.</p><p><strong>MEDIUM — Console suppressed.</strong> Developer tools would not show errors or warnings from the payload.</p><p><strong>MEDIUM — DOM elements killed.</strong> Security warnings, CSP violation banners, or detection scripts could be silently removed.</p><blockquote><strong><em>Key uncertainty:</em></strong><em> Because the C2 server provided runtime configuration, static code analysis alone cannot determine the full scope of what was exfiltrated. The crypto-clipping behavior is what’s visible in the code, but the framework was capable of arbitrary data interception per C2 instruction. Only AppsFlyer or law enforcement with C2 server access can confirm the full operational scope.</em></blockquote><p><strong>One bright spot:</strong> The browser’s same-origin policy still applies. If your site uses a cross-origin payment iframe (Stripe Elements, Braintree, Adyen, etc.), the payload’s hooks cannot reach across that origin boundary. Payment data in a cross-origin iframe remains protected. However, if your payment flow collects card data in your own DOM and submits it via your own JavaScript, the network hooks would have had full visibility.</p><h3>Indicators &amp; Detection</h3><h3>Network Indicators</h3><p>Check server/CDN logs for the 01:00–10:00 UTC window on March 10, 2026. Look for requests to AppsFlyer CDN domains that served the Web SDK bundle. A suspicious endpoint websdk.appsflyer.com/v1/api/plugin was observed during the compromise window and is not present in current AppsFlyer documentation — this may have been the C2 endpoint.</p><h3>Stable Identifiers (across builds)</h3><pre>Module exports:   ActuateElements, ConsoleGuard, Destinations,<br>                  KillElements, NetHooksmith, XorCipherBytes,<br>                  Accounting, AccountingForTransfer</pre><pre>Error strings:<br>  &quot;ActuateElements.updateCallback: callback must be a function.&quot;<br>  &quot;KillElements.updateSelector: selector must be a non-empty string.&quot;<br>  &quot;NetHooksmith: deleteHeader not supported in Sync XHR&quot;<br>  &quot;[NetHooksmith] Fetch before hook failed:&quot;<br>  &quot;[NetHooksmith] Error: Async hook detected in Synchronous XHR.&quot;</pre><pre>Inline SHA-256:   ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad</pre><h3>Structural Detection (for static analysis)</h3><ul><li>15+ distinct strings of length 85–91 characters (base91 alphabets) in a single file</li><li>Constant array of 700+ entries mixing integers, strings, booleans, and null</li><li>Multiple nested functions with pattern: var X = &quot;91-char-string&quot;; indexOf() with bitwise shift/mask (&amp; 8191, &gt; 88, &lt;&lt;, &gt;&gt;=)</li><li>Stripped file size between 165–170 KB</li><li>Exactly 12 globalThis references, 18 RegExp uses, 2 fetch references, 2 MutationObserver references</li></ul><h3>Runtime / Behavioral Detection</h3><ul><li>window.fetch !== originalFetch (fetch replaced)</li><li>XMLHttpRequest.prototype.open wrapped</li><li>Element.prototype.attachShadow wrapped</li><li>All console methods point to the same no-op function</li><li>New cookies with path=/ set during the incident window</li><li>MutationObserver active on document root with childList + subtree + Shadow DOM traversal</li></ul><h3>Recommendations</h3><p><strong>Confirm exposure.</strong> Review CDN/server logs for the 01:00–10:00 UTC window.</p><p><strong>Assess payment isolation.</strong> Cross-origin payment iframes were protected. Same-origin payment handling was not.</p><p><strong>Request forensic data from AppsFlyer.</strong> Ask: (1) what was the C2 endpoint, (2) was data exfiltrated from your domain, (3) did the C2 serve different configs to different domains, (4) full root cause analysis.</p><p><strong>Implement Subresource Integrity (SRI).</strong> SRI hashes on third-party script tags would have caused the browser to reject the tampered SDK. This is the single most effective prevention.</p><p><strong>Deploy Content Security Policy (CSP).</strong> A strict CSP with script-src restricting allowed origins would limit damage from compromised scripts and prevent C2 connections.</p><p><strong>Monitor third-party scripts behaviorally.</strong> Due to polymorphic obfuscation, hash-based or signature-based monitoring is insufficient. Detection must flag fetch/XHR replacement, attachShadow patching, and wholesale console suppression at runtime.</p><p><strong>Evaluate breach notification obligations.</strong> The network interception infrastructure had broad data visibility beyond crypto. Consult legal counsel.</p><p><em>Analysis based on two independently captured samples of the compromised AppsFlyer Web SDK payload: a minified variant (170 KB, MD5 </em><em>4be8975f…a152) and a prettified variant from </em><a href="https://gist.github.com/cometkim/5bea18688e1653d2c3fe5476d3efed12"><em>cometkim&#39;s gist</em></a><em> (222 KB, MD5 </em><em>f13a118a…b4d2). No malicious code was executed during analysis — only string decoding infrastructure was run in a sandboxed VM with all browser APIs stubbed.</em></p><blockquote>Update (03/11/2026): AppsFlyer expanded the exposure window to March 9 20:40 UTC to March 10 10:30 UTC.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=109afd72aba9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Projection Mapping With AI: My End-to-End Workflow]]></title>
            <link>https://medium.com/@_ifnull/projection-mapping-with-ai-my-end-to-end-workflow-19781ddd4fcf?source=rss-c0cf7bde4bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/19781ddd4fcf</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[halloween]]></category>
            <category><![CDATA[stable-diffusion]]></category>
            <category><![CDATA[projection-mapping]]></category>
            <category><![CDATA[veo-3]]></category>
            <dc:creator><![CDATA[Daniel Smith]]></dc:creator>
            <pubDate>Fri, 31 Oct 2025 20:47:45 GMT</pubDate>
            <atom:updated>2025-11-01T17:20:29.750Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>A practical pipeline for capturing, aligning, generating, and projecting AI-assisted visuals — ending with a Raspberry Pi playback loop.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MN0rYDFR6ZEhv8FmXFlOEw.jpeg" /><figcaption>Projection Mapping of Stranger Things for Halloween</figcaption></figure><p><strong>tl;dr — The Key Steps</strong></p><blockquote>Skip to the end of the article for a video demo</blockquote><ol><li><strong>Capture</strong> <strong>Images</strong> — Create a Structure Reference image (photo taken during daylight) and Projection Boundary image (photo taken at night, white frame to identify projection area)</li><li><strong>Generate</strong> <strong>Images</strong> — Scene Base Image (styled to theme) and Alignment Image (B/W highlighting key edges of structure to aid in projection alignment)</li><li><strong>Align &amp; Lock</strong> <strong>Projection</strong> — Place Alignment Image on façade and Lock transform in LumaMap</li><li><strong>Animate</strong> <strong>the Scene</strong> — In Veo3 (if stable) or in CapCut (composite animations over Scene Base Image)</li><li><strong>Export &amp; Play</strong> — Final video played on Raspberry Pi + mpv loop</li></ol><h3>Key Terms</h3><ul><li><strong>Structure Reference Image</strong> <em>(aka “Reference Image”)</em><br>Daylight photo taken from the projector location. Provides geometry and visual context to guide AI.</li><li><strong>Projection Boundary Image</strong> <em>(aka “Canvas Capture”, “White-frame photo”)</em><br> Night photo with a full-white projection. Clearly shows the exact area the projector covers.</li><li><strong>Alignment Image</strong> <em>(aka “Structural Outline”)</em><br>High-contrast black-and-white image (generated via Stable Diffusion Control Structure) emphasizing edges of walls, roofline, windows, and doors. Used to verify and fine-tune alignment on the real surface.</li><li><strong>Scene Base Image</strong><br>The stylized, on-brand visual we’ll animate (directly in an AI video model or later in an editor like CapCut).</li><li><strong>Inspiration Images</strong><br>A small set of images that define the theme, palette, motifs, and texture language. Used to build a reusable “profile” for Stable Diffusion Control Structure (SDCS).</li></ul><h3>Components</h3><h4>Software &amp; Services</h4><ul><li><strong>ChatGPT</strong> — concept and technical planning</li><li><strong>Google Images</strong> — inspiration assets</li><li><a href="https://platform.stability.ai/docs/api-reference#tag/Control/paths/~1v2beta~1stable-image~1control~1structure/post"><strong>Stable Diffusion Control Structure</strong></a><strong> (</strong>SDCS<strong>)</strong> — image generation and structural control</li><li><strong>Google Gemini</strong> — generates <strong>theme profiles</strong> (YAML) for SDCS</li><li><a href="https://github.com/ifnull/projection-mapping-workflow/blob/main/sdsc-wrapper.py"><strong>sdcs-wrapper</strong></a> — my CLI to apply SDCS profiles to input images</li><li><a href="https://www.lumabox.com/lumamap/"><strong>LumaMap</strong></a> — simple alignment &amp; playback for stills (good for quick tests)</li><li><strong>CapCut</strong> (or any NLE) — motion layers and finishing</li></ul><h4>Projectors</h4><ul><li><a href="https://amzn.to/3LdOTE5"><strong>Epson Pro EX9220</strong></a>–3600 lm, 1920×1200, throw ratio 1.38–1.68</li><li><a href="https://amzn.to/3Jwjuw3"><strong>Goiaey GO2</strong></a>–2000 lm, 1080p, throw ratio ~1:1</li></ul><h4><strong>Mounting &amp; Rigging</strong>:</h4><p>If you want a semi permanent mounting solution, a chainlink pole works great. I put mine two feet into the ground with a PVC pipe as a ground sleeve. This means I can take the pole out while I’m not using the setup. At the top of the pole I used a chain link floor flange. This is normally used to mount the pole to the ground but I’m using it to transition from the pole to the projector mount. I have an older projector mounted to the pole so I needed an older style projector mount. A lot of newer projectors use a 1/4–20 thread screw which means you could get away with using a t-nut and a bolt to connect the floor flange to the projector.</p><ul><li>8&#39; × 1–5/8&quot; 16-gauge chain-link fence post</li><li>2&quot; × 5&#39; SCH40 pipe</li><li>12&quot; × 48&quot; concrete form tube + 50 lb fast-setting concrete</li><li><a href="https://amzn.to/4qCXkJo">7&#39; × 16&#39; white shade cloth w/ grommets</a> (projection surface for garage door). Note: buy the right size for your garage.</li><li><a href="https://amzn.to/4nm9K5f">130lb neodymium disc magnet</a> (for securing cloth/rigging)</li><li><a href="https://amzn.to/47w0KVk">Chain-link post floor flanges</a></li><li><a href="https://amzn.to/3WYNmUP">Low-profile universal projector mount with adjustable arms</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fsoSJDaspX0pdKOc5UvRBA.jpeg" /><figcaption>Mounting for projector on chainlink fence pole</figcaption></figure><blockquote><strong><em>Tip:</em></strong><em> Before buying hardware, estimate your throw distance vs. image width using the projector’s throw ratio so you know you can fill the facade you want.</em></blockquote><h3>Planning (theme → profile)</h3><p><strong>Ideate with ChatGPT</strong><br>“Give me 5 Halloween themes that are relevant this year. Focus on motifs that read well on light stone and stucco.”</p><p><strong>Collect Inspiration Images</strong><br>Build a small mood board: textures, motifs, characters, architectural treatments that match your façade. Pinterest works well for this if you are collaborating with other people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*prJHowO77Ki1PzHr9B7v1w.jpeg" /><figcaption>Mood Board — Halloween 2025</figcaption></figure><p><strong>Create a Theme Profile (YAML) with Gemini</strong><br>Upload a few inspiration images to Gemini and ask it to output a <strong>single YAML profile</strong> for SDCS (prompt, negative prompt, control strength, style preset, output format).</p><ul><li>Keep the <strong>prompt</strong> verbose and concrete (composition, materials, lighting, mood).</li><li>Keep the <strong>negative prompt</strong> comprehensive (block low-quality traits and off-theme elements).</li><li>Default control_strength: 0.8, style_preset: cinematic|photographic, output_format: jpeg.</li></ul><p><strong>Gemini Prompt for Theme Profile:</strong></p><pre>You are an AI assistant, and I need your help to create highly detailed configuration profiles for a Stable Diffusion API.<br><br>Your task is to analyze the reference image(s) I provide and generate a single, complete YAML configuration file that can be used to create a new, very similar image. You must follow these specific formatting rules for all of your responses.<br><br>Your output must be only a YAML configuration file, structured exactly like this template:<br><br>```<br># Profile configuration for [A brief, descriptive title of the scene]<br><br>prompt: &quot;A single, highly-detailed, photorealistic, and extremely verbose string. This description must be meticulous. You must describe all key subjects, the position of every major element, the environment, all textures (e.g., &#39;vintage floral wallpaper&#39;, &#39;worn plaid fabric&#39;, &#39;wet biomechanical vines&#39;), the lighting (e.g., &#39;primary light from multi-colored string lights&#39;, &#39;eerie blue backlight&#39;, &#39;intense crimson red glow&#39;), the atmosphere (&#39;nostalgic&#39;, &#39;eerie&#39;, &#39;ominous&#39;), and the overall artistic style (&#39;cinematic&#39;, &#39;horror&#39;, &#39;Stranger Things aesthetic&#39;). Be as specific as possible to leave no room for misinterpretation.&quot;<br><br>negative_prompt: &quot;A single string of comma-separated keywords. This must always include a base set of &#39;blurry, low quality, noisy, grainy, cartoon, anime, illustration, painting, sketch, ugly, deformed, watermark, text, signature&#39;. You must also add specific negative keywords that are the *opposite* of the prompt&#39;s main subjects and mood. For example, if the prompt is &#39;dark, night, horror&#39;, the negative prompt must also include &#39;bright, daytime, cheerful, happy, clean, modern&#39;.&quot;<br><br>control_strength: 0.8<br><br>style_preset: &quot;cinematic&quot;<br><br>output_format: &quot;jpeg&quot;<br>```<br><br>Key Instructions to Always Follow:<br><br>* prompt: The description must be as long and verbose as possible. It is the most important part.<br>* negative_prompt: Must be a comprehensive list to block common errors and unwanted themes.<br>* control_strength: You must always include this field. The default value must be 0.8. Do not change it unless I explicitly ask you to.<br>* style_preset: You must always include this field. Default to cinematic or photographic, whichever best fits the image.<br>* output_format: You must always include this field, and its value must always be jpeg.<br><br>My first request is to describe the image(s) I have attached to this message. Please analyze them and generate the YAML profile now.</pre><h3>Designing the Scene</h3><h4><strong>Capture the Structure Reference Image</strong></h4><ul><li>Daylight or golden hour.</li><li>Shoot from <em>the same</em> location you’ll place the projector.</li><li>Capture more of the building than the final projection — extra context helps AI.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8yowdsxaUC--gOINdqVW9w.jpeg" /><figcaption>Structure Reference Image — Masking is optional but improves results</figcaption></figure><h4><strong>Generate the Scene Base Image</strong></h4><ul><li>Use sdcs-wrapper with your theme profile derived from Gemini.</li><li>This becomes the hero still you’ll animate (either in-AI or later in CapCut).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T-MZIa6XkonNNOFEPELSvA.jpeg" /><figcaption>Scene Base Image — Themed as Vecna’s House from Stranger Things</figcaption></figure><h4><strong>Generate the Alignment Image</strong></h4><ul><li>Use a profile that forces bold, high-contrast edges (no color).</li></ul><p>Example profile for Alignment Image:</p><pre># Profile configuration for creating alignment image<br>prompt: &quot;Transform this image into bold, high-contrast black and white with thick outlines, clean architectural edges (walls, roofline, windows, doors), flat white fill, no color, and minimal shading. Technical schematic feel.&quot;<br>negative_prompt: &quot;color, gradients, shading, noise, blur, low quality, text, logo, watermark, people, figures, background clutter&quot;<br>control_strength: 0.95<br>style_preset: &quot;photographic&quot;<br>output_format: &quot;jpeg&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qOmEqE-vlUqRm0xMB728PQ.jpeg" /><figcaption>Alignment Image — Emphasizing edges</figcaption></figure><blockquote><strong>Why two images?</strong><br>The <strong>Alignment Image</strong> gives you crisp edges to match on the facade; the <strong>Scene Base Image</strong> looks good once mapped. You lock the geometry once, then swap content without re-doing alignment.</blockquote><h3>(Optional) AI Video Experiments</h3><p><strong>Veo3</strong> can generate animated shots, but it may drift (camera moves) even when instructed not to. Preface your prompts with:</p><pre>STATIC SHOT // NO CAMERA MOVEMENT<br>The camera must be completely fixed and stationary. NO pan, NO zoom, NO dolly, NO tilt, and NO change in perspective. The camera is fixed to a pole in concrete.<br><br>STATIC ARCHITECTURE<br>All architectural elements and structures must remain completely static and unchanged throughout the video.<br><br>PERMITTED MOVEMENT<br>Characters, objects, and environmental/atmospheric elements (lighting, shadows, weather, fog) may move.<br>---</pre><p>If the AI video model won’t respect a locked camera, <strong>animate in CapCut</strong> instead:</p><ul><li>Use your <strong>Scene Base Image</strong> as the bottom layer.</li><li>Render separate foreground animations on green or transparent background and <strong>key/compose</strong> them over the base.</li><li><strong>Mask</strong> (black-out) any areas you never want projected.</li></ul><p><strong>Export</strong> from the editor at your projector resolution (or higher).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsfUk5Hpuhtja0eDNveZZg.png" /><figcaption>CapCut — Asset layering</figcaption></figure><h3>Projection Alignment</h3><ol><li><strong>Wait for darkness</strong> (earlier if your projector is very bright).</li><li><strong>Reset projector settings</strong>, max brightness, <strong>no keystone</strong>.</li><li><strong>Send a full-white frame</strong> (LumaMap has a tool for this).</li><li><strong>Physically position the projector</strong> so the white area neatly covers the target surface.</li><li><strong>Mount the projector</strong> (tripod, pipe, ceiling mount, etc.).</li><li><strong>Capture the Projection Boundary Image</strong>: a photo of the <strong>illuminated</strong> area from the projector location.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i4gT5EpxqUgejiU6OLqO5w.jpeg" /><figcaption>Projection Boundary Image (gray area added for privacy)</figcaption></figure><h3>Place, Align, Lock in LumaMap</h3><ol><li><strong>Load the Alignment Image</strong> into LumaMap.</li><li><strong>Use the Projection Boundary Image</strong> as a visual reference to roughly place the Alignment Image on canvas.</li><li><strong>Fine-tune alignment</strong> by eye, using edges (roof, windows, door frames) as hard references. <strong>Tip:</strong> Add a grid overlay or flash white/black to check edge bleed.</li><li><strong>Lock the alignment</strong> once edges are crisp and stable.</li><li><strong>Swap in your Scene Base Image or animated video</strong> and verify fit. The need for minor adjustments is normal; do not keystone on the projector — adjust the mapping instead.</li><li><strong>Save</strong> your alignment/project.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kNvPwL4DiplNSVq2jcB5SQ.png" /><figcaption>LumaMap Scene Alignment</figcaption></figure><h3>Playback Improvements (beyond LumaMap)</h3><p>LumaMap is perfect for stills and quick tests, but long video loops can stutter on some machines. For rock-solid playback:</p><p><strong>Export your video</strong> from LumaMap.</p><blockquote><strong>Note on exclusion zones:</strong> LumaMap includes them in <strong>image</strong> exports, not <strong>video</strong>. Workaround: Export your video normally. Export a <strong>blank image</strong> that <em>does</em> contain the exclusions. In CapCut, <strong>stack the blank image on top</strong> of your video and use it as a mask layer. (There are lossless/ffmpeg alternatives, but this is the fastest.)</blockquote><p><strong>Raspberry Pi setup (mpv):</strong></p><ol><li>Copy your video to /home/pi/videos/loop.mp4.</li><li>Test playback: mpv --fs --no-osd --really-quiet --hwdec=auto --loop-file /home/pi/videos/loop.mp4.</li><li>If running over SSH: sudo -u pi DISPLAY=:0 mpv --fs --no-osd --really-quiet --hwdec=auto --loop-file /home/pi/videos/loop.mp4</li><li>Create systemd service: sudo nano /etc/systemd/system/videoloop.service (see below)</li><li>Reboot to confirm is loads as expected</li></ol><p>videoloop.service file:</p><pre>[Unit]<br>Description=Seamless Video Loop (MPV)<br>After=multi-user.target<br><br>[Service]<br>User=pi<br>ExecStart=/usr/bin/mpv --fs --no-osd --really-quiet --hwdec=auto --loop-file /home/pi/videos/loop.mp4<br>Restart=always<br>StandardOutput=null<br>StandardError=null<br><br>[Install]<br>WantedBy=multi-user.target</pre><blockquote>Note: If you have having performance issues, try updating your <em>/boot/config.txt</em> with the following (remember to make a backup first):</blockquote><pre>hdmi_force_hotplug=1<br>hdmi_group=1<br>hdmi_mode=16      # 1080p60<br>hdmi_drive=2<br>disable_overscan=1<br>gpu_mem=256</pre><blockquote>Note: For older Raspberry Pis: consider <strong>videolooper.de</strong> — lean and purpose-built but doesn’t work with most recent versions of Raspberry Pi.</blockquote><h3>Important Notes</h3><ul><li><strong>Don’t keystone on the projector.</strong> Fix geometry in the mapping tool; hardware keystone compounds errors.</li><li><strong>Tripod discipline.</strong> Any position change between white-frame capture and alignment will cost time.</li><li><strong>Bright, light-biased art wins.</strong> Dark art disappears outdoors; stay high-key unless your surface is very bright.</li><li><strong>Match projector resolution.</strong> Export at exact output res to avoid resampling blur.</li><li><strong>Mask early.</strong> Black out areas you never want projected (windows, neighbor walls, trees).</li><li><strong>Protect your gear.</strong> If you don’t have an outdoor projector you will want to build or buy a projector enclosure.</li></ul><h3>Demo</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FI3uqFAnlx80%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DI3uqFAnlx80&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FI3uqFAnlx80%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4de62a671f40b678fe612aa142ebc72b/href">https://medium.com/media/4de62a671f40b678fe612aa142ebc72b/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19781ddd4fcf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration for Unity with CircleCI]]></title>
            <link>https://medium.com/@_ifnull/unity3d-continous-integration-with-circleci-ec2216783f71?source=rss-c0cf7bde4bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec2216783f71</guid>
            <category><![CDATA[circleci]]></category>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[unity3d]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Daniel Smith]]></dc:creator>
            <pubDate>Fri, 25 Sep 2020 22:03:47 GMT</pubDate>
            <atom:updated>2020-09-25T23:20:15.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uojkzV2Sf36SE-RXpim4yg.jpeg" /></figure><h3>Introduction</h3><p>Earlier this year I worked on a Unity project and decided to try and introduce some of our other development processes into the project. As part of the initiative, we tried a few approaches to version control and CI/CD. This article covers the solution we landed on for the project.</p><p>I’m relatively new to Unity, but I am an AWS Certified Solutions Architect with two decades of web development experience so there is some applicable crossover. I’m guessing this approach could be improved significantly, but I figure this may be a good place to start for some people.</p><p>On a related note to CI/CD, when it comes to version control, the biggest lesson from this experience is: merges are hard; especially in Unity. We had some success with UniMerge, but like other types of development, we benefited most by breaking up working files as much as possible so developers were creating fewer conflicts while merging commits. This predominately applied to scenes and prefabs. If you are stuck dealing with merge conflicts, you will never get to the build process 😉 .</p><p><strong>UPDATE: </strong>Since doing my initial research, another method for Unity builds has become available. You can now try using the CircleCI Orb <a href="https://circleci.com/orbs/registry/orb/w3d/unity-build">w3d/unity-build</a>.</p><h3>Summary</h3><p>In this article, I will cover the process of setting up CircleCI, AWS IAM/S3, and Unity (with activation) for automated builds. Currently, this will build a stand-alone Windows executable but can be adapted for any build type. The resulting build files can be found in CircleCI’s artifacts and on S3. Not covered in this article is the deployment of the executables. I’m currently doing this with a PowerShell script that uses the <a href="https://docs.github.com/">Github API</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">S3 static web hosting</a> to download the most recent release.</p><p>The approach was built off the materials found below in the References section. The bulk of the heavy lifting is from <a href="https://gitlab.com/gableroux/unity3d">gableroux/unity3d</a> and <a href="https://gitlab.com/gableroux/unity3d-gitlab-ci-example/">gableroux/unity3d-gitlab-ci-example.</a></p><h3>Requirements</h3><ul><li><a href="https://store.unity.com/compare-plans">Unity license</a></li><li><a href="https://circleci.com/docs/2.0/gh-bb-integration/">CircleCI integrated with version control</a></li></ul><h3>Set Environment Variables</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/72973ac1cdfe9b5e56d3431fbc0796ff/href">https://medium.com/media/72973ac1cdfe9b5e56d3431fbc0796ff/href</a></iframe><ul><li>UNITY_USERNAME/UNITY_PASSWORD - would be the same login used on Desktop app.</li><li>UNITY_VERSION - should correspond to a valid <a href="https://hub.docker.com/r/gableroux/unity3d/tags">gableroux/unity3d</a> Docker tag.</li><li>UNITY_CIPHER - can be any strong random password and will be used to encrypt and decrypt license. This will be passed to openssl inside the Docker container.</li></ul><h3>Get Unity License Activation File</h3><p>This is a more streamlined approach than some older tutorials suggest that utilizes two new Unity arguments. The result is fewer steps and less execution time. Running the following from your project root will create the file .circleci/unity3d.alf which we will need to upload manually in the next step.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9df189c42e87bcb782c3ead0a23ca70/href">https://medium.com/media/d9df189c42e87bcb782c3ead0a23ca70/href</a></iframe><h3>Activate Unity License</h3><ul><li>Go to <a href="https://license.unity3d.com/manual">Manual Activation Page</a></li><li>Upload unity3d.alf from the last step.</li><li>Select Personal license option</li><li>Download the license file to the .circleci directory created in the last step. (example: Unity_v2019.x.ulf)</li><li><strong>DO NOT COMMIT THE CURRENT</strong> ulf <strong>FILE!</strong></li></ul><h3>Encrypt Unity License</h3><p>Instead of committing our license file in plain text, we are going to create an encrypted version and commit that instead.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fbc2f65a8760be5476bcb05a4f82a153/href">https://medium.com/media/fbc2f65a8760be5476bcb05a4f82a153/href</a></iframe><h3>Setup S3 and create IAM user for storing builds</h3><p>This step is optional and can be combined with <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">S3 static web hosting</a> to provide a means of distributing builds. Be sure to replace projectname in the following instructions to something unique.</p><ul><li><a href="https://docs.aws.amazon.com/quickstarts/latest/s3backup/step-1-create-bucket.html">Create an S3 bucket</a> (example: projectname-unity-builds)</li><li><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_managed-policies.html">Create a policy using the JSON</a> below (example: projectname-unity-builds-s3-readwrite)</li><li>Create a user (example: circleci)</li><li>Download the CSV creds and save for later.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a6508a0aa41560ae17a030b9a38cb76e/href">https://medium.com/media/a6508a0aa41560ae17a030b9a38cb76e/href</a></iframe><h3>Add Environment Variables to Circle CI</h3><p>The following key pairs must be added to the project’s environment variables on CircleCI.</p><ul><li>AWS_REGION - Any region is fine but it needs to match.</li><li>AWS_SECRET_ACCESS_KEY - From the previous step.</li><li>AWS_ACCESS_KEY_ID - From the previous step.</li><li>UNITY_CIPHER - Random generate string used to encrypt and decrypt license key.</li><li>UNITY_USERNAME</li><li>UNITY_PASSWORD</li></ul><figure><img alt="Setting an Environment Variable in a Project" src="https://cdn-images-1.medium.com/max/1024/0*fF1-oRLi-nEsSeuC.png" /><figcaption>Setting an Environment Variable in a Project</figcaption></figure><h3>Important Files and Paths</h3><p>The following will need to be added to the project root and any needed configurations should be made before pushing any commits. Once these changes have been made, the next merge should start the build process.</p><p><strong>.circleci/config.yml</strong></p><p>This is the configuration file for CircleCI.</p><ul><li>Changing the Docker image version will require redoing the license activation step each time.</li><li>This is where AWS CLI gets installed and build target and name configurations would be set.</li><li>S3 bucket referenced here should match what was created in the previous step.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ebf69c8e6f094aae8e7575c43b775e3/href">https://medium.com/media/8ebf69c8e6f094aae8e7575c43b775e3/href</a></iframe><p><strong>bin/before_script.sh</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/13303b0f2e05b5d433ca410891cd02bd/href">https://medium.com/media/13303b0f2e05b5d433ca410891cd02bd/href</a></iframe><p><strong>bin/build.sh</strong></p><p>This file is run by CircleCI and is run inside the Docker container.</p><ul><li>The core functionality is performed by the <a href="https://docs.unity3d.com/Manual/CommandLineArguments.html">Unity command-line interface</a>.</li><li>executeMethod will likely be different for your project but I’ve included an example for <em>Assets/Editor/BuildCommand.cs</em> as well.</li><li>If you need to add additional build options, be sure to look into thecustomBuildOptions argument.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/56b389b116c3821fe1c53c041dd2e58b/href">https://medium.com/media/56b389b116c3821fe1c53c041dd2e58b/href</a></iframe><p><strong>Assets/Editor/BuildCommand.cs</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/15ee98fae5fab0b45edc0ee27f80255f/href">https://medium.com/media/15ee98fae5fab0b45edc0ee27f80255f/href</a></iframe><h3>Troubleshooting</h3><p>If you have any trouble, you should be able to test locally (assuming you have Docker installed). From the project root of your host machine (i.e. not inside the Docker container), run the following to set your environment variables, and start the build process.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce192e618a2d037123a6ff1e01fd7eb1/href">https://medium.com/media/ce192e618a2d037123a6ff1e01fd7eb1/href</a></iframe><h3>Resources and References</h3><ul><li><a href="https://gitlab.com/gableroux/unity3d-gitlab-ci-example/tree/circleci-support">Unity3d docker image</a></li><li><a href="https://gitlab.com/gableroux/unity3d-gitlab-ci-example/-/tree/circleci-support/">unity3d-gitlab-ci-example</a></li><li><a href="https://medium.com/@neuecc/using-circle-ci-to-build-test-make-unitypackage-on-unity-9f9fa2b3adfd">Using CircleCI to build/test/make unitypackage on Unity</a></li><li><a href="https://circleci.com/orbs/registry/orb/circleci/aws-s3#commands-sync">circleci/aws-s3</a></li><li><a href="https://gitlab.com/gableroux/unity3d-gitlab-ci-example/blob/9d79dbda56dd3016d7cea7e1e8d385002035dfeb/Assets/Scripts/Editor/BuildCommand.cs">Example Assets/Scripts/Editor/BuildCommand.cs</a></li><li><a href="https://github.com/GabLeRoux/unity3d-ci-example/issues/6">GabLeRoux/unity3d-ci-example: completely scripted activation</a></li><li><a href="https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-step">Using CircleCI Environment Variables</a></li><li><a href="https://medium.com/@h0lycattle/running-unity3d-in-a-virtualized-headless-ubuntu-environment-1adf95c05994">Running Unity3D in a Virtualized Headless Ubuntu Environment</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec2216783f71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OctoberCMS + Cloudfront domain issues]]></title>
            <link>https://medium.com/@_ifnull/octobercms-cloudfront-domain-issues-d8b4cc071144?source=rss-c0cf7bde4bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8b4cc071144</guid>
            <category><![CDATA[octobercms]]></category>
            <category><![CDATA[cloudfront]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Daniel Smith]]></dc:creator>
            <pubDate>Tue, 12 Feb 2019 20:17:51 GMT</pubDate>
            <atom:updated>2019-02-13T05:41:07.065Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*Rd1KAtNGeRq_b1ROYzwtbQ.jpeg" /></figure><p>After taking a site live we noticed that clicking any link on the site would switch from our domain to the domain of the ELB. The original hostname was not being passed to OctoberCMS. While we could probably hard code the hostname into an environment variable somewhere, I figured there is probably a configuration somewhere in Cloudfront that would make this work properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*ReAUaBga3_daQXgoBb5UMQ.png" /><figcaption>Whitelist the “Host” and “Origin” headers in the Default Cache Behavior Settings</figcaption></figure><p>In this scenario we have Cloudfront, then the load balancer, then our EC2 instance. After realizing the issue was Cloudfront not passing the hostname I was able to find a <a href="https://serverfault.com/a/789600/268585">solution on ServerFault</a>. All you need to do is whitelist the “Origin” and “Host” headers in the AWS CloudFront behavior. If you have multiple behaviors setup you will need to do this for each.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8b4cc071144" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS ECS “no space left on device” solution]]></title>
            <link>https://medium.com/@_ifnull/aws-ecs-no-space-left-on-device-ce00461bb3cb?source=rss-c0cf7bde4bd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce00461bb3cb</guid>
            <category><![CDATA[ec]]></category>
            <category><![CDATA[cron]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cannotpullcontainererror]]></category>
            <dc:creator><![CDATA[Daniel Smith]]></dc:creator>
            <pubDate>Wed, 11 Jul 2018 00:16:23 GMT</pubDate>
            <atom:updated>2020-09-25T22:13:13.668Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3csPVaZbrHswpb0c" /><figcaption>Photo by <a href="https://unsplash.com/@jilburr?utm_source=medium&amp;utm_medium=referral">Jilbert Ebrahimi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>I have seen this issue manifest itself in several different ways, but it usually follows another issue that resulted in a container not starting and ultimately an exit code being bubbled up to ECS from the agent. However, even after resolving the issue, the task still won’t start. A message in the ECS console reveals the reason to be either CannotCreateContainerError or CannotPullContainerError followed by “no space left on device.”</p><p>It appears the container initially failing results in a loop where ECS continues to attempt to start the task. This loop leaves dangling Docker volumes which eventually fill the disk. Depending on the size of the images, this may only take a few minutes.</p><p>Another way this may happen is if the deploy process involves creating a new task during each deploy, but the frequency of deploys is greater than the rate the agent cleans up old images. It is also worth reviewing the <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/automated_image_cleanup.html">ECS container agent config to be sure automatic task and image cleanup</a> hasn’t been disabled accidentally.</p><h3>The Solution</h3><p>I’ve set up a cronjob to run <a href="https://crontab.guru/#*/5_*_*_*_*">every 5 minutes</a> to remove old images and dangling volumes. It runs two simple commands to remove containers with an exit status and remove unused volumes. If you need a more robust solution, I suggest taking a look at <a href="https://www.brianchristner.io/docker-cleanup-script-comparison/">Brian Christner’s article on Docker cleanup scripts.</a></p><pre># Example Cron<br>*/5 * * * * /home/ec2-user/ecs-docker-cleanup.sh &gt;&gt; /home/ec2-user/docker-cleanup.log</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc568cc11eb06904791f59c84287107a/href">https://medium.com/media/dc568cc11eb06904791f59c84287107a/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce00461bb3cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>