<?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 Reza on Medium]]></title>
        <description><![CDATA[Stories by Reza on Medium]]></description>
        <link>https://medium.com/@ranwar?source=rss-1f0be2ad0e28------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SdUWQL0GGJyX2Xbj.jpeg</url>
            <title>Stories by Reza on Medium</title>
            <link>https://medium.com/@ranwar?source=rss-1f0be2ad0e28------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 18:44:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ranwar/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[From Avash to MetaMask]]></title>
            <link>https://ranwar.medium.com/from-avash-to-metamask-dd54158b4369?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd54158b4369</guid>
            <category><![CDATA[metamask]]></category>
            <category><![CDATA[testnet]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ava-labs]]></category>
            <category><![CDATA[avalanche]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Sun, 01 Aug 2021 12:17:18 GMT</pubDate>
            <atom:updated>2021-08-20T03:43:06.862Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g-t3DG5T-m36nsxi" /><figcaption>Photo by <a href="https://unsplash.com/@kowalikus?utm_source=medium&amp;utm_medium=referral">Krzysztof Kowalik</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Or how to set up our own local <a href="https://www.avalabs.org/">Avalanche</a> testnet.</p><p>First of all, we’re going to want to install <a href="https://docs.avax.network/build/tools/avash">Avash</a> which requires <a href="https://golang.org/dl/">Golang 1.15.5 or later</a> and AvalancheGo.</p><p>Follow the instructions <a href="https://golang.org/doc/install">here</a> to install Go. Don’t forget to set $GOPATH.</p><p>Let’s continue with AvalancheGo. Download it from the repo:</p><pre>go get -v -d github.com/ava-labs/avalanchego/…</pre><p>Change to the avalanchego directory:</p><pre>cd $GOPATH/src/github.com/ava-labs/avalanchego</pre><p>And build it:</p><pre>./scripts/build.sh</pre><p>When the build is done the binary will be in:</p><pre>./build/avalanchego</pre><p>Alright. Now we need to install Avash. Go back to your home directory:</p><pre>cd ~</pre><p>And download and build Avash:</p><pre>git clone <a href="https://github.com/ava-labs/avash.git">https://github.com/ava-labs/avash.git</a>; cd avash; go build</pre><p>Make sure we’re already in the avash directory and then run it:</p><pre>./avash</pre><p>A file .avash.yaml will be created. This is our Avash configuration file:</p><pre>Config file set: $HOME/.avash.yaml<br>Avash successfully configured.</pre><p>Exit from Avash:</p><pre>avash&gt; exit</pre><p>We’ll use our favorite text editor to edit .avash.yaml and fill it in with the relevant parameters.</p><pre>avalanchelocation: $GOPATH/src/github.com/ava-labs/avalanchego/build/avalanchego<br>datadir: $HOME/avash/stash<br>log:<br>  terminal: info<br>  logfile: info<br>  dir: $HOME/avash/stash/logs</pre><p>Run Avash:</p><pre>./avash</pre><p>And now we’ll start a five node testnet:</p><pre>runscript scripts/five_node_staking.lua</pre><p>Check whether all five nodes are running:</p><pre>avash&gt; procmanager list</pre><figure><img alt="Output of procmanager list" src="https://cdn-images-1.medium.com/max/1024/1*zxHPkXLVvUthcBUBwpABPg.png" /><figcaption>node1</figcaption></figure><p>Verify the nodes are connected by calling info.peers from one node:</p><pre>curl -X POST — data ‘{<br>    “jsonrpc”:”2.0&quot;,<br>    “id” :1,<br>    “method” :”info.peers”<br>}’ -H ‘content-type:application/json;’ 127.0.0.1:9650/ext/info</pre><p>As we can see all four of our peers are here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*KaieBOZOLN_lgK7IN38Dlg.png" /><figcaption>Connected peers</figcaption></figure><p>Avalanche nodes have a keystore to manage users. Let’s create a user:</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;: &quot;2.0&quot;,<br>    &quot;id&quot;: 1,<br>    &quot;method&quot;: &quot;keystore.createUser&quot;,<br>    &quot;params&quot;: {<br>        &quot;username&quot;: &quot;YOUR_USERNAME&quot;,<br>        &quot;password&quot;: &quot;YOUR_PASSWORD&quot;<br>    }<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/keystore</pre><p>The response should be:</p><pre>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;result&quot;:{&quot;success&quot;:true},&quot;id&quot;:1}</pre><p>Now we need to get some test AVAX so we can actually use this testnet. We want to fund an address on the C-Chain because we want to use it for testing our smart contracts. So how exactly do we do that? Luckily for us, if we’re running a local test network there’s a pre-funded C-Chain address that we can import to get some AVAX. The private key for the address is PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN . Let’s import the key to get access to its funds.</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot; :1,<br>    &quot;method&quot; :&quot;avax.importKey&quot;,<br>    &quot;params&quot; :{<br>        &quot;username&quot; :&quot;YOUR_USERNAME&quot;,<br>        &quot;password&quot;:&quot;YOUR_PASSWORD&quot;,<br>        &quot;privateKey&quot;:&quot;PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN&quot;<br>    }<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/bc/C/avax</pre><p>Which is this address on the C-Chain:</p><pre>{“jsonrpc”:”2.0&quot;,”result”:{“address”:”0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC”},”id”:1}</pre><p>In order to use this address from MetaMask we must import it. Let’s get the private key so we can use it in MetaMask:</p><pre>curl -X POST --data &#39;{<br>    &quot;jsonrpc&quot;:&quot;2.0&quot;,<br>    &quot;id&quot; :1,<br>    &quot;method&quot; :&quot;avax.exportKey&quot;,<br>    &quot;params&quot; :{<br>        &quot;username&quot; :&quot;YOUR_USERNAME&quot;,<br>        &quot;password&quot;:&quot;YOUR_PASSWORD&quot;,<br>        &quot;address&quot;: &quot;0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC&quot;<br>    }<br>}&#39; -H &#39;content-type:application/json;&#39; 127.0.0.1:9650/ext/bc/C/avax</pre><p>We see that it’s the parameter privateKeyHex.</p><pre>{“jsonrpc”:”2.0&quot;,”result”:{“privateKey”:”PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN”,”privateKeyHex”:”0x56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027&quot;},”id”:1}</pre><p>Before we import the account we’ll first connect MetaMask to our local Avalanche test network. Select ‘Networks’ and select ‘Custom RPC’ and use these parameters:</p><p><strong>Network Name</strong>: Avalanche Local</p><p><strong>New RPC URL</strong>: <a href="http://localhost:9650/ext/bc/C/rpc">http://localhost:9650/ext/bc/C/rpc</a></p><p><strong>ChainID</strong>: 43112</p><p><strong>Symbol</strong>: AVAX</p><p><strong>Explorer</strong>: N/A</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*rZV3ylxqk0AGb6q-_0EWZQ.png" /><figcaption>Add a custom RPC to MetaMask</figcaption></figure><p>Click ‘Save’.</p><p>Now import the account:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*pUVTzNp2pgQbz6qs_-fpXA.png" /><figcaption>Import an account to MetaMask</figcaption></figure><p>Paste the private key 0x56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027 and click ‘Import’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*wXuYQ3b_VbDqzCtWH31RmQ.png" /><figcaption>Input private key and import account</figcaption></figure><p>And we can see that the account has funds in it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*GxGJIOAXCFKg5Gn2vsYByw.png" /><figcaption>Pre-funded C-Chain address</figcaption></figure><p>Try sending some AVAX:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*7DWbfeTSsg140RK0G-l27Q.png" /><figcaption>Send 1 AVAX</figcaption></figure><p>And we’re done!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*6XO0msZZ3cB-sLt7WFoJaw.png" /><figcaption>Send AVAX successful</figcaption></figure><p><em>The private key we used in this example is for testing purposes only. Be careful to not ever expose your private keys or you may risk losing your funds.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd54158b4369" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Laravel, SQL Server, Dates and Time]]></title>
            <link>https://ranwar.medium.com/laravel-sql-server-dates-and-time-1ec16eed9df1?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ec16eed9df1</guid>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[apple-silicon]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[datetime]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Wed, 23 Jun 2021 09:37:58 GMT</pubDate>
            <atom:updated>2021-06-23T09:58:33.817Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xQW2Hy_mbw-ITkLy" /><figcaption>Photo by <a href="https://unsplash.com/@jeetdhanoa?utm_source=medium&amp;utm_medium=referral">Jeet Dhanoa</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I’ve recently had issues with date formats when using <a href="https://laravel.com/">Laravel</a> <a href="https://laravel.com/docs/8.x/valet">Valet</a> with Microsoft SQL Server on an M1 MacBook Air.</p><p>Using</p><pre>Carbon::parse($date)-&gt;format(&#39;d/m/Y&#39;)</pre><p>where $date is taken from the result of an Eloquent query to the SQL Server database from a column with a date data type, results in this error:</p><pre>DateTime::__construct(): Failed to parse time string (Jun 23 2021 12:00:00:AM) at position 20 (:): Unexpected character</pre><p>And sure enough our trusty dd() shows that $date looks like:</p><pre>Jul  23 2021 12:00:00:AM</pre><p>But why? Isn’t it supposed to be a date data type?</p><p>Somehow the default php database driver used by Valet for SQL Server, pdo_dblib, mangled the date into this format so that when Carbon attempted to parse() it it ended up with the error above.</p><p>I then found out that pdo_dblib had settings in:</p><pre>/opt/homebrew/etc/locales.conf</pre><p>which looked like:</p><pre>[default]<br> date format = %b %e %Y %I:%M:%S:%z%p</pre><pre>[en_US]<br> date format = %b %e %Y %I:%M:%S:%z%p<br> language = us_english<br> charset = iso_1</pre><pre>[es_ES]<br> date format = %b %d %Y %I:%M%p<br> language = spanish<br> charset = iso_1</pre><pre>[pt_BR]<br> date format = %d/%m/%Y %H:%M<br> language = Portuguese<br> charset = iso_1</pre><pre>[it_IT]<br> date format = %d/%m/%Y %H:%M<br> language = Italiano<br> charset = iso_1</pre><p>By changing</p><pre>[default]<br> date format = %b %e %Y %I:%M:%S:%z%p</pre><p>to</p><pre>[default]<br> date format = %b %e %Y %H:%M:%S</pre><p>and restarting php:</p><pre>sudo brew services restart php@7.4</pre><p>The date format became:</p><pre>Jul  23 2021 00:00:00</pre><p>which Carbon had no trouble parse()-ing.</p><p>I’ve had success before using a newer driver called pdo_sqlsrv (no configuration changes needed) instead of pdo_dblib but unfortunately I couldn’t properly add it to php to run for the M1/ARM MacBook Air and ended up with this error:</p><pre>Symfony\Component\Debug\Exception\FatalErrorException : Unknown processor architecture.</pre><p>so I had no choice but to use pdo_dblib.</p><p>Furthermore, had I’ve been successful in adding pdo_sqlsrv to php such as in cases with Intel-based Macs, if pdo_dblib still existed as a module in php Laravel 5.6 would still prioritize it over pdo_sqlsrv as shown in src/Illuminate/Database/Connectors/SqlServerConnector.php line 41:</p><pre>protected function getDsn(array $config)<br>{<br>    // ...<br>    if (in_array(&#39;dblib&#39;, $this-&gt;getAvailableDrivers())) {<br>        return $this-&gt;getDblibDsn($config);<br>    } elseif ($this-&gt;prefersOdbc($config)) {<br>        return $this-&gt;getOdbcDsn($config);<br>    }<br><br>    return $this-&gt;getSqlSrvDsn($config);<br>}</pre><p>so you’d have to either get rid of pdo_dblib which is not so easy in Valet or modify SqlServerConnector.php which is not really advisable because it’s not picked up by version control.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ec16eed9df1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open edX Native Installation]]></title>
            <link>https://ranwar.medium.com/open-edx-native-installation-c66bc02a4c9d?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/c66bc02a4c9d</guid>
            <category><![CDATA[install]]></category>
            <category><![CDATA[juniper]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[open-edx]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Thu, 08 Oct 2020 11:06:01 GMT</pubDate>
            <atom:updated>2023-11-29T04:02:37.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KgxptO5dwCAOwWLh" /><figcaption>Photo by <a href="https://unsplash.com/@anniespratt?utm_source=medium&amp;utm_medium=referral">Annie Spratt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This installation is based on <a href="https://openedx.atlassian.net/wiki/spaces/OpenOPS/pages/146440579/Native+Open+edX+platform+Ubuntu+16.04+64+bit+Installation">these</a> <a href="https://blog.lawrencemcdaniel.com/open-edx-installation/">references</a> and <a href="https://discuss.openedx.org/c/devops/7">discussions</a>.</p><p>The first thing to do is to get a Ubuntu 16.04 server with at least 2 cores, 8 GB of RAM and 100 GB of storage. I got mine on <a href="https://aws.amazon.com/">AWS</a> which is a t2.large instance.</p><p>Prepare your server by updating, upgrading and doing a reboot:</p><pre>$ sudo apt update<br>$ sudo apt upgrade<br>$ sudo reboot</pre><p>To make life easier I like to install <a href="https://mosh.org/">mosh</a>:</p><pre>$ sudo apt install mosh</pre><p>Make sure locales are set right:</p><pre>$ sudo locale-gen en_US en_US.UTF-8<br>$ sudo dpkg-reconfigure locales<br>$ sudo dpkg --configure -a</pre><p>Define the base of your learning management system (LMS) and content management system (CMS) by creating the file <strong>config.yml</strong>:</p><pre>$ vi config.yml</pre><p>Insert these lines. Please use your own values for the domain names:</p><pre>EDXAPP_LMS_BASE: &quot;example.com&quot;<br>EDXAPP_CMS_BASE: &quot;studio.example.com&quot;</pre><p>Save the file.</p><p>Make sure locale variables are set:</p><pre>$ export LC_ALL=&quot;en_US.UTF-8&quot;<br>$ export LC_CTYPE=&quot;en_US.UTF-8&quot;</pre><p>Choose the Open edX version you will be installing:</p><pre>$ export OPENEDX_RELEASE=open-release/juniper.master</pre><p>Bootstrap the Ansible installation:</p><pre>$ wget https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/ansible-bootstrap.sh -O -| sudo -H bash</pre><p>Randomize passwords:</p><pre>$ wget <a href="https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/generate-passwords.sh">https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/generate-passwords.sh</a> -O -| bash</pre><p>Install the Open edX software:</p><pre>$ nohup $SHELL &lt;&lt;EOF &amp;<br>&gt; wget <a href="https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/native.sh">https://raw.githubusercontent.com/edx/configuration/$OPENEDX_RELEASE/util/install/native.sh</a> -O -| bash &gt; install.out<br>&gt; EOF</pre><p>The install will take around an 1.5 hours to complete so make yourself a nice cup of <a href="http://www.sensakoffie.com/">coffee</a>.</p><p>Monitor the installation by doing a:</p><pre>$ tail -f install.out</pre><p>Your install is done when you see:</p><pre>Installation finished at yyyy–mm–dd hh:mm:ss</pre><p>Make sure all the services are running:</p><pre>$ sudo /edx/bin/supervisorctl status</pre><figure><img alt="Open edX Services" src="https://cdn-images-1.medium.com/max/946/1*kq8hjOB4Ntbi6Yb4nIOO8A.png" /><figcaption>Open edX Services</figcaption></figure><p>Create an an account with staff/admin and superuser privileges and set its password:</p><pre>$ sudo su edxapp -s /bin/bash<br>$ cd<br>$ source edxapp_env<br>$ /edx/bin/python.edxapp /edx/bin/manage.edxapp lms manage_user user user<a href="/service/mailto:ranwar@hey.com">@example.com</a> --staff --superuser --settings=production<br>$ cd /edx/app/edxapp/edx-platform<br>$ ./manage.py lms --settings production changepassword user</pre><p>Specify SameSite=Lax so that cookies shall not be sent in cross-site requests (for further information read <a href="https://web.dev/samesite-cookies-explained/">this</a>). Edit the file <strong>common.py</strong>:</p><pre>$ vi /edx/app/edxapp/edx-platform/lms/envs/common.py</pre><p>And change:</p><pre>DCS_SESSION_COOKIE_SAMESITE = &#39;None&#39;</pre><p>To:</p><pre>DCS_SESSION_COOKIE_SAMESITE = &#39;Lax&#39;</pre><p>Save the file and exit:</p><pre>$ exit</pre><p>Restart services:</p><pre>$ sudo /edx/bin/supervisorctl restart all</pre><p>Now check whether every site is running properly.</p><p>The LMS at <a href="http://example.com/">http://example.com:</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iE7BvYCDcoTpnLvVZpr4Ww.png" /><figcaption>Open edX LMS</figcaption></figure><p>The CMS/Studio at <a href="http://example.com:18010:">http://example.com:18010:</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ppNf_LLyNI2PXmZs00eFmA.png" /><figcaption>Open edX Studio</figcaption></figure><p>The Django Admin at <a href="http://example.com/admin:">http://example.com/admin:</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKK1l8KELhstgJKzHsyZlw.png" /><figcaption>Open edX Django Admin</figcaption></figure><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c66bc02a4c9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Set Up HTTPS on Open edX]]></title>
            <link>https://ranwar.medium.com/how-to-set-up-https-on-open-edx-d93f1f495b22?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/d93f1f495b22</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[bitnami]]></category>
            <category><![CDATA[open-edx]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Thu, 24 Sep 2020 05:54:17 GMT</pubDate>
            <atom:updated>2020-09-24T05:54:17.130Z</atom:updated>
            <content:encoded><![CDATA[<p>We are using <a href="https://aws.amazon.com/marketplace/pp/Bitnami-Open-edX-Certified-by-Bitnami/B00ZPVRGC4">Open edX powered by Bitnami on AWS Cloud</a> Ironwood release.</p><p>We want to use HTTPS for Open edX:</p><ul><li>Learning Management System (LMS)</li><li>Content Management System (CMS) or Studio</li><li>Admin</li></ul><p>First of all, get an SSL certificate from a provider such as <a href="https://comodosslstore.com/promoads/cheap-comodo-ssl-certificates.aspx">Comodo</a>.</p><p>You will get several files but we will only be using three:</p><ul><li>A certificate key file: example_com.key</li><li>A certificate file: example_com.crt</li><li>A CA certificate file: example_com.ca-bundle</li></ul><p>Put all of these in ~/apps/edx/conf/certs</p><p>Use a subdomain for the CMS/Studio. If you haven’t already done so have a look at this <a href="https://medium.com/@ranwar/how-to-use-a-subdomain-instead-of-port-18010-on-open-edx-studio-63e2426256ed">article</a>.</p><p>Now let’s edit the ~/apps/edx/conf/httpd-vhosts.conf file and add a virtual host at port 443 for the LMS and the CMS. Put a Redirect permanent on each virtual host listening on port 80 so any call to http will be redirected to https.</p><pre>&lt;VirtualHost *:80&gt;<br>    ServerName lms.example.com</pre><pre>    Redirect permanent / <a href="https://dev.kampusx.io/">https://</a>lms.example.com<a href="https://dev.kampusx.io/">/</a><br>    Include “/opt/bitnami/apps/edx/conf/httpd-lms.conf”<br>&lt;/VirtualHost&gt;</pre><pre>&lt;VirtualHost *:443&gt;<br>    ServerName lms.example.com<br>    # ServerAlias *</pre><pre>SSLEngine on<br>    SSLCertificateFile “/opt/bitnami/apps/edx/conf/certs/example_com.crt”<br>    SSLCertificateKeyFile “/opt/bitnami/apps/edx/conf/certs/example_com.key”<br>    SSLCACertificateFile “/opt/bitnami/apps/edx/conf/certs/example_com.ca-bundle”</pre><pre>    Include “/opt/bitnami/apps/edx/conf/httpd-lms.conf”<br>&lt;/VirtualHost&gt;</pre><pre>&lt;VirtualHost *:80&gt;<br>    ServerName studio.example.com</pre><pre>    Redirect permanent / <a href="https://studio.kampusx.io/">https://studio.example.com/</a><br>    Include “/opt/bitnami/apps/edx/conf/httpd-cms.conf”<br>&lt;/VirtualHost&gt;</pre><pre>&lt;VirtualHost *:443&gt;<br>    ServerName studio.example.com</pre><pre>    SSLEngine on<br>    SSLCertificateFile “/opt/bitnami/apps/edx/conf/certs/example_com.crt”<br>    SSLCertificateKeyFile “/opt/bitnami/apps/edx/conf/certs/example_com.key”<br>    SSLCACertificateFile “/opt/bitnami/apps/edx/conf/certs/example_com.ca-bundle”</pre><pre>    Include “/opt/bitnami/apps/edx/conf/httpd-cms.conf”<br>&lt;/VirtualHost&gt;</pre><p>Save ~/apps/edx/conf/httpd-vhosts.conf and now let’s edit ~/apps/edx/conf/httpd-lms.conf and comment out some lines to enable remote access to Django admin console:</p><pre># Disable remote access to Django admin console<br># &lt;Location “/admin”&gt;<br>#     Require local<br>#     ErrorDocument 403 “For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.”<br># &lt;/Location&gt;</pre><p>Save ~/apps/edx/conf/httpd-lms.conf and restart apache and edx processes:</p><pre>$ sudo /opt/bitnami/ctlscript.sh restart apache<br>$ sudo /opt/bitnami/ctlscript.sh restart edx</pre><p>And we’re done!</p><p>Now you can access your LMS, CMS and Admin on <a href="http://lms.example.com,/">https://lms.example.com,</a> <a href="https://studio.example.com,/">https://studio.example.com</a> and https://lms.example.com/admin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d93f1f495b22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use a Subdomain Instead of Port 18010 on Open edX Studio]]></title>
            <link>https://ranwar.medium.com/how-to-use-a-subdomain-instead-of-port-18010-on-open-edx-studio-63e2426256ed?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/63e2426256ed</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[bitnami]]></category>
            <category><![CDATA[open-edx]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Wed, 23 Sep 2020 13:38:56 GMT</pubDate>
            <atom:updated>2020-09-24T05:58:16.150Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Use a Subdomain Instead of Port 18010 for Open edX Studio</h3><p>We are using <a href="https://aws.amazon.com/marketplace/pp/Bitnami-Open-edX-Certified-by-Bitnami/B00ZPVRGC4">Open edX powered by Bitnami on AWS Cloud</a> Ironwood release.</p><p>What we want is to use a subdomain such as:</p><p><strong>studio.example.com</strong></p><p>instead of something like:</p><p>lms.example.com:18010</p><p>to access edX Studio.</p><p>Four important files:</p><ul><li>~/apps/edx/conf/httpd-vhosts.conf</li><li>~/apps/edx/conf/httpd-lms.conf</li><li>~/apps/edx/conf/lms.env.json</li><li>~/apps/edx/conf/cms.env.json</li></ul><p>In file ~/apps/edx/conf/httpd-vhosts.conf</p><p>Configure the virtual host for the LMS:</p><pre>&lt;VirtualHost *:80&gt;</pre><pre>    ServerName lms.example.com</pre><pre>    # ServerAlias *</pre><pre>    Include “/opt/bitnami/apps/edx/conf/httpd-lms.conf”</pre><pre>&lt;/VirtualHost&gt;</pre><p>Turn off the virtual host listening on 18010:</p><pre># Listen 18010</pre><pre># &lt;VirtualHost *:18010&gt;</pre><pre># Include “/opt/bitnami/apps/edx/conf/httpd-cms.conf”</pre><pre># &lt;/VirtualHost&gt;</pre><p>Configure a virtual host for the CMS/Studio:</p><pre>&lt;VirtualHost *:80&gt;</pre><pre>    ServerName studio.example.com</pre><pre>    Include “/opt/bitnami/apps/edx/conf/httpd-cms.conf”</pre><pre>&lt;/VirtualHost&gt;</pre><p>Turn of rewriting of lms.example.com/edx-studio to lms.example.com:18010 in file ~/apps/edx/conf/httpd-lms.conf:</p><pre># Enable some basic redirections</pre><pre># RewriteEngine On</pre><pre># RewriteRule ^/edx-studio(/.*)? http://%{SERVER_NAME}:18010/ [R,L]</pre><p>Go to file ~/apps/edx/conf/lms.env.json and make the appropriate changes:</p><pre>“CMS_BASE”: “studio.example.com”</pre><pre>“LMS_BASE”: “lms.example.com”</pre><pre>“LMS_INTERNAL_ROOT_URL”: “http://lms.example.com&quot;,</pre><pre>“LMS_ROOT_URL”: “http://lms.example.com&quot;,</pre><pre>“LOGIN_REDIRECT_WHITELIST”: [ “studio.example.com” ]</pre><pre>“SESSION_COOKIE_DOMAIN”: “.example.com”</pre><p>Go to file ~/apps/edx/conf/cms.env.json and make the appropriate changes:</p><pre>“CMS_BASE”: “studio.example.com”</pre><pre>“LMS_BASE”: “lms.example.com”</pre><pre>“LMS_INTERNAL_ROOT_URL”: “http://lms.example.com&quot;,</pre><pre>“LMS_ROOT_URL”: “http://lms.example.com&quot;,</pre><pre>“LOGIN_REDIRECT_WHITELIST”: [ “studio.example.com” ]</pre><pre>“SESSION_COOKIE_DOMAIN”: “.example.com”</pre><p>Restart services:</p><pre>$ sudo /opt/bitnami/ctlscript.sh restart apache</pre><pre>$ sudo /opt/bitnami/ctlscript.sh restart edx</pre><p>And we’re done!</p><p>To continue and set up HTTPS on your Open edX installation have a look at this <a href="https://medium.com/@ranwar/how-to-set-up-https-on-open-edx-d93f1f495b22">article</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63e2426256ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Instalasi Magento 2 di Ubuntu 16.04]]></title>
            <link>https://ranwar.medium.com/instalasi-magento-2-di-ubuntu-16-04-55842574088c?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/55842574088c</guid>
            <category><![CDATA[magento-2]]></category>
            <category><![CDATA[installation]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[magento]]></category>
            <category><![CDATA[magento-installation]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Fri, 24 May 2019 10:21:05 GMT</pubDate>
            <atom:updated>2019-05-24T10:26:03.821Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Yb6HQ0vNLHE8TAxN" /><figcaption>Photo by <a href="https://unsplash.com/@nikhita?utm_source=medium&amp;utm_medium=referral">Nikhita Singhal</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://magento.com/">Magento</a> adalah platform e-commerce open-source paling populer di dunia saat ini.</p><p>Di sini akan kita bahas cara instalasi Magento 2 pada sistem operasi Linux Ubuntu 16.04.</p><h4>LAMP dan PHP 7.2</h4><p>Pertama-tama, mari kita pastikan apakah Apache, MySQL dan PHP (LAMP stack) sudah terinstal pada Ubuntu 16.04 yang akan kita gunakan untuk Magento 2. Jika LAMP belum terpasang silakan gunakan petunjuk di bawah ini untuk menginstalnya:</p><p><a href="https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04">How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04 | DigitalOcean</a></p><p>Karena PHP yang akan kita gunakan adalah versi 7.2 dan Ubuntu 16.04 tidak menggunakan PHP 7.2 lihat petunjuk di bawah ini untuk memasang PHP 7.2 pada Ubuntu 16.04:</p><p><a href="https://www.liquidweb.com/kb/install-php-7-2-ubuntu-16-04/">How to Install PHP 7.2 on Ubuntu 16.04 | Liquid Web</a></p><p>Setelah instalasi selesai edit nilai memory_limit pada file php.ini:</p><pre>memory_limit=768MB</pre><p>Save file php.ini lalu ketik:</p><pre>$ sudo systemctl restart apache2</pre><p>untuk restart Apache web server.</p><p>Jika Anda tidak mengetahui di mana letak file php.ini yang dimaksud, ketik</p><pre>$ php --ini</pre><p>pada command-line interface (CLI) Linux untuk melihat di mana file php.ini terletak di filesystem.</p><p>Selanjutnya pastikan loadable extensions (modules) php di bawah ini semua sudah terinstal:</p><ul><li>ext-bcmath</li><li>ext-ctype</li><li>ext-curl</li><li>ext-dom</li><li>ext-gd</li><li>ext-hash</li><li>ext-iconv</li><li>ext-intl</li><li>ext-mbstring</li><li>ext-openssl</li><li>ext-pdo_mysql</li><li>ext-simplexml</li><li>ext-soap</li><li>ext-spl</li><li>ext-xsl</li><li>ext-zip</li><li>lib-libxml</li></ul><p>Untuk memeriksa apakah modules PHP di atas sudah terinstal dengan benar, buatlah file info.php di DocumentRoot Apache yg isinya:</p><pre>&lt;?php phpinfo(); ?&gt;</pre><p>dan arahkan browser ke <a href="http://hostname/info.php">http://hostname/info.php</a> sehingga muncul:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2BcY48UYuEVryLtlF8hqkQ.png" /><figcaption>Ouput dari file info.php</figcaption></figure><p>Pastikan bahwa semua modules yang tertulis di daftar di atas muncul di sini.</p><h4>MySQL</h4><p>Buat username dan database di MySQL:</p><pre>mysql&gt; CREATE USER &#39;catalog&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;password&#39;;<br>mysql&gt; GRANT ALL PRIVILEGES ON catalogdb.* TO &#39;catalog&#39;@&#39;localhost&#39;;<br>mysql&gt; FLUSH PRIVILEGES;<br>mysql&gt; CREATE DATABASE catalogdb;</pre><h4>Composer</h4><p>Cek apakah Composer sudah terinstal pada sistem:</p><pre>$ composer -V<br>Composer version 1.8.5 2019-04-09 17:46:47</pre><p>Jika belum ada silakan instal dengan cara:</p><pre>$ php -r &quot;copy(&#39;https://getcomposer.org/installer&#39;, &#39;composer-setup.php&#39;);&quot;<br>$ php -r &quot;if (hash_file(&#39;sha384&#39;, &#39;composer-setup.php&#39;) === &#39;48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5&#39;) { echo &#39;Installer verified&#39;; } else { echo &#39;Installer corrupt&#39;; unlink(&#39;composer-setup.php&#39;); } echo PHP_EOL;&quot;<br>$ php composer-setup.php<br>$ php -r &quot;unlink(&#39;composer-setup.php&#39;);&quot;</pre><h4>Authentication Keys</h4><p>Authentication keys diperlukan untuk mengunduh dan menginstal Magento 2. Silakan ikuti ini untuk mendapatkan authentications keys mu:</p><p><a href="https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html">Get your authentication keys</a></p><h4>Unduh Magento 2 menggunakan Composer</h4><p>Masuklah ke directory DocumentRoot web server Apache Anda lalu ketik:</p><pre>$ composer create-project --repository=https://repo.magento.com/ magento/project-community-edition &lt;nama-directory-instal&gt;</pre><h4>Atur Permission File-File Magento 2</h4><p>Dari directory DocumentRoot:</p><pre>$ sudo usermod -g www-data ${USER}<br>$ sudo chown -R :www-data<br>$ sudo find . -type d -exec chmod 770 {} \;<br>$ sudo find . -type f -exec chmod 660 {} \;<br>$ find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +<br>$ find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +<br>$ chmod u+x bin/magento</pre><h4>Instal Magento 2</h4><p>Arahkan browser ke <a href="http://hostname/">http://hostname/</a> dan halaman instalasi Magento 2 akan muncul di layar. Ikuti petunjuk instalasi hingga selesai dan di layar terlihat pesan bahwa instalasi sudah sukses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*azd3ql-z0FjeNcHCNe_NjQ.png" /><figcaption>Instalasi Magento 2 berhasil</figcaption></figure><h4>Instal Magento 2 Cron</h4><p>Dari directory DocumentRoot:</p><pre>$ php bin/magento cron:install</pre><p>Untuk memastikan apakah cron sudah terpasang dengan benar ketik:</p><pre>$ crontab -l<br>* * * * * /usr/bin/php7.2 /MAGENTO_HOME/bin/magento cron:run 2&gt;&amp;1 | grep -v &quot;Ran jobs by schedule&quot; &gt;&gt; /MAGENTO_HOME/var/log/magento.cron.log<br>* * * * * /usr/bin/php7.2 /MAGENTO_HOME/update/cron.php &gt;&gt; /MAGENTO_HOME/var/log/update.cron.log<br>* * * * * /usr/bin/php7.2 /MAGENTO_HOME/bin/magento setup:cron:run &gt;&gt; /MAGENTO_HOME/var/log/setup.cron.log</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55842574088c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Menggunakan Mallet untuk Berkomunikasi Dengan Testnet IELE Cardano]]></title>
            <link>https://ranwar.medium.com/menggunakan-mallet-untuk-berkomunikasi-dengan-testnet-iele-cardano-97e927a3451f?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/97e927a3451f</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[iele]]></category>
            <category><![CDATA[cardano]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Mon, 12 Nov 2018 15:22:08 GMT</pubDate>
            <atom:updated>2018-11-13T08:25:27.993Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-Kzk3BsuEDewEo17" /><figcaption>“worm&#39;s eye-view photography of ceiling” by <a href="https://unsplash.com/@sortino?utm_source=medium&amp;utm_medium=referral">Joshua Sortino</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Testnet Cardano</h3><p><a href="https://www.cardano.org/en/home/"><strong>Cardano</strong></a> adalah blockchain publik sekaligus platform smart contract yang menawarkan fitur-fitur yang lebih canggih dibandingkan protokol-protokol yang pernah dikembangkan sebelumnya.</p><p>Saat ini ada dua testnet Cardano yang dapat digunakan untuk men-deploy dan mengeksekusi smart contracts yaitu <a href="https://testnet.iohkdev.io/kevm/">testnet KEVM</a> dan <a href="https://testnet.iohkdev.io/iele/">IELE</a>. Testnet KEVM adalah testnet untuk mencoba smart contracts yang dibuat untuk Ethereum Virtual Machine (EVM) sedangkan testnet IELE adalah virtual machine smart contract pertama yang menggunakan formal semantics yang dikembangkan untuk tujuan memberikan keamanan dan kinerja lebih baik.</p><h3>Mallet</h3><p>Mallet adalah ‘minimum wallet’, sebuah command-line utility untuk men-deploy smart contracts dan berinteraksi dengan testnet KEVM dan IELE. Mallet ditulis dalam Javascript dan dibuat berdasarkan Node.js REPL sehingga dapat memberikan akses pada fungsi-fungsi praktis dan juga berbagai jenis library seperti Web3. Selain itu Mallet dapat digunakan sebagai library untuk program-program yang dibangun dengan Javascript.</p><h3>Environment</h3><p>Contoh-contoh di bawah dijalankan di <a href="http://releases.ubuntu.com/16.04/">Ubuntu 16.04</a>.</p><h3>Instalasi Mallet</h3><p>Mallet memerlukan Node.js versi 10.4.0 atau lebih. Jika Node.js belum terpasang <a href="https://develoka.com/article/mengelola-banyak-versi-node-dalam-satu-mesin-sDuMV">gunakan nvm</a> untuk <a href="https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/">menginstalnya</a>.</p><p>Untuk mendapatkan versi teranyar dari Mallet, clone repo GitHub-nya:</p><pre>$ git clone <a href="https://github.com/input-output-hk/mallet">https://github.com/input-output-hk/mallet</a></pre><p>Lalu ketik:</p><pre>$ cd mallet<br>$ npm install</pre><p>Perintah ini akan mengunduh Mallet dan menginstalnya beserta dependencies-nya.</p><p>Setelah selesai, cek instalasi dengan mengetik:</p><pre>$ ./mallet --help</pre><p>Jika help message Mallet muncul seperti di bawah ini maka instalasi telah berhasil.</p><pre>mallet 2.1.0 - command line utility for KEVM/IELE testnets</pre><pre>USAGE</pre><pre>  mallet &lt;testnet&gt;</pre><pre>ARGUMENTS</pre><pre>  &lt;testnet&gt;      JSON RPC endpoint to connect. Possible values are: &#39;kevm&#39;, &#39;iele&#39;, or a custom HTTP(S) URL      required</pre><pre>OPTIONS</pre><pre>  -d, --datadir      Specify data directory      optional      default: &quot;/home/ubuntu/.mallet2&quot;</pre><pre>GLOBAL OPTIONS</pre><pre>  -h, --help         Display help<br>  -V, --version      Display version<br>  --no-color         Disable colors<br>  --quiet            Quiet mode - only displays warn and error messages<br>  -v, --verbose      Verbose mode - will also output debug messages</pre><p>Apabila ada error sehubungan dengan bignumber.js seperti:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0MnL6XpE2AfXuQjWHkbr5Q.png" /></figure><p>Instal bignumber.js:</p><pre>$ npm i bignumber.js@2.0.7</pre><p>Kemudian periksa kembali instalasi dan pastikan help message Mallet muncul seperti di atas.</p><h3>Command-Line Interface (CLI)</h3><p>CLI Mallet dapat digunakan untuk:</p><ul><li>Berkomunikasi dengan testnet</li><li>Membuat account</li><li>Meminta token dari faucet</li><li>Compile smart contract</li><li>Deploy smart contract ke testnet</li><li>Mengeksekusi smart contract</li></ul><p>Jalankan Mallet dan hubungkan ke testnet IELE:</p><pre>$ ./mallet iele</pre><p>Prompt Mallet akan muncul:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tN1FiHC2GI8U8WtG-lCLzg.png" /></figure><p>yang berarti Mallet siap untuk digunakan.</p><h3>Perintah-perintah (Commands) Mallet</h3><h4>Bantuan</h4><p><strong>help</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZfNjzZKKL8W-4WG0AqRKA.png" /></figure><p>memanggil README file Mallet yang ada di:</p><pre>$ <a href="https://github.com/input-output-hk/mallet/blob/master/README.md">https://github.com/input-output-hk/mallet/blob/master/README.md</a></pre><p><strong>listCommands</strong> memperlihatkan semua perintah yang dapat digunakan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jcacqNtuqV7KNdIrTCsB0g.png" /></figure><h4>Manajemen Account</h4><p><strong>newAccount</strong> membuat account baru (membuat key pair untuk sebuah account baru). Private key dari key pair disimpan di datadir (yang default-nya di ~/.mallet2) dan dienkripsi dengan password yang diberikan. newAccount memberikan alamat account yang baru dibuat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*op2rhF9kgw3VM8NoN1GYGg.png" /></figure><p>Dalam hal ini account yang baru dibuat mempunyai alamat: 0x38e9cdff00b3e2820069cc4b624d9811f3d0ad01</p><p><strong>listAccounts</strong> menampilkan alamat dari semua account yang ada.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zhSLe3PNjseDtsRlqSAZSA.png" /></figure><p><strong>selectAccount</strong> memilih account untuk perintah-perintah seperti <strong>iele.simpleTransfer</strong>, <strong>getBalance</strong>, <strong>requestFunds</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hZU5hToC7OtcDeQVyLnGWg.png" /></figure><p><strong>currentAccount</strong> mengecek account mana yang sedang di-select.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VRR3N-giiw9G8Z9Ow-FPuA.png" /></figure><h4>Komunikasi Dengan Testnet</h4><p><strong>getBalance</strong> menampilkan saldo sebuah account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b79pshMMa13oEqo3BkA-hA.png" /></figure><p>Saldo account 0x38e9cdff00b3e2820069cc4b624d9811f3d0ad01 adalah nol.</p><p><strong>requestFunds</strong> memanggil <a href="https://testnet.iohkdev.io/iele/faucet/">Faucet</a> dari testnet guna meminta dana bagi sebuah account. requestFunds akan mengembalikan hash dari transaksi tersebut. Terlihat di sini bahwa saldo account bertambah setelah perintah requestFunds dieksekusi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QW6x_wdX9KmvTYwwunfIBg.png" /></figure><p>Detil transaksi ini (0xeee1e76c5e062dad0619a4d928042af1c4470b70b8ea58edfb0575ea6d87086f) dapat dilihat di <a href="https://testnet.iohkdev.io/iele/explorer/">testnet blockchain explorer</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZoJ0mqMM38d1zZESoKDphg.png" /></figure><p>dengan cara mem-paste hash transaksi tersebut ke search box lalu menekan tombol ‘Search’.</p><h4>Perintah-perintah IELE</h4><p><strong>iele.simpleTransfer</strong> mentransfer nilai dari satu account ke account lainnya dan mengembalikan hash dari transaksi tersebut.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DdDpe82igtMu6zgVa3dfuA.png" /></figure><p>Transaksi terlihat di testnet explorer seperti:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y1YXc6eKZfT722SRhXrhSw.png" /></figure><p>Di artikel berikutnya akan kami jelaskan bagaimana men-deploy smart contract ke testnet IELE.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97e927a3451f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blockchain Bencana]]></title>
            <link>https://ranwar.medium.com/blockchain-bencana-88963dcf46f0?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/88963dcf46f0</guid>
            <category><![CDATA[bencana]]></category>
            <category><![CDATA[gempa]]></category>
            <category><![CDATA[dokumentasi]]></category>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Sat, 06 Oct 2018 16:23:20 GMT</pubDate>
            <atom:updated>2018-10-07T04:15:24.508Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*no0N9bY7Yo36aEGn" /><figcaption>“sepia photography of bare trees” by <a href="https://unsplash.com/@dikaseva?utm_source=medium&amp;utm_medium=referral">Dikaseva</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Beberapa hari belakangan ini saya mendapat pesan viral di WhatsApp Messenger yang tampaknya muncul sehubungan dengan <a href="https://id.wikipedia.org/wiki/Gempa_bumi_Lombok_Juli_2018">dua</a> <a href="https://www.bbc.com/indonesia/indonesia-45756518">bencana</a> alam yang baru-baru ini terjadi di Indonesia. Bunyinya adalah sebagai berikut:</p><blockquote><strong>Dokumentasikan Surat-surat Penting</strong></blockquote><blockquote>( utk yg blm back up Dok)</blockquote><blockquote>Dengan begitu seringnya bencana alam terjadi akhir-akhir ini, alangkah baiknya jika kita melakukan persiapan untuk jaga-jaga kemungkinan terburuk itu terjadi..yaitu dengan cara back up dokumen-dokumen penting seperti</blockquote><blockquote>1. KTP / Passport / SIM</blockquote><blockquote>2. Akte Kelahiran</blockquote><blockquote>3. Kartu Keluarga</blockquote><blockquote>4. Ijazah</blockquote><blockquote>5. Surat nikah</blockquote><blockquote>6. Sertifikat rumah</blockquote><blockquote>7. BPKB &amp; STNK</blockquote><blockquote>8. Buku rekening</blockquote><blockquote>9. Dokumen legalitas perusahaan (untuk yang punya usaha sendiri)</blockquote><blockquote>Karena dokumen-dokumen tersebut akan sangat dibutuhkan setelah kondisi normal lagi.</blockquote><blockquote>Berikut cara-cara untuk back up dokumen-dokumen tersebut =</blockquote><blockquote>1. Scan semua dokumen penting</blockquote><blockquote>2. Simpan file dokumen tersebut di flash disk / hard disk</blockquote><blockquote>3. Selain itu simpan file dokumen tersebut di storage online seperti google drive / dropbox / cloud.</blockquote><blockquote>4. Share nama dan password akun kita hanya ke keluarga inti kita saja. Hal ini untuk jaga-jaga jika terjadi sesuatu kepada kita, dan keluarga kita sangat membutuhkan dokumen-dokumen tersebut.</blockquote><blockquote>5. Jika ingin lebih aman lagi, sebelum file-file tersebut diupload ke storage online maka bisa memakai zip / rar kemudian di password yang berbeda dengan password akun.</blockquote><blockquote>Dengan adanya backup online ini maka kita bisa buka atau print dokumen kita dimana dan kapan saja tanpa harus bingung apabila dokumen asli dan fotokopinya hilang atau rusak.</blockquote><blockquote>Silahkan dishare informasi ini agar bisa bermanfaat bagi banyak orang. Karena terkadang yang sepele itu sering dilupakan orang namun sangat dibutuhkan suatu saat nanti.</blockquote><p>Biasanya saya tidak begitu menaruh perhatian pada pesan-pesan viral yang masuk ke handphone tapi kali ini terlihat ada beberapa hal menarik setelah saya simak pesannya.</p><p>Pesan ini mengingatkan kita untuk mem-<em>backup</em> dokumen-dokumen penting yang kita miliki dengan cara men-<em>scan</em>-nya dan menyimpannya di berbagai jenis media penyimpanan elektronik. Cara yang praktis namun memiliki beberapa kelemahan. Setelah dokumen-dokumen di-<em>scan</em> dan disimpan apa yang menjamin bahwa selama dalam penyimpanan tidak ada data maupun <em>scan</em> dokumen yang berubah? Pada saat diperlukan bagaimana kita dapat membuktikan bahwa dokumen-dokumen yang kita simpan adalah dokumen yang otentik?</p><p>Teknologi blockchain memiliki peluang untuk memecahkan masalah ini karena data pada blockchain dapat diverifikasi keotentikannya dan kepemilikannya. Sebagai contoh sudah ada perusahaan startup di AS yang mengembangkan teknologi ini untuk <a href="https://www.coindesk.com/startup-puts-academic-diplomas-blockchain-raises-3-million/">menyimpan ijazah</a>. Atau di Republik Georgia yang menggunakan blockchain sebagai <a href="https://exonum.com/napr">tempat pencatatan akta tanah</a>. Bahkan bantuan bencana pun dapat <a href="https://www.digitalistmag.com/improving-lives/2017/11/23/blockchain-for-disaster-relief-creating-trust-where-it-matters-most-05527536">diperlancar dengan pemanfaatan teknologi blockchain</a> karena berbagai pihak yang memberikan pertolongan dapat terkoordinir dalam sebuah jejaring yang terdesentralisasi.</p><p>Ide-ide beserta penerapan-penerapannya yang memanfaatkan teknologi blockchain utk mendukung berbagai jenis penanganan sehubungan dengan bencana alam dapat bermanfaat sekali terutama untuk negara-negara seperti Indonesia yang berada di dalam kawasan <em>Ring of Fire</em> atau Cincin Api Pasifik.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88963dcf46f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Virtual Machine untuk Blockchain Cardano]]></title>
            <link>https://ranwar.medium.com/virtual-machine-untuk-blockchain-cardano-925903cdf12b?source=rss-1f0be2ad0e28------2</link>
            <guid isPermaLink="false">https://medium.com/p/925903cdf12b</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[cardano]]></category>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[mesin-virtual]]></category>
            <dc:creator><![CDATA[Reza]]></dc:creator>
            <pubDate>Mon, 03 Sep 2018 23:26:13 GMT</pubDate>
            <atom:updated>2018-09-05T01:10:05.392Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fn3yl4SPFdKrCW9QiRG-g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/PmrwuizKUq0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Aaron Barnaby</a> on <a href="https://unsplash.com/search/photos/advanced-engine?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><em>Smart contract</em> adalah program komputer yang disimpan pada blockchain yang dapat digunakan untuk mengimplementasikan beragam jenis kontrak keuangan. Seperti halnya progam-program komputer pada umumnya smart contracts pun berpotensi untuk mempunyai celah keamanan. Perbedaannya adalah jika pada sebuah smart contract ditemukan bug yang dapat membuka jalan untuk pihak-pihak yang memiliki tujuan jahat untuk mengeksploitirnya kerusakan yang ditimbulkan biasanya berhubungan langsung dengan <a href="https://www.wired.com/2016/06/50-million-hack-just-showed-dao-human/">jumlah uang yang sangat besar</a>.</p><p>Eksekusi kode program smart contract pada blockchain dilakukan oleh <em>virtual machine</em> atau mesin virtual yang sendirinya adalah sebuah program komputer yang juga berpotensi mempunyai celah keamanan yang timbul dari bugs di kode programnya. Oleh karena itu penting bagi kita untuk memilih teknologi virtual machine (VM) yang tepat agar resiko yang dapat ditimbulkan oleh eksekusi smart contract yang berpotensi berbahaya dapat diperkecil.</p><p>IELE adalah sebuah virtual machine yang didesain khusus untuk mengeksekusi smart contracts pada blockchain. Desain, definisi dan implementasinya dilakukan menggunakan standar matematika tertinggi dengan pendekatan <em>semantics-first</em> dan verifikasi smart contracts sebagai objektif utama. IELE mengeliminir <em>constructs</em> berpotensi berbahaya yang terdapat pada VM lain seperti Ethereum Virtual Machine (EVM) yang dapat menimbulkan bugs seperti <em>integer overflow</em> dan memanggil <em>library contracts</em>, misalnya.</p><p>IELE mempermudah pemrograman smart contracts yang aman. Selanjutnya karena implementasinya dihasilkan secara otomatis melalui suatu framework bernama K berdasarkan <em>formal semantics</em> maka dimungkinkan untuk dilakukan verifikasi formal pada smart contracts yg dijalankan di atas IELE untuk memperkuat kepastian bahwa smart contracts tersebut didukung keamanannya karena sudah <em>correct by construction</em>.</p><p>Saat ini sudah tersedia compiler dari Solidity ke IELE dan selanjutnya akan menyusul compiler untuk bahasa-bahasa lainnya termasuk <a href="https://cardanodocs.com/technical/plutus/introduction/">Plutus</a>, bahasa <em>pure functional programming</em> yang dapat meningkatan lagi jaminan bagi keamanan smart contract yang Anda tulis. Silakan akses <a href="https://testnet.iohkdev.io/iele/">testnet IELE</a> jika Anda ingin mencobanya.</p><p>Pemilihan teknologi virtual machine pada blockchain besar pengaruhnya pada keamanan smart contracts yang akan digunakan pada blockchain tersebut. <a href="https://www.cardano.org/en/home/">Blockchain Cardano</a> menggunakan sebuah teknologi virtual machine mutakhir bernama <a href="https://runtimeverification.com/blog/iele-a-new-virtual-machine-for-the-blockchain/">IELE</a> yang mendukung pemrograman smart contracts yang <em>correct by construction</em> untuk meningkatkan jaminan keamanannya.</p><p><a href="https://www.cardano.org/en/home/"><strong>Cardano</strong></a> adalah blockchain yang menawarkan fitur-fitur terdepan dibanding protokol-protokol blockchain lain sebelumnya. Cardano adalah platform blockchain pertama yang dikembangkan berdasarkan filosofi sains dan pendekatan riset ilmiah.</p><p>Tautan:</p><p><strong>K framework</strong>: <a href="https://runtimeverification.com/blog/k-framework-an-overview/">https://runtimeverification.com/blog/k-framework-an-overview/</a></p><p><strong>Jawaban beberapa pertanyaan seputar smart contracts Cardano</strong>: <a href="https://medium.com/@emurgo_io/iele-gas-model-compiling-8-questions-developers-might-be-asking-about-cardano-smart-contracts-3b667cc41a7">https://medium.com/@emurgo_io/iele-gas-model-compiling-8-questions-developers-might-be-asking-about-cardano-smart-contracts-3b667cc41a7</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=925903cdf12b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>