<?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 Lawrence Aritao on Medium]]></title>
        <description><![CDATA[Stories by Lawrence Aritao on Medium]]></description>
        <link>https://medium.com/@lawrencearitao?source=rss-6a932e2f7e1b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kjlSr0mGO2rh63cUiq3MIg@2x.jpeg</url>
            <title>Stories by Lawrence Aritao on Medium</title>
            <link>https://medium.com/@lawrencearitao?source=rss-6a932e2f7e1b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 10:39:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lawrencearitao/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[Create Massive Amounts of NFT Metadata With This Open Source Generator]]></title>
            <link>https://medium.com/@lawrencearitao/create-massive-amounts-of-nft-metadata-with-this-open-source-generator-72ed7db4f9bc?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/72ed7db4f9bc</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Sat, 11 Feb 2023 05:00:33 GMT</pubDate>
            <atom:updated>2023-02-11T05:00:33.279Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dVx-qrUc2Z5WMc9HLIByEQ.png" /><figcaption>To the Moon and Beyond!</figcaption></figure><p>As you develop web 3 applications, you may want to test your front end components with a high volume of NFT metadata. I built a tool to help with that, and it works with one line of code.</p><p>Before reading further, if you just want a web app to generate random or customized metadata, <a href="https://metadata.pilipinas.dev/">https://metadata.pilipinas.dev/</a> has you covered.</p><p>If you’d like more versatility in the kind of metadata created, you can use the open source library that powers the app.</p><p><strong>NFT Metadata Generator: A tool for testing and developing NFT collections.</strong></p><p>The tool is a javascript utility function that can auto-generate a nearly endless amount of metadata for testing purposes. Here’s how to use it:</p><p><strong>Step 1: Install the Tool:</strong></p><pre>npm i nftmetadatagenerator</pre><p><strong>Step 2: Import the tool in a javascript or typescript project.</strong></p><p>Initialize a variable that uses the generator function to supply its value. Pass in an object with the collection size. The result will be an array of standardized NFT metadata objects in the amount you specified. You can console.log the array’s first element for inspection.</p><pre>import generator from &#39;nftmetadatagenerator/dist/generator&#39;<br><br>const metadata = generator ({collectionSize:100})<br><br>console.log(metadata[0])<br></pre><p>The object you will see returned will look like:</p><pre>{<br><br>  &quot;name&quot;:&quot;Awesome Collection 1&quot;,<br>  &quot;description&quot;:&quot;Freely Generated Metadata&quot;,<br>  &quot;compiler&quot;:&quot;Free Metadata Generator&quot;,<br>  &quot;image&quot;:&quot;https://picsum.photos/400&quot;,<br>  &quot;attributes&quot;:[<br>      <br>    {&quot;trait_type&quot;:&quot;Strength&quot;,&quot;value&quot;:17},<br>    {&quot;trait_type&quot;:&quot;Agility&quot;,&quot;value&quot;:14},<br>    {&quot;trait_type&quot;:&quot;Power&quot;,&quot;value&quot;:12},<br>    {&quot;trait_type&quot;:&quot;Intelligence&quot;,&quot;value&quot;:12},<br>    {&quot;trait_type&quot;:&quot;Charm&quot;,&quot;value&quot;:15},<br>    {&quot;trait_type&quot;:&quot;Dexterity&quot;,&quot;value&quot;:17},<br>    {&quot;trait_type&quot;:&quot;Charisma&quot;,&quot;value&quot;:15}]<br>  <br><br>  }<br></pre><p><strong>Step 3: Customize the metadata even further</strong></p><p>The input object passed into the function allows you to change the name, description, compiler, image URL, traits types, values, and rarities. Typescript is supported out of the box, and the readme has all the necessary instructions for customization.</p><p>Here’s an example of a more customized collection:</p><pre>import generator from &#39;nftmetadatagenerator/dist/generator&#39;<br><br>const metadata = generate({<br>          collectionSize: 2,<br>          name: &quot;Cutomized Name!&quot;,<br>          compiler: &quot;Amazing Labs&quot;,<br>          description: &quot;Open Source Tools Rock&quot;,<br>        })</pre><p>Console logging metadata above will yield:</p><pre>[<br><br>{<br>  &quot;name&quot;:&quot;Cutomized Name! 1&quot;,<br>  &quot;description&quot;:&quot;Open Source Tools Rock&quot;,<br>  &quot;compiler&quot;:&quot;Amazing Labs&quot;,<br>  &quot;image&quot;:&quot;https://picsum.photos/400&quot;,<br>  &quot;attributes&quot;:<br>      [<br>        {&quot;trait_type&quot;:&quot;Strength&quot;,&quot;value&quot;:12},<br>        {&quot;trait_type&quot;:&quot;Agility&quot;,&quot;value&quot;:12},<br>        {&quot;trait_type&quot;:&quot;Power&quot;,&quot;value&quot;:10},<br>        {&quot;trait_type&quot;:&quot;Intelligence&quot;,&quot;value&quot;:17},<br>        {&quot;trait_type&quot;:&quot;Charm&quot;,&quot;value&quot;:14},<br>        {&quot;trait_type&quot;:&quot;Dexterity&quot;,&quot;value&quot;:15},<br>        {&quot;trait_type&quot;:&quot;Charisma&quot;,&quot;value&quot;:14}]<br><br>  },<br>    <br>  {<br>  <br>  &quot;name&quot;:&quot;Cutomized Name! 2&quot;,<br>  &quot;description&quot;:&quot;Open Source Tools Rock&quot;,<br>  &quot;compiler&quot;:&quot;Amazing Labs&quot;,<br>  &quot;image&quot;:&quot;https://picsum.photos/400&quot;,<br>  &quot;attributes&quot;:<br>     [<br>        {&quot;trait_type&quot;:&quot;Strength&quot;,&quot;value&quot;:12},<br>        {&quot;trait_type&quot;:&quot;Agility&quot;,&quot;value&quot;:15},<br>        {&quot;trait_type&quot;:&quot;Power&quot;,&quot;value&quot;:14},<br>        {&quot;trait_type&quot;:&quot;Intelligence&quot;,&quot;value&quot;:12},<br>        {&quot;trait_type&quot;:&quot;Charm&quot;,&quot;value&quot;:17},<br>        {&quot;trait_type&quot;:&quot;Dexterity&quot;,&quot;value&quot;:14},<br>        {&quot;trait_type&quot;:&quot;Charisma&quot;,&quot;value&quot;:10}]<br>    }<br><br>]</pre><p>The tool is available at <a href="https://www.npmjs.com/package/nftmetadatagenerator">https://www.npmjs.com/package/nftmetadatagenerator</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72ed7db4f9bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smart Contracts for Lawyers Who Know Little About Ethereum and Bitcoin]]></title>
            <link>https://medium.com/@lawrencearitao/smart-contracts-for-lawyers-who-know-little-about-ethereum-and-bitcoin-4130428dae54?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4130428dae54</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[lawyers]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Sun, 28 Aug 2022 13:21:35 GMT</pubDate>
            <atom:updated>2022-09-19T04:00:37.788Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>TL;DR [summary]:</strong></p><p>1. The blockchain was first a decentralized ledger (bitcoin). With Ethereum, it is now a ledger and a virtual worldwide computer that saves its state/progress with every block.</p><p>2. Smart contracts are self-executing agreements running on the blockchain’s virtual worldwide computer.</p><p>3. Lawyers have an important role to play in smart contract design. Read the full post to know more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRegrrM5vHZN5nYVdwfBnQ.png" /></figure><p>Ever had someone fail to hold up their end of an important contract? Remember the grief? Imagine if a contract could also be self-executing, with no intervention required for payment after a service is fulfilled? In 1996, Nick Szabo — a computer scientist and law graduate — authored a paper on this idea.</p><p>The smart contract became possible after the first public blockchain- bitcoin — paved the way for other blockchains such as Ethereum. Ethereum evolved blockchain technology to become more than a distributed, decentralized ledger.</p><p>With Ethereum, the blockchain became a powerful global computer that can record transactions, execute business logic, and preserve the state (or history) of the network from block to block.</p><p>If this sounds alien, please read on. Newcomers to the blockchain are the primary audience I am writing this for. <br> <br><strong>Start With the Familiar Territory of Obligations:<br></strong>In the blockchain space, lawyers (and law students semester 3 onwards) have an advantage: the lens of obligations.</p><p>Nearly everything in law (and the blockchain) revolves around the idea of an obligation- the juridical (and programmatic) necessity to deliver something, perform an action, or refrain from an action.</p><p>Consider: Human rights do not just recognize your inherent dignity as a person, they generate obligations to respect and protect your inherent dignity.</p><p>Obligations modulate every relationship you will have. Constitutions create obligations that the state must respect (the bill of rights). Those obligations define the parameters between an entire government and a single citizen through a mantle of protection.</p><p>Last example: civil law establishes obligations between persons, and contracts can extend and add to those obligations by mutual agreement. These obligations affect our daily relationships and transactions with others.<br> <br>Let us use the lens of obligations to discuss the blockchain as (1) a decentralized distributed ledger, and (2) an immutable record of a network’s state.</p><p><strong>Decentralized: Everyone is Sovereign.<br></strong>Bitcoin introduced the idea of self-sovereignty: everyone is the true owner of their network resources. Everyone is given the power to verify- instead of trust- that a transaction and its sender are authentic. No one — regardless of status- can spend the resources of an account, except the holder of the private key.</p><p><strong>A Distributed Ledger: Everyone Knows Everything<br></strong>Bitcoin introduced the idea of total transparency of transactions. By design, every node in the bitcoin network contains a record of every transaction made- sender, receiver, and amount.<br> <br>How are transactions initiated, verified, and recorded? By performance of key obligations:</p><p>1. Honor only valid transactions <br>2. Record only valid transactions to the blockchain <br>3. Reward the participants who secure the blockchain against fraudulent transactions</p><p><strong>Transaction Integrity:<br></strong>We are all familiar with the notorious difficulty many Filipinos face when securing a valid ID, since a valid ID is often required to obtain a valid ID. Fortunately, the blockchain does not require this.</p><p>With your public-private key pair, you can imprint an indelible, authentic signature on a transaction, while the address functions like a postal address and bank account combined, allowing transactions to be routed properly.</p><p><strong>Private Keys:<br></strong>A private key is a 256-bit random number used to sign (encrypt) transactions.</p><p><strong>Public Keys:<br></strong>The public key is generated by using one-way cryptography on the private key. By design, it is not possible to calculate a private key from a public key.</p><p>Encrypting a message with your private key is an action only you can do. The public key is then used to verify that the message came from you, completing the authentication process.</p><p><strong>Addresses:<br></strong>Addresses are 20 characters long, and generated from the public key through hashing.</p><p><strong>Transaction Recording: How it Works<br></strong>Each bitcoin block will only accept valid transactions, verified by their receivers, and sent for recording by a special participant called a miner. How are miners assigned?</p><p>In bitcoin, record-creation and record security is accomplished by requiring that any new record be written only after a miner solves a mathematical proof-of-work problem. <br> <br>The proof-of-work problem is a security feature, similar to the combination lock of a vault-but millions of times harder to compute. To better understand it, let us think of Superman and his fortress of solitude.</p><p>In one comic, Superman demonstrates that his key to the fortress of solitude is 500,000 tons. The bitcoin proof-of-work puzzle is the mathematical equivalent of requiring a person to lift 500,000 pounds before recording transactions.</p><p>What the above means is a bad actor would have to spend millions of dollars just to get a chance to put in something malicious on the chain.</p><p>Further, the difficulty of the network puzzle scales with the computing power of all miners combined. Imagine a bad actor bringing in enough power to lift 500,000 tons, only to discover that Superman changed the weight of his key to 1 million tons?</p><p><strong>Smart Contracts on Ethereum:<br></strong>With Ethereum’s virtual computer, the blockchain can now record transactions, run programs, and save the progress and state of those programs.</p><p>For example, if the program were running a chess game, the blockchain could save the positions of all the pieces, and even the records previous games played. The computer that runs on the Ethereum network is called the Ethereum Virtual Machine (EVM), and it is in the EVM that the first smart contracts came to life.</p><p><strong>Smart Contracts: Business Logic Enforced On the Blockchain <br></strong>Recall that a smart contract is a self-executing agreement. Smart contracts are able to capture all kinds of business logic from simple (an up front sale) to highly complex (decentralized finance applications for exchanging tokens and staking assets).</p><p>Here as well, the lens of obligations is helpful. A smart contract’s entire control flow — and security — depends on a clear design of the obligations between parties.</p><p>What Role would lawyers play in smart contracts?<br>Your onramp is closer than you might think. Before a smart contract can be coded (written in a program language), it must first be designed- and designed well.</p><p>Consider: in Q2 2022 alone, over 500 million USD was lost to exploits in smart contracts that could have been prevented by better design.</p><p>Therefore, as lawyers, your role in smart contract design is similar to the role you play in legal contract design: Protect your client. Find the loopholes in the terms, and create iron-clad instructions that will result in cleaner, safer code.</p><p><strong>Here is a case study where a lawyer could have saved a project a lot of grief and money:<br></strong>1. A recent hack involved the use of a flash loan to give a hacker temporary voting power in the form of an 80 percent majority.<br>2. The hacker exploited a poorly conceived feature where a 2/3 supermajority could approve any proposal after only 24 hours. <br>3. The blockchain equivalent of a hostile takeover occurred after the hacker deposited 1.2 Billion dollars of flash-loaned funds in a special account that awarded voting power based on deposit size, with no pre-requisite deposit length.<br>4. Sidebar: A flash loan is a unique blockchain feature where you can borrow funds with no collateral, provided they are returned in the same transaction with a fee. <br>5. The hacker used their supermajority to approve their own malicious proposal.<br>6. Upon expiry of the wait time, the hacker proceeded to strip the project of all its resources.<br>7. The hacker’s net profit was USD 80 million after paying the interest on the flash loan.</p><p>How could a lawyer with smart contract knowledge have prevented this? By reviewing the business logic of the project, and advising the team to secure against hostile takeover mechanisms.</p><p><strong>What we have learned:</strong></p><ol><li>The blockchain is a decentralized ledger and also a virtual worldwide computer that saves its state/progress with every block.<br>2. Smart contracts are self-executing programs running on the blockchain’s virtual worldwide computer.<br>3. Lawyers have an important role to play in smart contract design.</li></ol><p>— —</p><p>This also appears in <a href="https://law.aritao.dev/articles/smart-contracts-for-lawyers">https://law.aritao.dev/articles/smart-contracts-for-lawyers</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4130428dae54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web 3 Security Report Says 718M USD Lost to Bad Actors in Q2 2022]]></title>
            <link>https://medium.com/@lawrencearitao/web-3-security-report-says-718m-usd-lost-to-bad-actors-in-q2-2022-56c1e600626c?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/56c1e600626c</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Fri, 26 Aug 2022 12:55:38 GMT</pubDate>
            <atom:updated>2022-08-26T12:55:38.401Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>In the reporting period, almost 8 of every 10 successful attacks were in the DeFi space.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uSzbq6jwIm_rSyTqs_9Cwg.png" /><figcaption>Cracks In Security Led to 718M USD Lost in A Single Quarter for Web 3</figcaption></figure><p>The <a href="https://static.footprint.network/report/Q2_2022_Web3_Security_Report.pdf">Beosin Q2 2022 Web 3 Security Report</a> also found:</p><p><strong>Close to half</strong> <strong>of all attacks were contract vulnerability exploits</strong> (security issues in the code!).</p><p><strong>A little over half of the attacked projects were audited</strong>, and those audited projects lost 3/4 of the total funds stolen — a staggering 547 Million USD. What this means is 3/4 of the lost funds were taken from firms that actually took steps to protect their communities.</p><p>Does the above indicate that the quality of audits as a whole are going down? Perhaps. A more nuanced possibility is that some projects are choosing cheaper, less reliable audit firms.</p><p><strong>Many of the exploits occurred due to business logic design.</strong> This large umbrella covers several exploits- including validation, permission checks, and reentrancy.</p><p><strong>To close with a cautionary tale, here’s a short case study on flash loan attacks,</strong> which can happen whenever a decentralized autonomous organization employs vulnerable business logic:</p><p>Beanstalk, an Ethereum stable coin platform, recently fell victim to a malicious use of flash loaned funds, resulting in a loss of over 170M USD. A flash loan is a no collateral loan where funds are borrowed and quickly returned within the same transaction, usually with a small fee. It’s only possible on a blockchain, and most commonly used in arbitrage, where the funds can be used to profit off of price disparities across exchanges.</p><p>Beanstalk employed a special emergency commit function where a governance proposal can be implemented one day after approval by a 2/3 majority vote. In theory, it’s a good way to enforce agility when a 2/3 consensus exists. In practice, it widened the attack surface for enterprising hackers.</p><p>Since deposits into the Beanstalk diamond contract granted immediate voting power, a flash loan was ideal to hijack the entire governance structure.</p><p>The hacker did exactly that- he took a flash loan totaling over 1Billion USD in various tokens, and used them to seize close to 4/5 of the voting power. With this power, he or she approved their own malicious proposal- a change to the system that allowed them drain Beanstalk’s funds.</p><p>Once his proposal was approved, all he needed to do was wait for the one day period to pass, and he was free to execute a blitz of transactions to siphon Beanstalk’s resources. His net profits were close to 80M USD.</p><p><strong>A Takeaway from the Beanstalk story:</strong></p><p><strong>Since business logic is often built directly into a smart contract, security best practices need to influence not just the code of a contract, but its design phase as well.</strong> The difference between the two is that the design process is conceptual and foundational, and it is the first clear chance a team will get to incorporate best practices.</p><p>For instance, if we wish to prevent an exploit similar to Beanstalk, it is in the design phase that a team can say, “Our governance contracts must never allow seizure of a 2/3 majority for funds that are not locked for at least (x) days.” That statement — while not yet translated to code — functions as a principle for the team’s engineers to adhere to in the coding phase, and check for in the testing phase.</p><p>Deliberate design often results in cleaner, safer code. Safer code means safer communities and a safer blockchain space.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56c1e600626c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Safeguard Your NFT Metadata With a Cloudflare Worker (For Free!)]]></title>
            <link>https://medium.com/@lawrencearitao/safeguard-your-nft-metadata-with-a-cloudflare-worker-for-free-e2dfca57b237?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2dfca57b237</guid>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[cloudflare-workers]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[metadata]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Thu, 25 Aug 2022 03:26:19 GMT</pubDate>
            <atom:updated>2022-08-25T03:26:19.861Z</atom:updated>
            <content:encoded><![CDATA[<h4>If you are launching an NFT project that might not sell out completely in the early mint or pre-reveal phase, you might want to mask the true content ID of your metadata folder so that it isn’t easy to snipe or steal collection data.</h4><h4>TL;DR: I have published the <a href="https://github.com/lawrenceaph/cloudflareworker-nft-metdata-and-image-server">codebase</a> for a Cloudflare worker that implements the exact measure mentioned above, and you can use it with an existing IPFS CID (you’ll need to supply the gateway). Enjoy!</h4><h4>What is NFT metadata?</h4><p>For our discussion, NFT metadata refers to the file that a non-fungible token (NFT) universal resource identifier (URI) points to containing its properties. It might be likened (quite loosely) to the DNA of an NFT.</p><p>Sample Metadata compatible with OpenSea:</p><pre>{<br>  &quot;name&quot;: &quot;Web Art - Wart! #1&quot;,<br>  &quot;description&quot;: &quot;Made with MidJourney&quot;,<br>  &quot;image&quot;: &quot;https://ipfs.unstoppable.gallery/ipfs/QmSDvjumNSseHAwUHQ1iSn3ZQtu6At88TE8aV8eYGiZb7r/1.png&quot;,<br>  &quot;dna&quot;: &quot;e69e614ca90c2da20ede73b63b96303fb45d0704&quot;,<br>  &quot;edition&quot;: 1,<br>  &quot;date&quot;: 1661263641596,<br>  &quot;attributes&quot;: [<br>    {<br>      &quot;trait_type&quot;: &quot;Sig&quot;,<br>      &quot;value&quot;: &quot;w3&quot;<br>    },<br>    {<br>      &quot;trait_type&quot;: &quot;WartWork&quot;,<br>      &quot;value&quot;: &quot;shadow&quot;<br>    }<br>  ],<br>  &quot;compiler&quot;: &quot;HashLips Art Engine&quot;<br>}</pre><p><strong>How is metadata stored?</strong></p><p>Metadata can be stored in a centralized or decentralized way. Centralized storage means you place the files in a cloud folder that has an owner (Amazon S3, Google Cloud Storage, Digital Ocean Spaces). Decentralized storage means the use of a network like the Inter Planetary File System (IPFS) with peer to peer distribution, unchangeable files, and digital signatures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rPZM-z_urXps7S-jBSSRZA.png" /><figcaption>The IPFS home page</figcaption></figure><p><strong>What are the strengths of each method?</strong></p><p>Centralized files are controllable and easier to hide or take down when necessary. Decentralized files on the other hand, are transparent, immutable (unchanging), and served across many peer to peer nodes, making it highly resilient to takedowns.</p><p><strong>What are the weaknesses of each method?</strong></p><p>Centralized files can change, so a project’s community must have a higher trust level when there is centralized metadata. Meanwhile, decentralized files cannot be hidden once their content ID is released. In decentralized systems with a disclosed CID, the community is at risk of exploitation from bad actors. How? A clever but nefarious individual might take all the content of a project and clone it elsewhere even before the mint phase completes! Ouch.</p><p><strong>What are some solutions to the metadata and image theft issue?</strong></p><p>Some smart contracts have a “hidden” state by default, where the contract does not reveal the true token URI, and points instead to a pre-reveal file during mint phase. This works very well for projects that can sell out fast. However, for projects with a slower burn, you might need a solution that works even when a contract switches from “hidden” to revealed.</p><p><strong>Can metadata be hidden while a token is not yet minted?</strong></p><p>Hash Lips Lab has an excellent solution for this exact use case, and I recommend you try it <a href="https://github.com/hashlips-lab/safe-nft-metadata-provider">here</a> if you prefer a solution that deploys quickly with minimal setup. The metadata provider spun up by the code will only reveal data for minted tokens.</p><p><strong>What are the requirements for the Hashlips Lab solution?</strong></p><p>First, you’ll need to be ready to move the metadata JSON files and your images to a different location (Digital Ocean Spaces).</p><p>Second, you’ll need to be ready to cover fees for the digital ocean solution after the trial / bonus ends.</p><p>Third, be ready with a Web3 endpoint. If you need to use a free RPC endpoint, I recommend <a href="https://www.ankr.com/rpc/">ankr</a>.</p><p><strong>Can Cloudflare Workers provide a similar solution?</strong></p><p>Yes, but it will take some extra work. The Hashlips Lab solution is a really good one, and I do recommend it if your team can cover costs (5–10 USD/month on Digital Ocean is not so bad).</p><p>For those that need a resource-friendly solution, the Cloudflare Workers platform has a generous free tier, and I do like it. Here is an example of an image served from a Cloudflare worker:</p><p><a href="https://wart.unstoppable.gallery/4.png">https://wart.unstoppable.gallery/4.png</a></p><p>For those interested, the image looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sfM4avilF9ZK4nern9UKcw.png" /></figure><p>The true IPFS location can be explored at:</p><p><a href="https://ipfs.unstoppable.gallery/ipfs/QmSDvjumNSseHAwUHQ1iSn3ZQtu6At88TE8aV8eYGiZb7r/4.png">https://ipfs.unstoppable.gallery/ipfs/QmSDvjumNSseHAwUHQ1iSn3ZQtu6At88TE8aV8eYGiZb7r/4.png</a></p><p>To illustrate the importance of hiding the CID (that string of characters above between ipfs/ and the /4.png, try visiting this link:</p><p><a href="https://ipfs.unstoppable.gallery/ipfs/QmSDvjumNSseHAwUHQ1iSn3ZQtu6At88TE8aV8eYGiZb7r/4.png">https://ipfs.unstoppable.gallery/ipfs/QmSDvjumNSseHAwUHQ1iSn3ZQtu6At88TE8aV8eYGiZb7r/</a></p><p>If you visit that link, you’ll see the whole folder of images for the entire collection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uWCBHIMMywsyblmSe1Bm2Q.png" /></figure><p>The same principle holds for the metadata. If you visit the true metadata origin of the collection, you can find everything there:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m40ZnLhwU19ysmo2vW3h9g.png" /></figure><p>If your team has no concerns with files and images being easily accessed before your collection is fully minted, there’s no need for the solution below. If you do see a need to protect metadata until minting is complete, the instructions below can help you set up a free solution.</p><p><strong>Deploying the Cloudflare Workers project:</strong></p><ol><li>Before we start, be sure to have nodejs running in your system. Learn about it <a href="https://nodejs.org/en/">here</a> if you’re new to it.</li><li>Disclaimer: this method is tested to work with contracts using the Hashlips lab ERC 721 NFT contract or a functional equivalent. If you are using a different contract, double check if it has the revealed() function included. If not, this solution can still work with some code tweaks. Let me know in the comments if you need some help.</li><li>Before starting, make sure the metadata uses the JSON format, and be sure to use PNG files (or replace the png entries with your chosen format before deploying). You must also be sure that your smart contract allows you to set the tokenURI prefix. If not, this method will not work for your smart contract. You may want to perform these steps before your project is widely released to the public.</li><li>Clone the code from <a href="https://github.com/lawrenceaph/cloudflareworker-nft-metdata-and-image-server.git">here</a>.</li><li>Run npm install in the directory of the project.</li><li>Create a <a href="https://cloudflare.com/">Cloudflare</a> account (skip if you have one).</li><li>Run wrangler login and authorize the CLI.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gx5unO66zUGDiYzJq-6c9A.png" /><figcaption>Authorize Wrangler</figcaption></figure><p>8. Run wrangler publish to create a version of the Cloudflare Worker that uses the project’s default values. A URL will appear:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*H-9CN4PvUd43fTXBUvZ88w.png" /></figure><p>Test your URL (not the one above). If it is working, proceed to edit the index.js file, and change the contract address and web3 endpoints to suit your use case:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VhglGWfoicbNTBKiDsyh2g.png" /></figure><p>9. Change the token URI and image URI to suit your use case (i.e., if your files are on IPFS, supply the URL version which uses your gateway):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KYT9GG5WHS_yqrbxl0xPLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ia8POrF-IrA6qeXRwRm-Pw.png" /></figure><p>10. If you got this far, you’re almost ready for testing with your smart contract. The next step is to ensure your contract points its tokenURI prefix to the worker (the URL generated upon publishing), instead of IPFS or your original metadata URL prefix. Once that’s done, you can test your worker locally:</p><p>Test the worker locally by running “wrangler dev”. It should show the JSON files and the png files at the localhost /(file):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJo-XDETSe0vJEHk1QGmdw.png" /><figcaption>JSON served from your local worker! Awesome</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*COtmJhBEDNazWAAWKon6pg.png" /><figcaption>PNG served from your local worker! Yay!</figcaption></figure><p>10. Deploy the application to Cloudflare workers by running “wrangler publish”.</p><p>11. Test it again at the deployed URL.</p><p>First, test it on a token URI that should not show any metadata:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n0mTeg055hOzLQJQtDiJgw.png" /><figcaption>When a token doesn’t exist yet, the metadata will not be accessible. Yay!</figcaption></figure><p>Next, test it on an image that should not be accessible:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n0mTeg055hOzLQJQtDiJgw.png" /><figcaption>Same error for an image request because the token is not yet minted. Yay!</figcaption></figure><p>Test also for a JSON file that should be visible:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eFTnRnvqdmMy12tgfNvn0A.png" /><figcaption>The metadata for existing tokens is served. Hooray!</figcaption></figure><p>Finally, test for a PNG that should be visible:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-n1ZyAAn0HEWqmdgFOwTTw.png" /><figcaption>It works! An image for a minted NFT will show up.</figcaption></figure><p>12. Once your Cloudflare worker is confirmed to be working, you might decide to keep it as the tokenURI until your mint phase is complete, after which you can revert the tokenURI to the decentralized version.</p><p>Most projects should consider renouncing contract ownership after the final tokenURI change, to let their communities know that no further metadata URI switches will happen. It is probably also a good idea to disclose to your community that any tokenURI security measures are being used solely for the purpose of protecting them against metadata and image theft.</p><p>That’s it! I hope this tool helps you in some way, especially if your team is still in the process of getting a project on its feet. If you see any bugs, you can tweak them and send a pull request, or create an issue on the repo. Lastly, if you think a longer, more detailed tutorial (maybe a video) is required, let me know as well. Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2dfca57b237" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Six Truths About Writing We Often Forget]]></title>
            <link>https://medium.com/@lawrencearitao/six-truths-about-writing-we-often-forget-f1bb5bfe8527?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1bb5bfe8527</guid>
            <category><![CDATA[thoughts-and-ideas]]></category>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Sat, 26 Jun 2021 23:07:48 GMT</pubDate>
            <atom:updated>2021-06-26T23:07:48.115Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCvx-1VEo26wq-DFGxsH-Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@ratushny?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Dmitry Ratushny</a> on <a href="https://unsplash.com/@ratushny?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>Harness the spell of small things:</strong> The warm bread of your childhood, the scent of a freshly sharpened pencil, the time-yellowed corners of your favorite book. In these details, magic lives.</p><p><strong>Speak your truth plainly</strong>. Truth nourishes, and all at once, stirs a thirst for more.</p><p><strong>Offer something real</strong>. Take us to a time so special it aches to remember it, yet feels too good to forget.</p><p><strong>Pure stories are the love language of any audience</strong>. Lay them gently at the doorstep of the mind. They will be gratefully received.</p><p><strong>Speak from a connection to your dignity and worth</strong>, even if at first, you’re still trying to believe it, still learning to affirm it. Truth, even as a whisper, can still stir the heart.</p><p><strong>Get Started.</strong> At the other side of the painfully real, powerfully human things you share are those that need to hear exactly what you have to say.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1bb5bfe8527" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[As A Writer, You Don’t Need Medium. Medium Needs You.]]></title>
            <link>https://medium.com/@lawrencearitao/as-a-writer-you-dont-need-medium-medium-needs-you-4635549f4acf?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4635549f4acf</guid>
            <category><![CDATA[critique]]></category>
            <category><![CDATA[medium]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Fri, 18 Jun 2021 23:47:44 GMT</pubDate>
            <atom:updated>2021-06-18T23:47:44.977Z</atom:updated>
            <content:encoded><![CDATA[<h4>No creators, no relevance.</h4><p>The Medium platform recently cut spam accounts, which is a great step for platform quality. However, writers and users reported being unaware of the inbound housekeeping. This might have been to prevent spam account holders from cloaking accounts. The unfortunate consequence was that some Medium writers felt demoralized by the drop in follower count.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OoIezKX-DNzY_t7Zm5i14Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@glenncarstenspeters?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Glenn Carstens-Peters</a> on <a href="https://unsplash.com/s/photos/typewriter?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>The Big Idea</h4><p>This brief article is about why writers are the single most valuable resource of the Medium platform. I write this for creators on Medium that feel they got the short end of the stick.</p><h4>TLDR:</h4><p>You don’t need Medium, Medium needs you. Your content is probably more valuable than the amount Medium can offer for it. You can take your content elsewhere. The most valuable creators on Medium are the ones that forgive it and influence it from within.</p><h4>You don’t need Medium, Medium needs you.</h4><p>This first thought is simple and always true. If Medium’s writers decide to create trash for one day to flex power, Medium will have the worst day of its life. Medium’s relevance is in the hands of the writers that call it home.</p><h4>Your content is probably more valuable than the amount Medium can offer for it.</h4><p>This idea is not shared to discredit Medium. There are a few reasons why Medium can’t pay full value for every piece.</p><p>First, the actual value of your content is not immediately discernible to the view-based system.</p><p>Second, business realities dictate that Medium must profit from your work, or die a slow death.</p><p>Third, as payments are view-based, many great pieces can be overlooked due to imperfections in the curation system. Luck still plays a role in whether the true value of a piece is recognized by the platform.</p><h4>You can take your content elsewhere and rebuild, if you conclude that Medium does not deserve your trust.</h4><p>If you feel that Medium is no longer trustworthy, or not a healthy partner for the hosting of your content, you can look for a new home. However, setting up your own web presence takes time and resources. I advocate for discernment and not a knee-jerk response, especially in light of what I have to say in the next and last portion.</p><h4>The most valuable content creators on Medium are the ones that forgive it.</h4><p>Medium will not get it right for every writer. But the ones that forgive the system — regardless of whether Medium is aware of its shortcomings at first— are also the ones that can influence it to improve from within. I’m saying this from my experience with communities. It is the ones that forgive and stick with a community that become its leaders and most valuable voices.</p><p><strong><em>Did you get a follower cut? How are you holding up? If you have content you want me to see and read, post it as a response and I’ll definitely check it out. I give honest claps for pieces I resonate with, and I do that with joy and generosity.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4635549f4acf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Complete Infallible List of 10 Secret Shortcuts to Develop Character!]]></title>
            <link>https://medium.com/@lawrencearitao/the-complete-infallible-list-of-10-secret-shortcuts-to-develop-character-511f12dd955c?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/511f12dd955c</guid>
            <category><![CDATA[funny]]></category>
            <category><![CDATA[comedy]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Sun, 23 May 2021 10:26:23 GMT</pubDate>
            <atom:updated>2021-05-23T10:26:23.720Z</atom:updated>
            <content:encoded><![CDATA[<p>😂</p><p>…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=511f12dd955c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Wordpress on Cloud Run in 2021 ]]></title>
            <link>https://medium.com/@lawrencearitao/deploying-wordpress-on-cloud-run-in-2021-d2f3c58b039b?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2f3c58b039b</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[runcloud]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[wordpress]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Sat, 22 May 2021 14:12:10 GMT</pubDate>
            <atom:updated>2021-07-28T15:14:06.062Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>It’s still an awesome way to build a site </em></strong>🔥</p><p><em>(Latest Update July 28, 2021).</em></p><p>This is an updated guide for using Cloud Run and Wordpress in 2021. Credit to <a href="https://medium.com/u/1b311ca358f9">Peter Kracik</a> for his original <a href="https://medium.com/@peterkracik/running-wordpress-website-on-google-cloud-run-simple-and-cheap-fa19b62a7417">tutorial</a> and <a href="https://github.com/peterkracik/wp-gcloud-run.git">source code</a>.</p><p>Here is a sample site that uses Cloud Run and Wordpress: <a href="https://aritao.org/">https://aritao.org</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pv0LFFKfht9thdFYE5kJpg.png" /></figure><p>These are the performance metrics on Lighthouse for the site:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*g93UjCBGmDZlnMGtApxoRA.png" /><figcaption>Not bad!</figcaption></figure><p>Wordpress is popular publishing tool for sites and blogs. As an open-source content management system, it is forever free to use.</p><p>Google Cloud Run is a platform for running services in containers without managing underlying hardware. Cloud Run can deploy a service that “hosts” a Wordpress site.</p><p>These are the steps we will follow:</p><ol><li>Create a project on Google Cloud Platform. Enable billing.</li><li>Activate the Google Cloud Run API, Google Cloud SQL API, and Google Cloud SQL Admin API.</li><li>Prepare the image for Cloud Run.</li><li>Set up a Cloud SQL server and database.</li><li>Deploy the container with instructions and variables.</li><li>Run the service and configure Wordpress.</li><li>Connect Wordpress to a storage service.</li><li>Enjoy your new, scalable blogging / site-building solution.</li></ol><h3><strong>Create a Project On Google Cloud Platform</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*NdFNlxqU3HVwkncDOhBBwg.png" /></figure><p>Enable <a href="https://cloud.google.com/billing/docs/how-to/modify-project">billing</a>.</p><h3>Activate Cloud Run API, Cloud SQL API, and Cloud SQL Admin API</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*ymj84EXsZiJ7m4QIPv0UUw.png" /><figcaption>Use the console search to locate the APIs easily 😊</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*0kwdStphum4so1ybQuOVgg.png" /></figure><h3>Prepare the image for Cloud Run.</h3><p><a href="https://medium.com/u/1b311ca358f9">Peter Kracik</a> produced the original source code for the solution in this guide, and it is available <a href="https://github.com/peterkracik/wp-gcloud-run.git">here</a>. The repository contains everything you need to build a container image for use with Google Cloud Run.</p><p>Since the repository’s last update, Wordpress has upgraded to 5.7.2, and PHP released version 8. Since I wanted to use those versions, I forked the original repository and updated it. By the time this is published, a pull request should be pending. <strong>(UPDATE: The original repository merged the changes. Yahoo!)</strong></p><p><strong><em>Update 2 (July 28, 2021): I’ve updated the fork below to use Wordpress 5.8, and I sent a pull request to Peter Kracik right after. The main repo may also utilize Wordpress 5.8 very soon</em></strong><em>.</em><strong> </strong>The fork, which I will use for contributing updates to the repository, is here:</p><p><a href="https://github.com/lawrenceaph/wp-gcloud-run.git">lawrenceaph/wp-gcloud-run</a></p><h3>Use Google Cloud Shell if you don’t want to install the gcloud command line tool locally.</h3><p>A quick way to create the container image is to use google cloud shell. Access it by clicking on the <em>Activate Cloud Shell </em>button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jm16jSQFLAQsBU3J.gif" /><figcaption>GIF courtesy of GCP</figcaption></figure><p>Clone the repository and switch to the directory it downloads to:</p><pre>git clone <a href="https://github.com/lawrenceaph/wp-gcloud-run.git">https://github.com/lawrenceaph/wp-gcloud-run.git</a><br>cd wp-gcloud-run</pre><p>Run a command to build the container and submit it to the Google Container Registry (gcr):</p><pre>gcloud builds submit -t gcr.io/&lt;project name&gt;/&lt;wpcloudrun&gt;</pre><p>Replace &lt;project name&gt; with your project name, and &lt;wpcloudrun&gt; with a container name of your choice. It will take a few minutes for the process to finish.</p><h3>Set Up the Cloud SQL server and Database</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*B58rYIx7RKLw_ZuYm7hilg.png" /><figcaption>Choose an affordable instance.</figcaption></figure><p>Create a database:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*u6HBMYW71bZiZEwcZ4X38w.png" /></figure><h3>Deploy the container 🎉</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*HGRlpicsomL1MmJrEmsfOQ.png" /><figcaption>Pick a cool name for your service.</figcaption></figure><p>Use container port 80, and reduce the maximum instances. I used five. This can be increased later if your site gets high traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*4Cj1fD48G9XSxWCCYW6A3A.png" /></figure><p>You will need to connect the container to your SQL instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*CoS2NFM8HX1NWSHQNwj0Ag.png" /></figure><p>A warning: if your SQL instance is far from your cloud run service, your site may experience extended loading times. The solution is to create an SQL instance geographically closer to the cloud run service. This was a lesson learned by Github user kientv, who was kind enough to document the issue and its solution.</p><h3>Supply environment variables.</h3><p>Go to the URL below to generate Wordpress salts. These are strings of code that will attach to passwords to increase their complexity. You will use these as environment variables.</p><pre><a href="https://api.wordpress.org/secret-key/1.1/salt/">https://api.wordpress.org/secret-key/1.1/salt/</a></pre><p>Here’s a sample of the output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2K-EywD9nXY2BMDMmyBf5g.png" /></figure><p>The full set of Environment Variables are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*6PNVKHzzTaMosuVH4S1U5A.png" /></figure><p>For the DB_HOST value, copy the SQL instance from the Overview section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*2E5WDum52qibcLx5ysk-bQ.png" /></figure><p>Add a colon and forward slash to the copied text:</p><pre>:/cloudsql/retail1-300715:asia-east1:sql1</pre><p>As an additional security measure, GCP’s Secrets Manager API can store a database password as a secret and reference it in Cloud Run as an environment variable. This is an optional step, but a good practice. When stored, secrets look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*E78ZWkp_K3K0LywCqu3IWg.png" /></figure><p>When used in Cloud Run, the secret displays its outward name but hides the sensitive data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*M9fnO_7FDrORqh-D2pXgUA.png" /><figcaption>The actual text of the secret (the password) is not seen anywhere. It is passed directly without showing up in the interface.</figcaption></figure><p>Under <strong><em>“Configure how this service is triggered”</em></strong>, select <strong><em>“Allow all traffic” </em></strong>and <strong><em>“Allow unauthenticated invocations”</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*NZlYbRjs95IkW6a45EL--w.png" /></figure><p>After deployment, a URL will become available. Click it to bring up this happy sight:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*ILe873iMGnNIlT4DJrpwTA.png" /></figure><p>Fill in the details, log-in, and navigate to the Dashboard. Visit the plugins section and look for WP-Stateless.</p><h3>Connect Wordpress to a storage service.</h3><p>Activate the WP-Stateless plugin:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*coiUc59LypNX8l1mdtwf2Q.png" /></figure><p>Follow the instructions of the plugin to fully enable it. You may opt for automatic setup (requires Google authorization), or manual setup. For those who opt for manual setup, the plugin has very clear instructions. Once connected, choose a mode (“CDN” works well for me) and upload your media the usual way.</p><h3>Enjoy your new, scalable blogging / site building solution! 🎉🎉🎉</h3><p>Congratulations! You now have a Wordpress site running as a service on Google Cloud Run. If traffic increases, Cloud Run can scale to the maximum instances specified. If traffic hits zero, Cloud Run can downscale to zero as well. Very cool.</p><p>Cost-wise, the largest expense will be the Cloud SQL database, which at lowest specs generates a 7–8 USD monthly bill. It’s not cheap, but you can use this SQL server with additional Cloud Run deployments or sites.</p><h3>Next Steps 💪</h3><p>You may wish to connect a domain, or practice updating themes, plugins, or even the Wordpress installation itself. (The container image is read-only, so updating requires new container builds).</p><p>Update plugins and themes by placing the latest versions in the app folder and triggering a new gcloud build. A revised deployment on Cloud Run with the updated image completes the upgrade. The same process works for upgrading Wordpress (but keep a copy of <em>wp-config.php </em>as it is tedious to re-type everything<em>)</em>.</p><p>You may also wish to upgrade your site into a <a href="https://web.dev/progressive-web-apps/?gclid=Cj0KCQjw16KFBhCgARIsALB0g8I52GMA6_JT5x6OoPthHapsLjtGH4tXu8Z4FHJ-M9Q5Hz26O--ie4AaAjXEEALw_wcB">Progressive Web App</a>. If you’re interested in a guide for doing that on Cloud Run, let me know in the comments. If you have a site running through this method, please post the link in the comments, as I’d love to see what you’ve built. Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2f3c58b039b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is was Like Having our Third Kid During the Pandemic]]></title>
            <link>https://medium.com/@lawrencearitao/what-is-was-like-having-our-third-kid-during-the-pandemic-53fbc289b228?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/53fbc289b228</guid>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[philippines]]></category>
            <category><![CDATA[kids]]></category>
            <category><![CDATA[childbirth]]></category>
            <category><![CDATA[family]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Sun, 04 Oct 2020 04:31:01 GMT</pubDate>
            <atom:updated>2021-06-03T13:13:21.522Z</atom:updated>
            <content:encoded><![CDATA[<h3>What it was Like Having our Third Kid During the Pandemic</h3><p>We were 100% petrified.</p><p>It was April, 2020. People near and far were dying. The virus was spreading mercilessly. The vaccine race had barely begun, and the global understanding of COVID19 was infantile.</p><p>The Philippine lockdown caused all kinds of fears. People worried about food security, potential unrest, broken supply chains, overflowing hospitals. And the birth was just weeks away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KJJViL_I4wj7apizEFgMdQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@lawaritao?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Lawrence Aritao</a> on <a href="https://unsplash.com/@lawaritao?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Our preferred hospital (TMC Pasig, where our first two kids were born) was one of the top centers with critical care maxed out for COVID19 patients.</p><p>Some friends cautioned us to be ready in case Carla had to deliver Kid #3 at home. We couldn’t imagine that. All of Carla’s pregnancies were sensitive. For this one, the gestational hypertension and diabetes were solid concerns.</p><p>As the day approached, we tried to make plans, flowcharts, and fallback scenarios. We looked at every permutation. Carla concluded that she would need to do the birth unassisted (i.e., without me). We knew she was right. I had to stay with the two kids while she went through the process. There was no way to get help to watch the kids without risking exposure.</p><p>We had a couple of false starts- visits to TMC where we felt it was time. On the third drop-off, Carla messaged me, <strong>“Checking in and heading to pre-labor.”</strong> The day had come. The kids and I said a prayer, and drove home.</p><p>For Raf and Hannah, who barely knew any time away from mommy, the process was heartbreaking.</p><h4>Night 1</h4><p>There were tears. The kids blew kisses toward TMC- visible from our window. They wrote love letters to mom. We heard nothing until the next day. It was sixteen hours of labor, but they made it through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MLxrlnqvDO8bUfsZjbClDw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@lawaritao?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Lawrence Aritao</a> on <a href="https://unsplash.com/s/photos/pasig?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Night 2</h4><p>More tears, more love letters, more kisses blown to TMC. Hannah woke up in the middle of the night, ran to the living room and cried, “Mommy if you can hear me, I miss you!”</p><h4>Night 3</h4><p>The last night of the wait. Tears, kisses, letters, hugs among the three of us, and more tears. They pasted their love letters on the window facing TMC, hoping mom would magically be able to see them.</p><h4>Day 4</h4><p>Carla paid the hospital and readied to head home. By her account, the hospital had an excellent system, completely isolating the staff and sections for childbirth. Nurses were kindhearted and ever-attentive, doctors compassionate and courageous.</p><p>Before noon, we picked Carla and Julia up at TMC, and drove home as a grateful family of 5.</p><h3>***</h3><p><em>Carla talks more about the experience on her IG, including what it was like in the hospital, and what other expecting moms can do to be prepared. She tells it best:</em></p><p><a href="https://www.instagram.com/tv/CF3PcsKhq4d/?utm_source=ig_web_copy_link">https://www.instagram.com/tv/CF3PcsKhq4d/?utm_source=ig_web_copy_link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53fbc289b228" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Home Within]]></title>
            <link>https://medium.com/@lawrencearitao/the-home-within-3288b895f8be?source=rss-6a932e2f7e1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3288b895f8be</guid>
            <category><![CDATA[love]]></category>
            <category><![CDATA[creativity]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[humanity]]></category>
            <category><![CDATA[poetry]]></category>
            <dc:creator><![CDATA[Lawrence Aritao]]></dc:creator>
            <pubDate>Wed, 29 May 2019 12:20:00 GMT</pubDate>
            <atom:updated>2019-05-29T12:20:00.122Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_UsVWcZhckrIyvV02gSkzQ.jpeg" /><figcaption>The Ivatan. Author’s Photograph</figcaption></figure><p>Truth outruns<br>meter and measure.<br>Cleverness robs<br>human treasure;<br>We must hence<br>Escape our eloquence.</p><p>Instead:<br>Hear the music of being. <br>Joy animating<br>statuesque minds, <br>as we walk back <br>to our truest selves, defined<br>by what we <br>cannot leave behind.</p><p>The part of you <br>closer and deeper:<br>Deeper than wisdom,<br>Simpler, more tender,<br>warmth and whisper,<br>Together.</p><p>Just us:<br>Breath and touch <br>And nothing <br>in between.<br>No anguish unseen,<br>Home, within.</p><p>And home we take <br>everywhere we go.<br>A home, we make <br>In the spaces <br>Truth lives:<br>exiled, unyielding<br>Compassion composing <br>the tune <br>of a world<br>where the other,<br>the stranger <br>becomes <br>Blood and Bone,<br>as chests of stone,<br>Our very own,<br>Breathe in and <br>Breathe out <br>The love we<br>cannot live without.</p><p>This forward step,<br>courage. <br>A silencing of <br>Hurtful things<br>Said<br>and instead <br>Breathing out<br>And breathing in,<br>A song of home within,<br>Of light that shined<br>And love defined<br>by those we would not<br>leave behind.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3288b895f8be" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>