<?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 Stephane Gallet on Medium]]></title>
        <description><![CDATA[Stories by Stephane Gallet on Medium]]></description>
        <link>https://medium.com/@gallet.stephane?source=rss-69f129ffb58------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7q0aVDWtIJhXZwUV.</url>
            <title>Stories by Stephane Gallet on Medium</title>
            <link>https://medium.com/@gallet.stephane?source=rss-69f129ffb58------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 02:31:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gallet.stephane/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[Being comfortable in uncomfortable situations]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@gallet.stephane/being-comfortable-in-uncomfortable-situations-7b58bc677908?source=rss-69f129ffb58------2"><img src="https://cdn-images-1.medium.com/max/800/1*5QVTr_TmvzonBhAotCyEHQ.png" width="800"></a></p><p class="medium-feed-snippet">I&#x2019;ve been thinking lately that comfort is a bit of a paradox. There are countless self-help books telling us the secrets to being happy&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@gallet.stephane/being-comfortable-in-uncomfortable-situations-7b58bc677908?source=rss-69f129ffb58------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@gallet.stephane/being-comfortable-in-uncomfortable-situations-7b58bc677908?source=rss-69f129ffb58------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b58bc677908</guid>
            <category><![CDATA[conciousness]]></category>
            <category><![CDATA[comfort]]></category>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[religion-and-spirituality]]></category>
            <dc:creator><![CDATA[Stephane Gallet]]></dc:creator>
            <pubDate>Mon, 09 Sep 2019 18:40:55 GMT</pubDate>
            <atom:updated>2019-09-09T18:40:55.489Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The easiest bare-bones way to deploy your React-App on a Google Cloud VM for public use]]></title>
            <link>https://medium.com/@gallet.stephane/the-easiest-bare-bones-way-to-deploy-your-react-app-on-a-google-cloud-vm-for-public-use-3c3b1871ac87?source=rss-69f129ffb58------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c3b1871ac87</guid>
            <category><![CDATA[google-cloud-compute]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Stephane Gallet]]></dc:creator>
            <pubDate>Mon, 09 Sep 2019 16:05:09 GMT</pubDate>
            <atom:updated>2019-09-09T16:05:09.339Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Spoiler Alert:</strong> This is a short tutorial to learn how to quickly (&lt;5min) deploy your development React web app on the internet for everyone to see and use, using a Google Cloud VM. Share your work with your friends &amp; peers, add a working app to your portfolio for employers to see, get customer feedback…there are many reasons you’d want a quick way to do this. If you want to skip my long-winded dribble, skip directly to <strong>Step 1</strong> below.</p><p><strong><em>Security Warning:</em></strong><em> Keep this to the very limited use-cases described above for this bare-bones scenario, as almost no security measures are being taken other than what GCP naturally provides, so don’t use this for production deployments (duh!), or using any code/infrastructure which you’re not ready to lose to a Russian or Chinese hacker.</em></p><p>Here at Spryte labs we create a lot apps, Data analysis, custom websites, mobile Apps, blockchain Dapps, trading applications for FinTech, the list goes on. Usually our clients come to use with a problem, not a fully specked out solution, so we start with a 2-week sprint demo to figure out what the problem even is. At the end of this sprint we have a working demo, and I like to have clients play with it over a few days/weeks, it helps them figure out what they really want out of the final product. Also since we almost always implement CI/CD into our demos, I like to keep a “production build” running from the get-go, as it help developers get into the continuous development mindset when there’s an actual client-facing solution tests and new builds must run against. It’s SOOOOOOO much easier to get the whole team onboard this way when you start with 0 lines of code.</p><p>A quick recap of why I think this is good to do:</p><ol><li>always make your code public facing, feedback is key to good product design. Unless you have an internet-facing product, your “user testing” is just <strong>you</strong>, <strong>your</strong> environment, <strong>your</strong> OS…</li><li>CI/CD is only real when there’s a real live deployed product that can’t break..otherwise it’s just theory</li></ol><p>Here are the steps I use to quickly deploy a React web-app:</p><h3>STEP 1: Deploy a VM on Google Cloud Console</h3><p>I’m assuming you have a <a href="https://cloud.google.com/">Google Cloud Platform</a> (GCP) account, if not create one. It’s free, Google gives you $300 in credits to start.</p><p>Once logged-in, open the left-hand panel, and under the Compute Engine select the VM Instances menu as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gJZSwCMKQYf7-shkgOcSzA.png" /><figcaption>VM instance menu in GCP</figcaption></figure><p>Click to create a new VM instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u-8bI-9V93rP5eohvk_oyg.png" /><figcaption>Create New VM</figcaption></figure><p>Select your VM name, location, and OS (I usually use Ubuntu, let me know in the comments if google doesn’t automatically install the Apache Webserver on other distros)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZP8cAGH90xKqyS76R8kYhA.png" /></figure><p>MOST IMPORTANTLY, click to allow http/https traffic, this is a shortcut to open ports 80 &amp; 443 on your VM automatically without having to setup firewall rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THyLqRrTmhxzWHjhtCiCSQ.png" /><figcaption>Setting up quick firewall rules for instant deploys. For added fun this makes your VM an instant target by hackers all over the world, you’re now officially a sysadmin, congrats, and welcome to hell.</figcaption></figure><p>At this point Google will be creating your virtual machine, which can take a few seconds up to a few minutes. Once it’s created you will see it, and most importantly its external/public IP (#1). You now have a public-facing server on the internet at this address. Let’s put some code on it by clicking on the down arrow (#2) and selecting the simplest option, which is to open in browser window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JhypVKmQ3FHf_qroIKGKOg.png" /><figcaption>GCP CONSOLE VM: THIS IS WHERE YOU GET YOUR IP</figcaption></figure><p>Google will use the browser to emulate a shell and securely connect to your VM via SSH using internally held credentials, super easy, thanks Google!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xv6GhzhmuifwjPTkrRI-xg.png" /><figcaption>your new VM via Google Shell</figcaption></figure><p>Remember you have some nifty options by clicking on the wheel at the top right-hand corner for file upload/download for example if scp is not your thing. (#2 above)</p><p>So drop your code in:</p><pre>git clone “your repo url”</pre><p>Then cd inside that directory and build your production app:</p><pre>npm run build</pre><p>Most likely, you’ll get a bunch of errors here, as you haven’t installed any of your repo dependencies, including Node or npm… This is where most new developers get hung up, as deploying on a clean VM means you’ll need to know your distro and install everything from scratch. Depending on your app, your development habits and development environment, this could be a thousand different things. If you’re accustomed to developing locally using venv or containers, things could be relatively easy. If not, googling the particular error will usually return a solution on Stack Overflow. Fix one at a time until you can successfully build using</p><pre>npm run build</pre><p>Npm will create a new /build directory for you, with everything you need inside to serve using a standard webserver. Luckily, google/Ubuntu already have our back, as Apache Webserver is magically setup and running. Apache will serve any files you copy to:</p><pre>/var/www/html</pre><p>right now there’s no html directory, so make it:</p><pre>sudo mkdir /var/www/html/</pre><p>then cd into your /build directory:</p><pre>cd /build</pre><p>and copy everything inside your build folder to Apache’s default serve location by doing:</p><pre>sudo cp -R * /var/www/html/</pre><p>don’t forget the -R, which tells the copy(cp) command to also copy the folders and items inside the folders (recursively), otherwise you’ll be missing a lot of valuable files.</p><p>Call your mom, tell her to open up a browser window and type in your VM’s IP, which you can always get in the GCP console (see box #1 in screenshot #5 above)</p><p>Voila! Your app is live on the internets. Once your mom has played with it, send the IP to your customer, get feedback, and make it better!</p><p><strong>Reminder:</strong> <em>VMs with open ports on the internet will within 30s irremediably get lots of “unwanted traffic” from spam bots, white-hat enthusiasts, and black-hat *^*#&amp;)R&amp;W&amp; bastards. As much as Google does to harden these VMs by default… your code is on this, and most likely your code sucks(at least from a security point of view). Be prepared to monitor logs, and worst case scenario, delete the VM and start again, it should only take you about 5min all in once you do it enough times and have your dependencies clear.</em></p><p>If you have a problem to solve and need quick-response tech ninjas, check out our design studio <a href="http://www.sprytelabs.com/">Spryte Labs</a> . If you are a developer and want to learn how to create best-in-class React Apps, learn Python, Data Science or how to write code that doesn’t suck, check out <a href="http://www.byteacademy.com/">ByteAcademy.com</a>. If you already code but want to learn how to work within a highly productive cross-functional team and implement CI/CD and Agile, check out <a href="http://www.scrum26.com/">Scrum26.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c3b1871ac87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decrypting Crypto: Deepdive into “How to Share a Secret”]]></title>
            <link>https://medium.com/@gallet.stephane/decrypting-crypto-deepdive-into-how-to-share-a-secret-a83b3dc792da?source=rss-69f129ffb58------2</link>
            <guid isPermaLink="false">https://medium.com/p/a83b3dc792da</guid>
            <category><![CDATA[secrets]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[rsa]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Stephane Gallet]]></dc:creator>
            <pubDate>Mon, 12 Mar 2018 21:54:34 GMT</pubDate>
            <atom:updated>2018-03-27T20:48:18.635Z</atom:updated>
            <content:encoded><![CDATA[<p>Academic papers are not the easiest beasts to fondle. With the buzz around digital tokens these days, Crypto is on everyone’s radar. Unfortunately, unless you’ve had to curse yourself through countless graduate-school math classes on number theory, topology and algebra, it’s pretty unlikely you’ll be able to understand most of the current work on Crypto, and by current I mean anything post WW1. <strong><em>Disclaimer: this is an article aimed at simplifying a technical peer-reviewed paper for the layperson. I am not aiming to explain every single detail, but rather to bring out the concepts and beauty behind the math. If you’re not a serious cryptographer, read on!</em></strong></p><p>This is my attempt at explaining a fundamental paper in simple terms, so let’s tame this beast together. If you own even just one Satoshi, you’d be crazy not to try to follow along. Adi Shamir’s “<em>How to Share a Secret</em>” was originally published in November 1979’s <em>Communications of the ACM</em>, and has been referenced over 1000 times — no mean feat in academia — so pay attention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCa4g7s65uDOGUkeFgAQpg.jpeg" /></figure><p>We’re all familiar with the movie scene where someone walks into a bank to get at their safe deposit-box, puts in their key, and the bank manager also has to put in their key. Both turn their key at the same time, and the door magically opens. <strong><em>This paper just deals with the question of how to create these keys, and how to “open the lock” if someone comes to us with enough keys.</em></strong> In 1979 we didn’t care so much. Now that we all have unique Bitcoin wallet addresses, and we know that whoever has our private key controls all the money in that wallet…we might need to pay more attention. Thankfully, Mr. Shamir’s got us covered, with his <strong>(k, n) threshold scheme</strong>.</p><p>The scheme’s beauty is clearly explained, in his own words:</p><blockquote>“By properly choosing the k and n parameters, we can give any sufficiently large majority the authority to take some action while giving any sufficiently large minority the power to block it.”</blockquote><p>Is this starting to sound like something that might be useful to a digital and anonymous peer-to-peer community spread around the world? For those of you following along with the paper (available <a href="https://dl.acm.org/citation.cfm?id=359176&amp;dl=ACM&amp;coll=DL">here</a>), part 1 is fluff, let’s get down to part 2.</p><p>Shamir’s entire solution to creating keys lies in a (very) clever construct: <strong>if you use a polynomial to define your keys, then you can simply solve a set of linear equations to recover your secret.</strong> If you create n keys using polynomials of order k-1, you’ll need at least k keys to solve the system.</p><p>So if:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*jXQLljunPqfq7ODdGNWKfA.png" /></figure><p>then:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*1TWzHzDeCUPz7Vxmrar5Pg.png" /></figure><p>which is easily solved for the constants a, thus recovering your secret(Ao was set as the Secret initially.) Below is a very simple Python script which takes your secret, and creates k keys. Recovering your secret with n keys is then assured, provided you know not only the key, but which key you were given (say key # 1, key #4, and key#2). (disclaimer: you could brute force some answers if you just have the keys)</p><p>Shamir’s scheme is useful, because polynomials and sets of linear equations have been studied <strong>A LOT</strong>…so we can infer some nice properties:</p><ol><li>There is NO way to recover the secret is not enough keys are supplied (you need at least 3 equations if there are 3 unknowns in a linear system)</li><li>New keys can be created and managed at will, as the community grows</li><li>By complicating a little bit how we create the keys, a weight can be assigned to each key, so that different actors have more importance and some keys become more valuable</li></ol><p>We all love infographics…here’s the simple version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*CDgIDWgz8aPlMN-a_vjxGA.png" /></figure><p>Please check out this simple Python code to get a better feel for how keys are created. The function split_secret(‘secret’, k, n) takes a secret and return k keys, while get_secret(n, {keys}) takes a dictionary of keys and puts the secret back together. Clone it for yourself and play around:</p><p><a href="https://github.com/adleonis/HTSAS---How-to-Share-a-Secret/blob/master/HTSAS.py">adleonis/HTSAS---How-to-Share-a-Secret</a></p><p><strong>As a side-note, and something you’ll be righteously hearing again and again:</strong></p><blockquote><strong>NEVER underestimate the complexity of implementing Cryptography in your application, or the freely-available tools you’re using</strong></blockquote><p>Inspecting the code above and playing around with it, will quickly reveal to you that even a beautiful construct like the <strong><em>(k, n) threshold scheme</em></strong> can be terribly implemented by a negligent programmer. The original secret can easily leak out into the first key if the random numbers in your original polynomial are on the same order of magnitude as your secret. Secrets are generally not numbers, and the translation from Alphanumeric characters in your hash to integers can easily leak information. That’s just two of many many possible mistakes.</p><p>Thanks to <a href="https://www.linkedin.com/in/vincent-chiodo/">Vincent Chiodo</a> and <a href="https://www.linkedin.com/in/isroel-kogan/">Isroel Kogan</a> for the code review, <a href="https://www.linkedin.com/in/trabing/">Kenso Trabing</a> for the original paper recommendation, and <a href="https://www.linkedin.com/school/9419438/">ByteAcademy</a> for teaching me Python.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a83b3dc792da" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>