<?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 Robert Brisita on Medium]]></title>
        <description><![CDATA[Stories by Robert Brisita on Medium]]></description>
        <link>https://medium.com/@rbrisita?source=rss-a5a6907ab1ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Nem8Fpm252HAz00dwEmYlg.png</url>
            <title>Stories by Robert Brisita on Medium</title>
            <link>https://medium.com/@rbrisita?source=rss-a5a6907ab1ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:33:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rbrisita/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[Jupyter Notebooks with PyTorch and CUDA in WSL]]></title>
            <link>https://rbrisita.medium.com/jupyter-notebooks-with-pytorch-and-nvidia-gpu-in-wsl-ca4a00676b7f?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca4a00676b7f</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cuda]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Tue, 27 Aug 2024 12:01:41 GMT</pubDate>
            <atom:updated>2024-09-05T21:57:57.019Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CHWdUNWLF6OnULugZWNmTg.png" /><figcaption>Created by DALL-E 3</figcaption></figure><p>Locally set up Jupyter Lab with PyTorch using an available Nvidia GPU and CUDA on <strong>Ubuntu v20.04</strong> in WSL2.</p><h4>Table of Contents</h4><ol><li><a href="#1330">Preparing</a></li><li><a href="#edd0">Creating</a></li><li><a href="#e0d9">Testing</a></li><li><a href="#26cf">Troubleshooting</a></li><li><a href="#78c4">Summary</a></li></ol><h4>Preparing</h4><p>Describes the prerequisites needed for the <a href="#edd0">Creating</a> section. The approach here is to separate system-wide tools from local project packages.</p><ol><li>Install <a href="https://github.com/pyenv/pyenv">pyenv</a></li></ol><ul><li><a href="https://github.com/pyenv/pyenv-installer?tab=readme-ov-file#install">Automatic installer</a> suggested</li></ul><pre>curl https://pyenv.run | bash</pre><ul><li>Setup <a href="https://github.com/pyenv/pyenv?tab=readme-ov-file#set-up-your-shell-environment-for-pyenv">shell environment</a></li></ul><p>2. Install Python <a href="https://github.com/pyenv/pyenv/wiki#suggested-build-environment">Dependencies</a></p><pre>sudo apt update<br>sudo apt install build-essential libssl-dev zlib1g-dev \<br>libbz2-dev libreadline-dev libsqlite3-dev curl git \<br>libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev</pre><p>3. Install Python</p><pre>pyenv install 3.10<br>pyenv global 3.10</pre><p>4. Install <a href="https://github.com/pypa/pipx">pipx</a></p><pre>pip install pipx</pre><ul><li>Setup <a href="https://github.com/pypa/pipx?tab=readme-ov-file#shell-completions">shell completions</a></li></ul><p>5. Install <a href="https://python-poetry.org/docs/#installing-with-pipx">poetry</a></p><pre>pipx install poetry</pre><ul><li>Setup <a href="https://python-poetry.org/docs/#enable-tab-completion-for-bash-fish-or-zsh">shell completions</a></li></ul><p>6. Install <a href="https://jupyter.org/">jupyterlab</a></p><pre>pipx install jupyterlab</pre><h4>Creating</h4><p>Create a Jupyter Lab kernel that uses a Nvidia GPU. Uses system-wide tools to create a local project with locally installed packages.</p><ol><li>Create <a href="https://python-poetry.org/docs/basic-usage/">Project</a></li></ol><pre>pyenv local 3.10<br>poetry create nvidia_gpu<br>cd nvidia_gpu</pre><p>2. Add <a href="https://python-poetry.org/docs/repositories/">Source</a></p><pre>poetry env use 3.10<br>poetry source add --priority=explicit pytorch-cu121 https://download.pytorch.org/whl/cu121</pre><p>3. Add <a href="https://pytorch.org/get-started/locally/#start-locally">Packages</a></p><pre>poetry add --source pytorch-cu121 torch torchvision torchaudio</pre><p>4. Add <a href="https://ipython.readthedocs.io/en/latest/install/kernel_install.html">Jupyter Kernel</a></p><pre>poetry add ipykernel<br>poetry shell<br>python -m ipykernel install --user --name nvidia_gpu-py3.10 --display-name &quot;Python (Nvidia GPU)&quot;<br>exit</pre><h4>Testing</h4><p>Test out the installation and creation of the kernel in Jupyter Lab.</p><ol><li>Test <a href="https://gist.github.com/IDDT/e18b819b95ad2c2c6906da2dfe6ad041">CUDA</a></li></ol><pre>jupyter-lab --no-browser</pre><ul><li>Select “Python (Nvidia GPU)” kernel</li></ul><pre>import torch<br><br>print(&#39;CUDA available&#39;, torch.cuda.is_available())<br>print(&#39;CUDA version&#39;, torch.version.cuda)<br>print(&#39;cuDNN enabled&#39;, torch.backends.cudnn.enabled)<br>print(&#39;cuDNN version&#39;, torch.backends.cudnn.version())<br><br>n_cuda_devices = torch.cuda.device_count()<br>for i in range(n_cuda_devices):<br>  print(f&#39;Device {i} name:&#39;, torch.cuda.get_device_name(i))</pre><p>Using PyTorch source wheels, cu121, includes the needed CUDA and cuDNN drivers. The above code should display availability, version, and the Nvidia GPU device name.</p><p>2. Test Notebooks</p><p>Navigate to a preexisting notebook (.ipynb) and execute Jupyter Lab.</p><pre>jupyter-lab --no-browser</pre><p>Selecting the “Python (Nvidia GPU)” kernel will allow usage of the Nvidia GPU in that notebook.</p><h4>Troubleshooting</h4><ul><li>The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY &lt;HASH&gt;</li></ul><pre>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys &lt;HASH&gt;</pre><ul><li>cpu = _conversion_method_template(device=torch.device(“cpu”))</li></ul><pre>poetry add numpy==1.26.4</pre><ul><li>Error: Cannot find module ‘worker_threads’</li></ul><pre>nvm use 16</pre><p>This error might show up when executing jupyter-lab with a node version &lt; 16. The tool <a href="https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating">nvm</a> is best to manage versions.</p><h4>Summary</h4><p>Hopefully this guide helped in creating a workflow that allows the usage of Nvidia GPU resources. <a href="https://rocm.docs.amd.com/en/latest/">AMD</a> GPUs and <a href="https://github.com/intel/intel-extension-for-pytorch">Intel</a> <a href="https://pytorch.org/docs/stable/notes/get_start_xpu.html">XPUs</a> could also be used. Finally, multiple kernels could be created with specific packages to allow access in notebooks without the need of using !pip install. Creating descriptive kernel names is recommended.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca4a00676b7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Year of the Rabbit…?]]></title>
            <link>https://rbrisita.medium.com/the-year-of-the-rabbit-61b591d2fe96?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/61b591d2fe96</guid>
            <category><![CDATA[rabbit-r1]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[personal]]></category>
            <category><![CDATA[assistant]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Thu, 25 Apr 2024 23:47:19 GMT</pubDate>
            <atom:updated>2024-04-25T23:47:19.140Z</atom:updated>
            <content:encoded><![CDATA[<p>Initial thoughts of an Early Adopter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vqpOjS09qaEW71g0Ls_X1Q.png" /><figcaption>Rabbit Mascot</figcaption></figure><p>The first release of the <a href="http://rabbit.tech/">rabbit r1</a> just happened two days ago on Tuesday night, 2024–04–23, at the TWA Hotel at Terminal 5 in the JFK airport. Great event overall, decor, lighting, drinks and appetizers, goody bag handouts, all hosting a lot of varied people. A live demo was presented, followed by the distribution of the r1 devices to the audience in an orderly manner on a conveyer belt.</p><p>First impression… good secure packaging, with nice case design. The device itself feels good in the hand with a good weight to it. Some devices weren’t fully charged, luckily the one I had was. A long press on the push-to-talk button and the device comes alive. Exciting to say the least, actually holding the device seeing the cute mascot animation… but then this is were all my assumptions started to be proven wrong. Connecting to Wi-Fi already showed that the analog scroll wheel feels slow; Let me change that in the settings; Nope, no setting for it. Okay, let me jump into the terminal and change the configuration; Nope, the terminal is just a text chat UI with the AI. Jumped on an audience’s member Wi-Fi to be presented with a notice that the device has to be plugged in. Without the update, the device can’t be used; Fair, I’ll just wait to get home. I believe, this limitation and the device not supporting Wi-Fi captive portals is why ~75% of the audience left after receiving their devices.</p><p>The next day, the device is all charged up and updated. Again, excited to chat and train my device to be my personal assistant and introduce it into my work flow. I notice the time is wrong, three hours off:</p><blockquote>“Please, update your time to Eastern Time.”</blockquote><blockquote>“I cannot manually change the time zone of the device. The device’s time zone it set automatically.”</blockquote><p>No setting for it either. Even though sometimes the device will hallucinate and direct you to do it yourself; No thank you. I could go on and on about the various failed attempts but it seems adjusting itself to its owner’s preferences was an oversight. As well as the touch screen when navigating the setting menu.</p><p>Let’s move on to taking notes, making lists, etc…</p><blockquote>“List 5 movies similar to Her and email me them.”</blockquote><blockquote>“… Apologies, the function to send items via email is currently unavailable.”</blockquote><p>All these issues and more have been brought up in <a href="https://discord.com/channels/1185274945786359889/1232359595754786896">Discord</a>. Very active at the moment, as you can imagine. The team is responding quickly to issues and that is a great sign.</p><h3>Following the White Rabbit</h3><p>The device’s quality, quick responsiveness, pleasant haptic feedback when typing, and the ability to search in its current form are positive aspects. The inclusion of Perplexity AI adds value that justifies the cost of the device. As it stands now, I am not impressed with its functionality but will continue to support the team and hope future over-the-air updates (OTAs) will fix current issues and add new features. This device has the ability to enhance computer literacy across various segments of society, especially people with disabilities and seniors.</p><p>I personally feel the device is too restricted and should be opened up more. As a veteran programmer, my eyes lit up when I heard there was a terminal option but was disappointed to what I found; No commands to run on the system. The “connections” section of the “rabbithole” portal is slim pickings as I only use Uber from the services offered and rarely at that. This is a great opportunity to open this up to developers to add reviewed services that others would want to use. Let’s at least hope for a services store in the very near future.</p><p>Here is to the rabbit team for throwing a great event and getting this device into the hands of early adopters. I’m looking forward to seeing this device evolve into a personal assistant.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61b591d2fe96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Rise of the Pixel Pushers]]></title>
            <link>https://rbrisita.medium.com/the-rise-of-the-pixel-pushers-f909a859daaf?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/f909a859daaf</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[art]]></category>
            <category><![CDATA[creativity]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Wed, 07 Apr 2021 17:30:17 GMT</pubDate>
            <atom:updated>2021-04-07T17:30:17.566Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Digitized image of zombies hands raising from dirt." src="https://cdn-images-1.medium.com/max/852/1*sxIv9p2Ug3INJAHY1FVFbw.jpeg" /><figcaption>Credit: <a href="https://www.shutterstock.com/video/clip-10765172-rise-deadthe-zombies-rising-their-graves-dark">Hartmut Witte</a>/Shutterstock.com</figcaption></figure><p>Where does value come from? Is it inherent to a tangible object? Is it in the manufacturing; the advertising behind it? Whatever you believe, it all comes down to effort, the effort put in by someone to create something. The input and output of human creativity. This article explores effort in the digital art space and the role of Non-Fungible Tokens (NFTs).</p><blockquote>What’s an NFT? In short, it is an immutable unique verifiable digital object within the system it was created on. Think of it as a “Contract of Support” or a “Contract of Appreciation” as encouragement for the creator and to give provenance to their digital work.</blockquote><h3>Digital Dadaism</h3><p>Digital assets have been around in many forms: authenticity certificates, ringtones, music, audiobooks, video, Downloadable Content (DLC), and now NFTs. The population’s underlying motivation is the insatiable need for some to collect and for others to customize. In the past month, there have been several high-profile, high-priced NFT sales. Although framed in USD currency, these were actually paid in Ether (ETH). In the last five years, the USD value of Ether ranged from $10 to $2k USD.</p><h4>Who Wants to Be a Pixelaire!?</h4><figure><img alt="Image showing three NFTs bought for a total of $92.5 million USD when 1 ETH was $2k USD." src="https://cdn-images-1.medium.com/max/1024/1*LiCJq2ZxYzVA_cuFWy2Kvg.jpeg" /><figcaption>Pricey Pixels — Three images (the third being a 1x1 transparent pixel) totaling ~46,255 ETH ($462K — $92.5m USD)</figcaption></figure><p>What follows is a break down of three sales using input and output, the aforementioned USD range, and the ‘Price per Pixel’ (PPP) for each of the images above:</p><pre><a href="https://twitter.com/beeple">Beeple</a> — <a href="https://onlineonly.christies.com/s/first-open-beeple/beeple-b-1981-1/112924">Everydays: The First 5000 Days</a><br>Input: 2007–05–01 to 2021–01–07 (13.8 years)<br>Output: <a href="https://ipfsgateway.makersplace.com/ipfs/QmXkxpwAHCtDXbbZHUwqtFucG1RMS6T87vi1CdvadfL7qA">21kx21k JPEG</a><br>Value: ~42k ETH ($420k — $85m USD)<br>Sale Date: 2021–03–11 (~$69m USD) to <a href="https://twitter.com/metakovan">MetaKovan</a><br>PPP: 0.00009 ETH ($0.0009 — $0.18 USD)</pre><pre><a href="https://twitter.com/larvalabs?lang=en">Larva Labs</a> — <a href="https://www.larvalabs.com/cryptopunks">CryptoPunks</a><br>Input: 2017–06–01 to 2017–07–01 (1 month)<br>Output: Total: <a href="https://github.com/larvalabs/cryptopunks/blob/master/punks.png">2400x2400 PNG</a><br>        Single: <a href="https://www.larvalabs.com/cryptopunks/details/7804">#7804 24x24 PNG</a><br>Value: 4.2k ETH ($42k — $8.4m USD)<br>Sale Date: 2021–03–11 (~$7.57m USD) to <a href="https://twitter.com/peruggia_v">Peruggia</a><br>PPP: 7.3 ETH ($73 — $14,600 USD)</pre><pre><a href="https://twitter.com/muratpak">Pak </a>— <a href="https://superrare.co/artwork-v2/alpha-7713">Alpha</a><br>Input: 2020–02–05 (1 Day)<br>Output: <a href="https://ipfs.pixura.io/ipfs/Qmd5sLrfGWWa5uCeApKn4b29meV1CngXgDi8QBKT1qfpYq">1x1 PNG</a><br>Value: 55.555 ETH ($555 — $111.11k USD)<br>Sale Date: 2020–07–23 (~$15k USD) to <a href="https://www.museumofcryptoart.com/">MoCA</a><br>PPP: 55.555 ETH ($555 — $111.11k USD)</pre><h4>Intellectual Pixel</h4><p>The commonalities here are that all the participants have a particular interest in the currency used and its supporting system. Cryptocurrency enthusiasts that want to prop up new markets dependent on the network they have a stake in. Most interesting is the <a href="https://medium.com/metapurse/b-20-tokenomics-keeping-it-simple-891596663609">Beeple and Metakovan sale</a> where they are both business partners (2% or 200k tokens and 59% or 5.9m tokens respectively) in a company that sells tokens against Beeple’s art for its open art project. Conflict of interest? Collusion? Christie’s doesn’t mind with their $9m USD payout.</p><p>What was actually bought? Artwork? Token? <a href="https://blog.erratasec.com/2021/03/deconstructing-that-69million-nft.html">Technically</a>, it’s a link to data representing the NFT. Some NFT projects do this better than others. For instance, CryptoPunks is an index into an address array and all data that is unique is kept off-chain in centralized servers. <a href="https://www.cryptokitties.co/">CryptoKitties</a> on the other hand actually contain unique data in their NFTs and adds gamification to their contract. There are other platforms allowing for further creativity like <a href="https://async.art/">Async.art</a> and their programmable art approach. In terms of the data (metadata) being pointed to, the best approach has been decentralized file storage, the most popular being InterPlanetary File System (<a href="https://en.wikipedia.org/wiki/InterPlanetary_File_System">IPFS</a>). This technology takes into account the content rather than the location or the name of a file. The format of the metadata files has not been standardized.</p><p>Unfortunately, the majority of marketplaces and platforms all use the <a href="https://en.wikipedia.org/wiki/Ethereum">Ethereum</a> network. It’s currently a wasteful and costly legacy decentralized blockchain that could very well be a base level layer-1 network but that <a href="https://ethereum.org/en/eth2/">remains to be seen</a>. Technology evolves at a fast pace and it is hard to believe major changes in scalability, security, and sustainability can be done in a reasonable time without incidents.</p><p>The waste is in its inefficiency using Proof of Work (<a href="https://en.wikipedia.org/wiki/Proof_of_work">PoW</a>) to provide a secure state to all involved. The tradeoff is security over availability. The most basic analogy is to imagine if participants A and B own an acre of forest and they are both presented with a business opportunity rewarding the first to cut down 100 trees. Let’s say A reaches the goal and wins the business contract, B throws away all their 99 cut trees and the competition begins again anew.</p><p>Costly, not only <a href="https://medium.com/@memoakten/the-unreasonable-ecological-cost-of-cryptoart-2221d3eb2053?source=linkShare-a5a6907ab1ff-1617219030">environmentally</a> but also because of the procedure of the transactions. Even before a sale is made a creator is already paying to mint the NFT on the Ethereum network. At recent USD prices and the extra fees of some platforms and marketplaces that range is <a href="https://www.supercryptonews.com/how-much-does-it-cost-to-mint-an-nft/">$100-$600 USD</a>. Any owner of a future contract has to take into account those fees before supporting a creator. Even before that can be done both the creator and their supporters have to go through a process of wallet creation and obtaining the cryptocurrency with a user interface (<a href="https://en.m.wikipedia.org/wiki/User_interface">UI</a>) that leaves much to be desired.</p><p>Of course, when selling an NFT at high ETH prices (thousands and millions of USD) that cost is insignificant. As a new creator it’s a huge barrier to entry. It’s ridiculous that it’s even recommended to wait for the right time of day so that transaction fees are lower. Current popular curation platforms and marketplaces have become invite-only to subdue the flood of people trying to capitalize on the hype amplified by bots and flippers. Leaderboards amplify top creator sales through positive feedback loops. This creates further barriers to entry for legitimate creators.</p><h3>Virtual Symbiosis</h3><p>Let’s move away from the spectacle and focus on the positive. Output data is visible and the underlying technology is invisible. What’s great about the modern blockchain space, and the beauty of decentralization is that none are beholden to any particular technology; especially with no stake in it. Using the most popular blockchain is only really supporting that technology and not the efforts to support creators. It is fascinating seeing enthusiasts hold on to older inadequate technology because of special interests. Technology prioritizes individual sovereignty over centralized control and interest.</p><p>There are already implementations of better low-cost and eco-friendly technologies. <a href="https://en.wikipedia.org/wiki/EOS.IO">EOS</a> and the <a href="https://on.wax.io/wax-io/">Wax</a> sidechain are already available. <a href="https://en.wikipedia.org/wiki/Polkadot_(cryptocurrency)">Polkadot</a> and <a href="https://near.org/">NEAR</a> are being tested for releases that lean more on decentralization than EOS does. Wax labels itself as the “King of NFTs” and targets video games and entertainment properties. <a href="https://wax.atomichub.io/">AtomicHub</a> uses Wax and allows finer controls in the construction of NFTs. It’s more effort than some platforms and marketplaces but it has the ability for single and multiple creators. Multiple creators could act as a collective that can be hosted on a portfolio or a series of portfolios creating a <a href="https://en.wikipedia.org/wiki/Webring">webring</a>. When a sale is made, 2% is collected for platform commission fees; a very different approach than what was seen before.</p><p>There is no getting around needing to create a wallet and to obtain the respective cryptocurrency. But 2–3 clicks is better than navigating around different sites to set up to create or support. If Ethereum ever gets its act together there are bridges in all these implementations that allow transferring from one blockchain to another.</p><p>It’s becoming obvious that the browser is the primary viewer into the digital world and supporting that attention would benefit browser creators. <a href="https://brave.com/">Brave</a> is the only browser positioned to possibly become the default gateway for individuals to interact with cryptocurrency without the friction previously mentioned. Imagine creators using attributes on semantic tags to allow patronage and buying of certain data? This would bypass sites that use a virtual currency to visualize appreciation that can not be exchanged for monetary value. The preferred end result is a micro-transaction system that cryptocurrency can support if done correctly. This opens the door to creators who create value on a platform and receive benefit from that mutual relationship.</p><h4>Scarcity is a Lie</h4><p>In established tangible markets, the term ‘scarcity’ is used to denote value. Further value comes from the owner protecting that scarce resource. Tangible collectors can buy, sell, and trade but not copy. Digital removes all that and keeps the effort to produce. Traditional market ideologies do not apply in virtual space. Only through artificial means can the term ‘scarcity’ exist in digital. Scarcity in technological terms means unpopular and outdated. This is the democratization of the markets that the general population have trouble wrapping its head around. New systems need new terminology. A new perspective with a society approaching concepts differently. <a href="https://en.wikipedia.org/wiki/Geneva_Freeport">No more warehouses on ports selfishly housing a total of $100b USD collections for tax purposes.</a></p><h4>Plurality is Prestige</h4><p>Technology allows the propagation of information. Perfect copies that transfer without any restrictions. Not a single copy but as many copies as needed by anyone who cares to duplicate it. Value is determined by the number of holders of the content rather than a one-of-a-kind owner. No more power dynamics of limiting access. The output from one can be enjoyed by all. Think of it as free advertising; digital word of mouth. A true mental shift where popularity conveys value in society.</p><h3>Dismantling Institutions</h3><p><a href="https://link.springer.com/article/10.1007/s10824-020-09403-2">Auction houses</a> show that 96.1% of sales are from male creatives. There are no women in the top 40 highest-selling artists. <a href="https://news.artnet.com/art-world/new-york-galleries-study-979049">Creatives in top NYC galleries are 80% white.</a> Statistically, there is very little chance for a creative to succeed because of a combination of factors that are outside of their control.</p><h4>Secondary Markets</h4><p>Most creatives make a living by doing client work. Now through NFTs they have direct access to supporters. In conventional markets, these creatives usually only receive compensation from the initial sale while a supporter has the ability to resell the creative’s output usually at a much higher value. NFTs allow creatives to be compensated in secondary markets. Currently, platforms and marketplaces have a range of 5–15% in royalties but the real power lies in the creative community; demanding sustainable and transparent platforms where creatives get the majority of the sale and supporters get 5–15% in royalties are well within their power.</p><p>There is a chance here for creatives to come together and stand up for their convictions to make this opportunity more equitable. As mentioned before the overall goal should be to bring about a micro-transactions system that supports creatives. The focus of this article was on digital art but this applies to all creative endeavors: cultural creatives, fashion, jewelry, music, etc. What a beautiful story it will be if it is creatives that free us from institutions, corporations, and corruption.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f909a859daaf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creators vs Consumers]]></title>
            <link>https://rbrisita.medium.com/creators-vs-consumers-99395cde96c0?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/99395cde96c0</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[twitter]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[apps]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Thu, 25 Jul 2019 20:44:00 GMT</pubDate>
            <atom:updated>2019-07-25T21:57:30.670Z</atom:updated>
            <content:encoded><![CDATA[<p>or: How not everyone can be a creator but definitely can be a consumer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*4SzuLKFt1oMqJo1hBncSBg.png" /></figure><p>Social networking sites thrive on user-generated content (UGC). Content created when someone posts an update, picture, article, etc. At the early stages of the service the site’s main objective is user acquisition. These early users are content creators whose intrinsic motivation is to partake in the social media platform in some way. The cost is very little for this social incentive that gives rise to vital growth for the company.</p><p>As the site matures, top contributors and influencers emerge through the accumulation of users. A plateau forms as the majority of content creators have been attracted and user acquisition slows. The next phase of evolution in scaling the community is to start opening the content stream to non-users and start creating content consumers. Sort of like a broadcast model, similar to how one turns on a tv or radio and receives content without much effort. Let’s review some main pages of past and present UGC sites:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*n3vxqN7brQSE7jkyDHZizw.png" /><figcaption>Vine, YouTube, Periscope, and Medium</figcaption></figure><p>Good examples of exposing content for consumption can be seen from sites like Vine (retired), YouTube, Periscope, and Medium. The similarities that they share are content search and offering categories/channels for visitors to consume.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*IfLoMzS_4TE93daDHwAIpA.png" /><figcaption>Tumblr and TikTok</figcaption></figure><p>In comparison with Tumblr and TikTok, these sites make signing up/downloading more prominent but offer the visitor to consume trending content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*34mVuGa1SRfIIfRKkrQ93g.png" /><figcaption>Instagram, Pinterest, and Twitter</figcaption></figure><p>Finally, the main emphasis for Instagram, Pinterest, and Twitter are user sign up/log in with little or no exposure of what these sites have to offer to a visitor. Let’s tune into Twitter a bit, recently they launched a redesign of their website but surprisingly, their main page stayed the same. Some of the highlights of the redesign, was exposing lists and bookmarks as primary features to users. Lists can be great way for visitors to consume Twitter content without having to sign in or sign up.</p><p>To explore this more I present <a href="https://twists.herokuapp.com/">Twists</a> (Twitter + Lists) as an approach that can be implemented on Twitter’s main page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*_KYMuAtS9aK2YaoaL3T6Wg.gif" /><figcaption>Twists: Popular Twitter Lists</figcaption></figure><blockquote>What’s a Twist? It’s a portmanteau; combining Twitter and List. Twists makes it easier to consume popular lists on Twitter without having to sign up or sign in. So, choose your favorite topics and enjoy!</blockquote><p>Lists were collected and collated under topics so a visitor may choose what interests them and start consuming Twitter’s UGC. Twists’ main goals were to:</p><ol><li>Reduce friction by removing the service’s audience gatekeeper (sign up/log in) and greet visitors with top content that should be easy to consume.</li><li>Encourage visitor engagement and the likeliness that they will share content.</li></ol><p>Twitter’s approach could be this and more. For instance, allowing visitors to follow users and create their own lists without ever needing to sign up can be done by saving all their choices locally. A call to action can be shown to tell the visitor what they are missing out on (commenting, liking, shared data with devices and browsers, etc.) if they don’t sign up. Another benefit of this approach is for privacy minded visitors that would allow them to consume content under anonymity.</p><p>Anyway, take <a href="https://twists.herokuapp.com/">Twists</a> for a drive. Add it to your ‘Home Screen’ if you are so inclined. If you genuinely find it useful and would like to support it, please head over to <a href="https://www.patreon.com/twists">Patreon</a>. It is far from perfect but feel free to suggest topics or lists <a href="https://twitter.com/twists_app">@twists_app</a> or email: twists.web.app@gmail.com. I would love to hear what you think!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99395cde96c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Laravel and Angular: Automated]]></title>
            <link>https://rbrisita.medium.com/laravel-and-angular-automated-800f342ab3cf?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/800f342ab3cf</guid>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Tue, 23 Apr 2019 02:35:53 GMT</pubDate>
            <atom:updated>2019-04-23T02:35:53.672Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*TJM3DO89TqC8kaGhQbG-bw.png" /></figure><p>Most tutorials that mention Laravel and Angular create two separate projects: one for the frontend and one for the backend; this leaves more to manage and adding an extra composer dependency to handle the <a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing">CORS</a> issue. The purpose of this article is to show how to integrate Angular into a new Laravel project using <a href="https://laravel-mix.com/">Laravel Mix</a>. Each version of Angular has particular dependencies and because of how npm works it can be a hassle getting it all right. What will be shown is what gets deleted, changed, and created. This article was possible using these articles:</p><ul><li><a href="https://blog.angularindepth.com/setting-up-angular-from-scratch-1f518c65d8ab">Setting Up Angular from Scratch</a></li><li><a href="https://medium.com/thedevguide/laravel-5-4-and-angular-5-integration-with-laravel-mix-d21b09101759">Laravel 5.4 and Angular 5 integration with Laravel Mix</a></li></ul><h4>TL;DR</h4><p>The script below takes care of the dependencies depending on which Angular version chosen. Versions 4–7 have been tested in Laravel versions 5.4–5.8. The script should only be run on a new Laravel project as files get deleted and rewritten.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/59b47f2d47c387c72267c611c5bb0544/href">https://medium.com/media/59b47f2d47c387c72267c611c5bb0544/href</a></iframe><h3>Breakdown</h3><h4>Deleted Files</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*FWCkqFXo40AWuv9YiOwuDQ.png" /><figcaption>Deleting JS, Sass, and CSS files.</figcaption></figure><p>All JS and Sass files and their processed output are deleted.</p><h4>Changed Files</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*0lPDMABWoJJJscyniB79wA.png" /><figcaption>Changing package.json.</figcaption></figure><p>The purpose is to show Angular working without any other noise; unneeded JS dependencies are removed as well as Bootstrap and Sass.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*EJ5FWydxvT5m5nLl-ka_jA.png" /><figcaption>package.json for Laravel v5.5.45 with Angular v7.2.13.</figcaption></figure><p>The added packages are the bare essentials for Angular to work with Laravel Mix. Node package installs are found between lines 90 through 114 of the installation script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*zNDEq5f5mhuQIRoIge1ywA.png" /><figcaption>webpack.mix.js</figcaption></figure><p>Introduce TypeScript files and require a webpack custom config.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*0pMBZFATyZzWGCC4eTV8Fg.png" /><figcaption>resources/views/welcome.blade.php</figcaption></figure><p>Modify ‘welcome.blade.php’ to load generated JS files and use a custom element for Angular application entry.</p><h4>Created Files</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*WTCCFyxDCkPjhK5nI6Gc3w.png" /><figcaption>webpack-custom.mix.js</figcaption></figure><p>Create a custom config that links the ‘.ts’ extension to the ‘ts-loader’ module to process TypeScript files. The ‘plugins’ portion shown resolves to a certain folder (CORE_FOLDER) depending on the Angular version being installed (lines 222–232 of installation script).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*pmI4l6gSXo_7OO87oMEO6A.png" /><figcaption>tsconfig.json</figcaption></figure><p>Configure TypeScript and exclude folders from package managers.</p><p>The rest of the files are example TypeScript files using Angular components and modules. Where they reside depends on the Laravel version being used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*B3ONyOQpMO7ex5FRkv0gHA.png" /><figcaption>resources/[assets/]/ts/components/app.component.ts</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*0j2yxbTmtEmE7CCwmi8GLQ.png" /><figcaption>resources/[assets/]/ts/components/app.module.ts</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*OmbIcdmuO3E4U8sCKKOCjA.png" /><figcaption>resources/[assets/]/ts/main.ts</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*-CnFJ0VvsSttIP7OFFZXNA.png" /><figcaption>resources/[assets/]/ts/vendor.ts</figcaption></figure><h4>Test Install</h4><p>After all files have been properly managed and in their place, the installation can be tested by running:</p><p>npm run dev &amp;&amp; php artisan serve</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*lOEbRHpz70tbQr1yMO915A.png" /><figcaption>Laravel’s Artisan serving generated and templated files.</figcaption></figure><h3>Conclusion</h3><p>What has been described in this article were the modifications that need to happen in a new Laravel project to activate Angular as the project’s frontend. Because of simplicity of the TypeScript files used, one can see how they relate starting from ‘webpack.mix.js’ file. Following any tutorial on Angular development should prove successful from here on out. Otherwise for further development, add other packages using npm and add them to their respective places: vendor.ts, webpack.mix.js, etc.</p><h4>Webpack Loaders</h4><p>Any TypeScript loader can be used and/or chained to other loaders. To increase the speed of the ‘ts-loader’ check out <a href="https://medium.com/webpack/typescript-webpack-super-pursuit-mode-83cc568dea79">this</a> article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=800f342ab3cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It Takes a Hood to Raise a Bodega Cat.]]></title>
            <link>https://rbrisita.medium.com/it-takes-a-hood-to-raise-a-bodega-cat-a6eda7bcc4b4?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6eda7bcc4b4</guid>
            <category><![CDATA[social-change]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[bodegas]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[nyc]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Wed, 13 Sep 2017 22:01:00 GMT</pubDate>
            <atom:updated>2017-09-13T22:01:00.514Z</atom:updated>
            <content:encoded><![CDATA[<p>As a socially conscious tech geek, it is always interesting to see how technology evolves in our society. We have seen self-service checkouts at supermarkets. You’ll see a <a href="https://www.youtube.com/watch?v=FAMHMAUX22c">campy video about a grocery store with kiosks</a> on YouTube. Read an article a few years later about an implementation of disparate technologies creating an <a href="http://www.businessinsider.com/swedens-unmanned-convenience-store-2016-2">unmanned grocery store</a>. Then a <a href="https://twitter.com/jiserra/status/908006218295336961">tweet</a> pops up on your Twitter timeline which is analogous to over-engineering in our society and it rightly so <a href="https://www.fastcompany.com/40467412/startup-bodegas-glorified-vending-machines-are-sparking-major-twitter-backlash">receives backlash</a>.</p><p>As a Dominican-American first generation male who worked in a family owned bodega in Inwood, New York City for some years, I got to see a variety of people and their struggles as they tried to integrate with American society. I personally would translate letters and explain to people their next steps and yes, helped people with their computer problems. It wasn’t all superficial though; I have seen success and failures. I have heard of heart-warming stories as businesses and churches helped newly arrived immigrants with money, food, and jobs to get them up on their feet. The marriages, the surprise pregnancies, the fiestas, the <a href="https://en.wikipedia.org/wiki/Quincea%C3%B1era">quinceañeras</a>, the graduations, and sadly the arrests for drug sales and trafficking, and murder, and the suicides. Good or bad, I wouldn’t have had these experiences if not for working for my father at the bodega.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*hoU-YCPDgVpdbYgIMD8eww.png" /></figure><blockquote>“Real bodegas are all about human relationships within a community, having someone you know greet you and make the sandwich you like.”</blockquote><blockquote>-Frank Garcia, NY State Hispanic Chamber of Commerce</blockquote><p>The above quote from the <a href="https://www.fastcompany.com/40466047/two-ex-googlers-want-to-make-bodegas-and-mom-and-pop-corner-stores-obsolete">Fast Company</a> article is 100% right. I have come to believe that these businesses become the water coolers of the neighborhood. It seems that the start-up company, Bodega, was so interested in reducing friction and in automation that they totally disregarded the section of society they are disrupting and what it means to be a community. They are further isolating people and their surroundings at a time when understanding other people is so crucial. It is not the building, not the block, but the neighborhood. Self-sustaining resilient communities are the future and for a company like Bodega to succeed they have to account for the displacement they are creating. If they move forward as they are currently structured, they will have a <a href="https://en.wikipedia.org/wiki/The_Wal-Mart_Effect">Walmart effect</a> on the communities they are serving.</p><p>I hope they reflect on their potential impact and pivot. Why not create a service that works alongside the existing infrastructure? Bodegas as they are currently structured have three employees: the cashier, which is usually the owner or someone the owner really trusts, the stockboy / sandwich maker, and the cat aka the host. Imagine where Bodega, the start-up, installed their camera powered computer vision system in these established locations that already have a trusted clientele and augmented the owners work flow and automatically reorder popular products from local distribution centers. Logistics aside, this seems a win-win to me, keeping the community vibe and gossip, allowing for the serving of coffee, for the making of food, and most importantly for the petting of the cat. I know, I would be more inclined to visit that than a vending machine without cat. 🐱</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6eda7bcc4b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure hosting LEMP with PHP 7.1 and Laravel 5.4 — Part 3]]></title>
            <link>https://rbrisita.medium.com/azure-hosting-lemp-with-php-7-1-and-laravel-5-4-part-3-24e6e8e4fa12?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/24e6e8e4fa12</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Tue, 22 Aug 2017 17:01:00 GMT</pubDate>
            <atom:updated>2017-09-08T19:04:11.982Z</atom:updated>
            <content:encoded><![CDATA[<p>The last two articles: <a href="https://medium.com/@rbrisita/azure-hosting-lemp-with-php-7-1-and-laravel-5-4-part-1-2a1ae43c7ad5">Part 1</a> and <a href="https://medium.com/@rbrisita/azure-hosting-lemp-with-php-7-1-and-laravel-5-4-part-2-d3df1c934e69">Part 2</a>, accomplished creating an Azure virtual machine host and automatically installing a Nginx Laravel example application using a MySQL data store. This final article will add access and force redirection to HTTPS.</p><p>The following commands are being run from a Mac OS X machine and should be translatable to a Linux or Windows environment.</p><h4>CONVENTIONS</h4><p><strong>Bold</strong> text shows commands as they should be entered literally by the reader at the command prompt.</p><p><em>Italicized</em> capitalized text inside inclusive curly braces, ‘<em>{LIKE_THIS}</em>’, shows text that should be replaced with user-supplied values.</p><h3>AZURE</h3><p>To allow access to HTTPS, we first have to make port 443 (HTTPS) accessible from the Azure virtual machine host.</p><h4>HTTPS</h4><p><strong>az vm open-port --port 443 --priority 800 --resource-group </strong><em>{UNIQUE_RESOURCE-GROUP_NAME}</em><strong> --name </strong><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em></p><h4><strong>SSL</strong></h4><p>We now have to register for a certificate, authenticate and install them, and finally configure and restart Nginx. Luckily for us, this can be all automated and free because of the excellent <a href="https://certbot.eff.org/">Certbot</a> client and <a href="https://letsencrypt.org/">LetsEncrypt</a> certificates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7ergh-VFcXueWL687gpuwQ.png" /><figcaption><a href="https://certbot.eff.org/">CertBot</a></figcaption></figure><p><strong>Install Script</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a86f72e22175f7a582527e3fd4b2c4ad/href">https://medium.com/media/a86f72e22175f7a582527e3fd4b2c4ad/href</a></iframe><p>In the above script we first generate more secure <a href="https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange">Diffie-Hellman</a> parameters and set them in the Nginx configuration file. We then use CertBot with some options to help make it more non-interactive:</p><ul><li>--email To pass on recovery email.</li><li>--agree-tos To agree to the Terms of Service.</li><li>--no-eff-email To not join the <a href="https://eff.org/">EFF</a> mailing list.</li><li>--non-interactive Run without asking for user input.</li></ul><p>The next option deals with forcing the use of HTTPS:</p><ul><li>--redirect Redirect the request to HTTPS from the web server.</li></ul><p>The final option: --test-cert, is to use the LetsEncrypt staging server as there is a rate limit (at the time of writing: 5) on the number of certificates that can be created per domain. This would have to be removed when releasing to production.</p><p><strong>Copy to Local</strong></p><p><strong>curl --silent --location --output install_ssl.sh </strong><a href="https://git.io/v5Urw"><strong>https://git.io/v5Urw</strong></a><strong> &amp;&amp; chmod +x install_ssl.sh</strong></p><p><strong>Copy to Host</strong></p><p><strong>scp -pq install_ssl.sh $USER@</strong><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em><strong>.eastus.cloudapp.azure.com:~/</strong></p><p><strong>Run on Host</strong></p><p><strong>ssh -t $</strong><a href="/service/mailto:USER@aavm.eastus.cloudapp.azure.com"><strong>USER@</strong></a><a href="/service/mailto:USER@aavm.eastus.cloudapp.azure.com"><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em></a><a href="/service/mailto:USER@aavm.eastus.cloudapp.azure.com"><strong>.eastus.cloudapp.azure.com</strong></a><strong> &quot;./install_ssl.sh&quot;</strong></p><p>The above script will ask for your email address as a safety precaution for account recovery in the event of key loss or account compromise. The -t option tells ssh to allocate a terminal as the install script will be requesting input (the email) from the user. After executing on the host, view the website at:</p><p><a href="https://{unique_virtual-machine_name}.eastus.cloudapp.azure.com/"><strong>https://</strong></a><a href="https://{unique_virtual-machine_name}.eastus.cloudapp.azure.com/"><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em></a><a href="https://{unique_virtual-machine_name}.eastus.cloudapp.azure.com/"><strong>.eastus.cloudapp.azure.com</strong></a></p><p>CertBot suggests that you test the security at:</p><p><a href="https://www.ssllabs.com/ssltest/analyze.html?d="><strong>https://www.ssllabs.com/ssltest/analyze.html?d=</strong></a><a href="https://{unique_virtual-machine_name}.eastus.cloudapp.azure.com/"><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em></a><a href="https://{unique_virtual-machine_name}.eastus.cloudapp.azure.com/"><strong>.eastus.cloudapp.azure.com</strong></a></p><p>Because we added the Diffie-Hellman parameters the overall score will be an ‘A’ even though the result points out the use of a test certficate. Finally, review the configuration to see what changed:</p><p><strong>ssh $</strong><a href="/service/mailto:USER@aavm.eastus.cloudapp.azure.com"><strong>USER@</strong></a><a href="/service/mailto:USER@aavm.eastus.cloudapp.azure.com"><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em></a><a href="/service/mailto:USER@aavm.eastus.cloudapp.azure.com"><strong>.eastus.cloudapp.azure.com</strong></a><strong> &quot;cat /etc/nginx/sites-available/default&quot;</strong></p><p>This block of statements should have been added:</p><pre>ssl_dhparam /etc/ssl/certs/dhparam.pem;</pre><pre><br>listen 443 ssl; # managed by Certbot</pre><pre>ssl_certificate /etc/letsencrypt/live/<em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em>.eastus.cloudapp.azure.com/fullchain.pem; # managed by Certbot</pre><pre>ssl_certificate_key /etc/letsencrypt/live/<em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em>.eastus.cloudapp.azure.com/privkey.pem; # managed by Certbot</pre><pre>include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot</pre><pre><br>if ($scheme != &quot;https&quot;) {<br>return 301 <a href="https://$host$request_uri;/">https://$host$request_uri;</a><br>} # managed by Certbot</pre><h3>Conclusion</h3><p>In this article we have completed securing an installation of a Nginx web server using CertBot and LetsEncrypt certificates. Users can now access the example Laravel application through HTTPS and will be redirected if they try to access it using the HTTP protocol. This concludes the article series, feel free to use the mentioned scripts and modify to your desire to help automate your workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24e6e8e4fa12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure hosting LEMP with PHP 7.1 and Laravel 5.4 — Part 2]]></title>
            <link>https://rbrisita.medium.com/azure-hosting-lemp-with-php-7-1-and-laravel-5-4-part-2-d3df1c934e69?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3df1c934e69</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[laravel]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Wed, 16 Aug 2017 19:07:18 GMT</pubDate>
            <atom:updated>2017-08-23T19:17:59.412Z</atom:updated>
            <content:encoded><![CDATA[<h3>Azure hosting LEMP with PHP 7.1 and Laravel 5.4 — Part 2</h3><p>This article discusses getting the rest of the LEMP stack up and running from the command line in the Azure virtual machine host we created in <a href="https://medium.com/@rbrisita/azure-hosting-lemp-with-php-7-1-and-laravel-5-4-part-1-2a1ae43c7ad5">Part 1</a>.</p><p>The following commands are being run from a Mac OS X machine and should be translatable to a Linux or Windows environment. The installation scripts that follow have been tested on Ubuntu 16.04 LTS.</p><h4>CONVENTIONS</h4><p><strong>Bold</strong> text shows commands as they should be entered literally by the reader at the command prompt.</p><p><em>Italicized</em> capitalized text inside inclusive curly braces, ‘<em>{LIKE_THIS}</em>’, shows text that should be replaced with user-supplied values.</p><h3>LEMP</h3><p>We have our ‘L’, now let’s create the rest of the acronym.</p><h4>(E) Nginx, (M)ySQL, (P)HP with Laravel</h4><p>Before we create the rest of the stack, the Azure virtual machine host needs to be accessible to the outside world.</p><p><strong>HTTP</strong></p><p><strong>az vm open-port --port 80 --priority 900 --resource-group </strong><em>{UNIQUE_RESOURCE-GROUP_NAME}</em><strong> --name </strong><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em></p><p><strong>Install Scripts</strong></p><p>The following are three scripts that will be copied over to local, then host, and finally executed on the host:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ef03e84aee43d0e7d6f1047a16744a04/href">https://medium.com/media/ef03e84aee43d0e7d6f1047a16744a04/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa8426475593de8da0d6d18dcc15ae2b/href">https://medium.com/media/fa8426475593de8da0d6d18dcc15ae2b/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a37a25c5a3bc4c24ea720aa75864f59/href">https://medium.com/media/7a37a25c5a3bc4c24ea720aa75864f59/href</a></iframe><p>There is a lot going on in those scripts and ‘install.sh’ in particular has been commented to express what is happening.</p><blockquote>Please feel free to use the comment section to ask for further explainantion on parts of the script.</blockquote><p>Let’s move on to execute the following:</p><p><strong>Copy to Local</strong></p><p><strong>curl --silent --location --output install.sh </strong><a href="https://git.io/v7NVt"><strong>https://git.io/v7NVt</strong></a><strong> --output ni-msi.sh </strong><a href="https://git.io/v7Nwt"><strong>https://git.io/v7Nwt</strong></a><strong> --output mysql_credentials.cnf </strong><a href="https://git.io/v7NwK"><strong>https://git.io/v7NwK</strong></a><strong> &amp;&amp; chmod +x install.sh ni-msi.sh</strong></p><p><strong>Copy to Host</strong></p><p><strong>scp -pq install.sh ni-msi.sh mysql_credentials.cnf $USER@</strong><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em><strong>.eastus.cloudapp.azure.com:~/</strong></p><p>The options for secure copy (scp) are preserve file (-p) and quiet (-q).</p><p><strong>Run on Host</strong></p><p><strong>ssh $USER@</strong><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em><strong>.eastus.cloudapp.azure.com &quot;~/./install.sh&quot;</strong></p><p>The last command above will start the install process on the host and you should see output on your terminal as the lines in the script are executed. When the final command is executed, the example Laravel application should be viewable through a web browser:</p><p><a href="http://{unique_virtual-machine_name}.eastus.cloudapp.azure.com/"><strong>http://</strong></a><a href="http://{unique_virtual-machine_name}.eastus.cloudapp.azure.com/"><em>{UNIQUE_VIRTUAL-MACHINE_NAME}</em></a><a href="http://{unique_virtual-machine_name}.eastus.cloudapp.azure.com/"><strong>.eastus.cloudapp.azure.com</strong></a></p><p>At this point you can create users and log into the example application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LAU4pcN6d8AAaBC9wL2EDQ.png" /><figcaption>Laravel Example Application</figcaption></figure><h3>Conclusion</h3><p>In this article we have completed installation of a Nginx Laravel application using MySQL to store created users in a Azure virtual machine host. The final part (<a href="https://medium.com/@rbrisita/azure-hosting-lemp-with-php-7-1-and-laravel-5-4-part-3-24e6e8e4fa12">Part 3</a>) will add SSL to Nginx so that users can access the example application through HTTPS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3df1c934e69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure hosting LEMP with PHP 7.1 and Laravel 5.4 — Part 1]]></title>
            <link>https://rbrisita.medium.com/azure-hosting-lemp-with-php-7-1-and-laravel-5-4-part-1-2a1ae43c7ad5?source=rss-a5a6907ab1ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a1ae43c7ad5</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Robert Brisita]]></dc:creator>
            <pubDate>Tue, 08 Aug 2017 19:01:00 GMT</pubDate>
            <atom:updated>2017-08-17T14:12:05.045Z</atom:updated>
            <content:encoded><![CDATA[<p>This article discusses getting a Azure Linux virtual machine service up and running with various local services from the command line. A nice way to get a prototype live and running for review and not really caring about safety and scale. I hope someone finds the fruits of my labour useful.</p><p>The following commands are being run from a Mac OS X machine and should be translatable to a Linux or Windows environment. Before moving forward, create an account at <a href="https://azure.microsoft.com/en-us/free/">MS Azure</a>.</p><h4><strong>CONVENTIONS</strong></h4><p><strong>Bold</strong> text shows commands as they should be entered literally by the reader at the command prompt.</p><p><em>Italicized</em> capitalized text inside inclusive curly braces, ‘<em>{LIKE_THIS}</em>’, shows text that should be replaced with user-supplied values.</p><h3><strong>AZURE</strong></h3><h4>INSTALL</h4><p>Install <a href="https://docs.microsoft.com/en-us/cli/azure/">Azure CLI</a> (at the time of this writing it is v2.0.7) to create and manage resources in the Azure Cloud.</p><p><strong>curl -L </strong><a href="https://aka.ms/InstallAzureCli"><strong>https://aka.ms/InstallAzureCli</strong></a><strong> | bash &amp;&amp; exec -l $SHELL</strong></p><h4>LOGIN</h4><p><a href="https://aka.ms/devicelogin">Device registration</a> allows you to run commands from a device.</p><p><strong>az login</strong></p><p>The above command will wait for you to register the device you will be running commands from and output the result when the device is authenticated. You only have to do this once per device.</p><h4>CREATE</h4><p><a href="https://docs.microsoft.com/en-us/cli/azure/group">Resource Groups</a>; before a user can create any resources to use in Azure’s cloud, the user first has to create a resource group with a unique name, ‘<em>{UNIQUE_RESOURCE-GROUP_NAME}</em>’, to hold all the resources needed. It should be unique to all of Azure’s cloud. This container is used to deploy and manage created resources like virtual machines, data stores, network interfaces, and such.</p><p><strong>az group create --name </strong><em>{UNIQUE_RESOURCE-GROUP_NAME}</em><strong> --location </strong><em>{LOCATION}</em></p><p>To get a list of available locations for the user’s Azure subscription, type:</p><p><strong>az account list-locations</strong></p><p>The output by default is JSON and one can reduce the noise to values we can use on the command line by piping the output through <a href="https://stedolan.github.io/jq/">jq</a> or using the az global argument --query which expects a <a href="http://jmespath.org/">JMESPath</a> query string. For simplicity, we will output to a table format:</p><p><strong>az account list-locations --output table</strong></p><p>The ‘Name’ column values we see are ones that will replace ‘<em>{LOCATION}</em>’ in the az group create command above. We will use ‘eastus’ as our location:</p><p><strong>az group create --name </strong><em>{UNIQUE_RESOURCE-GROUP_NAME}</em><strong> --location eastus</strong></p><p>We have created our location for resources to live in and now on to the virtual machine creation to give an environment for our resources to thrive in, here is the template:</p><pre><strong>az vm create --resource-group </strong><em>{</em><em>UNIQUE_RESOURCE-GROUP_NAME}</em><strong> \</strong></pre><pre><strong>--name </strong><em>{</em><em>UNIQUE_VIRTUAL-MACHINE_NAME}</em><strong> \</strong></pre><pre><strong>--public-ip-address-dns-name </strong><em>{</em><em>UNIQUE_PUBLIC-IP_NAME}</em><strong> \</strong></pre><pre><strong>--image </strong><em>{URN-ALIAS}</em><strong> \</strong></pre><pre><strong>--size </strong><em>{SIZE_NAME}</em><strong> \</strong></pre><pre><strong>--generate-ssh-keys</strong></pre><p>For this article we are going to use an ‘UbuntuLTS’ (v16.04.2) image to replace the ‘<em>{URN_ALIAS}</em>’ argument but to get a full list of <a href="https://docs.microsoft.com/en-us/cli/azure/vm">Virtual Machine</a> <a href="https://docs.microsoft.com/en-us/cli/azure/vm/image">images</a> available, one can use the command found below. There are a few options to filter, otherwise the command with the --all option takes awhile; here we are using the --location option to filter on an offline list:</p><p><strong>az vm image list --location eastus --output table</strong></p><p>One can see the value we are using above under the ‘UrnAlias’ column. The user is also able to choose the size of their virtual machine, to get a list for that, use the command below:</p><p><strong>az vm list-sizes --location eastus --output table</strong></p><p>Reviewing the values found under the ‘Name’ column, let us go with the ‘Standard_F1s’ option. Let’s now create our virtual machine:</p><pre><strong>az vm create --resource-group </strong><em>{</em><em>UNIQUE_RESOURCE-GROUP_NAME}</em><strong> \</strong></pre><pre><strong>--name </strong><em>{</em><em>UNIQUE_VIRTUAL-MACHINE_NAME}</em><strong> \</strong></pre><pre><strong>--public-ip-address-dns-name </strong><em>{</em><em>UNIQUE_PUBLIC-IP_NAME}</em><strong> \</strong></pre><pre><strong>--image UbuntuLTS \</strong></pre><pre><strong>--size Standard_F1s \</strong></pre><pre><strong>--generate-ssh-keys</strong></pre><p>Quite the call but let’s review the list below for each option specified:</p><ul><li>--resource-group Your chosen unique resource group name.</li><li>--name Your chosen unique virtual machine name.</li><li>--public-ip-address-dns-name Your chosen unique website name that will be prepended to the ‘eastus.cloudapp.azure.com’ sub-domain.</li><li>--image The virtual mahcine image we chose.</li><li>--size The size of our virtual machine.</li><li>--generate-ssh-keys Generate SSH public and private key files if missing from your local environment (~/.ssh/).</li></ul><blockquote>Take note that not all location and size combinations work. Azure will respond with a code of ‘SkuNotAvailable’ if so. You will have to change the size or the location of the resource group to proceed.</blockquote><p>Your virtual machine should now be running. You can ssh into it:</p><p><strong>ssh </strong><em>{UNIQUE_PUBLIC-IP_NAME}</em><strong>.eastus.cloudapp.azure.com</strong></p><p>The current working directory with be /home/$USER, ‘$USER’ being you local username.</p><h3>Conclusion</h3><p>In this article we have created a resource group and virtual machine in Azure’s cloud. In the following article, <a href="https://medium.com/@rbrisita/azure-hosting-lemp-with-php-7-1-and-laravel-5-4-part-2-d3df1c934e69">Part 2</a>, we explore creating the rest of the stack using Nginx, MySQL, and PHP with a Laravel sample project using an installation script.</p><p><strong>Links</strong></p><ul><li><a href="https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-cli">Azure Quick Start - Create VM CLI</a></li><li><a href="https://docs.microsoft.com/en-us/azure/virtual-machines/linux/tutorial-manage-vm">Create and Manage Linux VMs with the Azure CLI</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a1ae43c7ad5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>