Where It All Started.

Where It All Started.

Life, Stock Trading, Investments, Business and Startup. Most are programming stuff.

Year: 2020

Creating A Cloudflare Worker Using Rust For Fetching Resources

To learn something new, you need to try new things and not be afraid to be wrong.

— Roy T. Bennett.

Have you ever worked on Web Assembly? Now is a good time, first because its already supported by your browser from Chromium based (e.g. Edge, Brave, Google Chrome) to Firefox and its enabled by default since 2019. Plus you can use your favorite language (technically not all) to develop web assembly.

In this quick tutorial we will be using Rust, not the game though.

Ferris, the Rust language mascot.

Ferris saying hello 👋.
Come on, let’s jump in! 💪

Prerequisites

First of all, you must have a Cloudflare account. Second, the Rust tool chain installed in your computer and I also assumed you are currently running Windows 10 or a Linux distro with proper environment set.

If you don’t have Rust, go to this link in order to install it. And for the Cloudflare account, basically just use the free tier which gives you 100,000 worker calls per day and a free Key-Value (KV) storage.

So where do we start?

The first thing we need to do, is to install wrangler which is a command-line tool specifically developed by Cloudflare to complement the deployment and development of Workers. Install the wrangler tool using the cargo command utility.

cargo install wrangler

The command above will first fetch the source from crates.io and compile it as binary. The command will also automatically install it on your ~/.cargo/bin directory.

💡: Cloudflare Worker is similar to AWS Lambda and Azure Cloud Function. They’re both under the serverless computing category.

After the installation of wrangler, you need to authenticate using your Cloudflare account API key, on which you can get on the user settings panel.

wrangler login

If all works well, the next thing we need to do is to generate the cargo project using the wrangler command line. Execute the code below to generate a cargo project using the Rust WASM worker template:

wrangler generate worker_fetch_demo https://github.com/cloudflare/rustwasm-worker-template.git --type="rust"

After that, go inside the folder named worker_fetch_demo to edit the file cargo.toml . Add the following crate dependencies.

cfg-if = "0.1.2"
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
console_error_panic_hook = { version = "0.1.1", optional = true }
wee_alloc = { version = "0.4.2", optional = true }
futures = { version = "0.3", default-features = false }
js-sys = "0.3.45"
wasm-bindgen-futures = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "^1.0.59"
serde_json = "1.0"
log = "0.4"
console_log = { version = "0.2", optional = true }

The wasm-bindgen package is the most important, as that is what links the package to call to JavaScript scopes and other web and web assembly related functionalities. You also need to add the web-sys package as that will provide basic mapping and calls to JavaScript functions.

You’ll be able to get to know what the other package are for, if you’ve already read the Rust Programming Language Book.

[dependencies.web-sys]
version = "0.3.45"
features = [
  'Headers',
  'Request',
  'RequestInit',
  'Response',
  'ServiceWorkerGlobalScope',
]

After adding those crate dependencies it will automatically be fetched on build or upon call to cargo update .

Next thing we modify is the file worker > worker.js . This file serves as the main entry-point of our program that will call our compiled wasm files. We need to add minor modification to it, specifically capturing request and serving the wasm response as JSON.

async function handleRequest(request) {
  const { test } = wasm_bindgen;
  await wasm_bindgen(wasm);

  const data = await test();
  return new Response(JSON.stringify(data), {
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    status: 200,
  });
}

We move on now to the rust files. 🦀

On the file src > lib.rs add the following code, this particular instruction will add a basic initialization for our console log (similar to JavaScript console.log ) if the console_log dependency is present.

cfg_if! {
    if #[cfg(feature = "console_log")] {
        fn init_log() {
            console_log::init_with_level(Level::Trace).expect("error initializing log");
        }
    } else {
        fn init_log() {}
    }
}

Next, we add a function that will hook to js_sys to return the ServiceWorkerGlobalScope.

Specifically on Cloudflare, the normal browser fetch call won’t work, as the workers run on headless V8 JavaScript engine. That’s why we need to hook on internal HTTP client for service workers.

pub fn worker_global_scope() -> Option<web_sys::ServiceWorkerGlobalScope> {
    js_sys::global().dyn_into::<web_sys::ServiceWorkerGlobalScope>().ok()
}

After adding our worker_global_scope , we proceed with editing the greet function. First, rename it to run then add our first instruction to hook rust panic to console_error . Then call init_log to initialize basic logging functionality.

std::panic::set_hook(Box::new(console_error_panic_hook::hook));
init_log();

Then we initialize our request with the method GET, you could also use other HTTP methods (e.g. POST, PUT, DELETE, …). The method depends on your application needs and endpoints you want to call.

let mut opts = RequestInit::new();
opts.method("GET");

Next, will be creating the request payload that we will submit to our custom fetch. The instruction will contain the endpoint and request options.

let request = Request::new_with_str_and_init(
    "https://httpbin.org/get",
    &opts
)?;

After finishing that, we will now scope and call the function we created earlier. Then we wrap it in a future (asynchronous method calls similar to JavaScript promise if your much more familiar in that term) .

let global = worker_global_scope().unwrap();
let resp_value = JsFuture::from(global.fetch_with_request(&request)).await?;

assert!(resp_value.is_instance_of::<Response>());
let resp: Response = resp_value.dyn_into().unwrap();
let json = JsFuture::from(resp.json()?).await?;

On the returned response, unwrap it and return its JSON value.

Here is our full wasm function that will be called on our worker.js that we defined earlier above.

#[wasm_bindgen]
pub async fn test() -> Result<JsValue, JsValue> {
    std::panic::set_hook(Box::new(console_error_panic_hook::hook));
    init_log();

    let mut opts = RequestInit::new();
    opts.method("GET");

    let request = Request::new_with_str_and_init(
        "https://httpbin.org/get",
        &opts
    )?;

    let global = worker_global_scope().unwrap();
    let resp_value = JsFuture::from(global.fetch_with_request(&request)).await?;

    assert!(resp_value.is_instance_of::<Response>());
    let resp: Response = resp_value.dyn_into().unwrap();
    let json = JsFuture::from(resp.json()?).await?;

    Ok(json)
}

Now, we need to test it, to see if everything’s okay. Spin up a local server using the following command below.

wrangler dev

Test everything and try to call the URL returned by wrangler dev using Postman or Insomnia HTTP client. If everything is working fine, its now time to deploy the worker to live server.

wrangler publish

After running the command above, it will return a live worker URL which you can now access everywhere.

That’s all guys!

Conclusion

You can found the complete repository here.

This is not the only way to call fetch on Cloudflare worker rust, the other method involves in hooking directly to JavaScript exposed fetch (kindly look at Cloudflare example files). If you have any questions kindly leave a comment or DM me 😉.

Follow me for similar article, tips, and tricks ❤.

Top 10 NMAP Flags That I Use Daily

It is not the monsters we should be afraid of; it is the people that don’t recognize the same monsters inside of themselves.

— Shannon L. Alder.

If you’re a network IT (Information Technology) engineer or cybersecurity professional for sure you’d know about the tool nmap.

The tool nmap which stands for network mapper 1 is an open source tool for network discovery and is mostly use for security auditing. Been using this tool for many years and this are my favorite command line flags:

Skip reverse DNS call

This is a helpful flag specially if you don’t want that additional millisecond of fetching records from a DNS server. Or you have a specific case scenario that involves using only internal cached host file.

nmap -n scanme.nmap.org

Stop ping checks

The -PN flag specifically tells nmap that the host is online, skipping check if its alive through ping2. This is particularly useful in situation where you know the target is blocking all ICMP (Internet Control Message Protocol)3 in firewall.

nmap -PN scanme.nmap.org

Fingerprint scan

This -sV flag is useful specially in network auditing and determining if there are any ports available. The command will probe the target machine ports availability and guess the service (including the service version) that is running.

nmap -sV scanme.nmap.org

Finding live host

This command is specifically useful for network engineers to know if there are any alive host on the network. The notation below tells to scan the specific subnet4 using ICMP protocol and return the list of host that responded.

nmap -sP 192.168.1.1/24

Scan using specified network interface

If you have multiple NIC’s (Network Interface Controller)5 and you want to route the scan to a specific NIC, then this is the solution. Normally nmap or any other tool that utilize the computer network would use the OS designated network route (normally determined by network table and preferred gateway). The -e flag tells nmap to use that specific network controller to perform/resolve the scan.

nmap -e eth0 scanme.nmap.org

SYN ping scans

The SYN scan specifically tries to send request packets to target machine and check if it accepts the request packets. Mostly this is one of the default alternative ways of checking if the host is alive.

nmap -sP -PS scanme.nmap.org

ACK ping scans

The ACK scan is the opposite of SYN. In which this particular scan sends and ACK or (acknowledge) packet to the target machine if it will respond. Most modern firewalls block this if its not associated in a three way handshake.

nmap -sP -PA scanme.nmap.org

UDP port scans

This UDP6 port/ping scan is helpful when you know the target machine only blocks TCP packets. This specific flag sends a UDP packet to ports available on the machine and check’s if the target machine responds.

nmap -sP -PU scanme.nmap.org

IP (Internet Protocol) ping scans

Actually, this particular scan is special as its send IP packets to the specified IP protocol number in their IP header. It’s kinda special in a sense that if you didn’t supply a protocol type it will send multi-packets ICMP, IGMP, and IP-in-IP packet.

nmap -sP -PO scanme.nmap.org

ARP ping scans

This particular scan is mostly useful in LAN scenario. As you send an ARP packet it will return specific address or addresses that consumed the broadcast request.

nmap -sP -PR scanme.nmap.org

Mostly, that’s all. I’ve used other flags but this are my most used command flags for nmap.


  1. Nmap (Network Mapper) is a free and open-source network scanner created by Gordon Lyon (also known by his pseudonym Fyodor Vaskovich). ↩︎
  2. Ping measures the round-trip time for messages sent from the originating host to a destination computer that are echoed back to the source. The name comes from active sonar terminology that sends a pulse of sound and listens for the echo to detect objects under water. ↩︎
  3. The Internet Control Message Protocol (ICMP) is a supporting protocol in the Internet protocol suite. It is used by network devices, including routers, to send error messages and operational information indicating success or failure when communicating with another IP address, for example, an error is indicated when a requested service is not available or that a host or router could not be reached. ↩︎
  4. A subnetwork or subnet is a logical subdivision of an IP network. ↩︎
  5. A network interface controller (NIC, also known as a network interface card, network adapter, LAN adapter or physical network interface, and by similar terms) is a computer hardware component that connects a computer to a computer network. ↩︎
  6. The User Datagram Protocol (UDP) is one of the core members of the Internet protocol suite. The protocol was designed by David P. Reed in 1980 and formally defined in RFC 768. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network. Prior communications are not required in order to set up communication channels or data paths. ↩︎

Change Default Template In Inkscape For Windows 10

Recently, I’ve been doing some vector and animations, It’s for my new android app for the stock market. Every time I open Inkscape1, it always greeted me with the default template the next thing I do is change the document properties to the way I want, and it became a chore.


Every child is an artist. The problem is how to remain an artist once we grow up.

— Pablo Picasso.

So I searched the internet on how to basically set the default template to my liking.

Steps to change the default template

  1. Create a new document and set its document properties which can be found on File > Document Properties.
  2. It will show a simple dialog which is this.
  1. In the dialog do what to your liking. Modify it base on what you want to see everytime you open Inkscape.
  2. After that, do a File > Save As... and save it to your local user inkscape directory which will be in C:\Users\<your-user>\AppData\Roaming\Inkscape\template
  1. Save it as default.svg. Then restart Inkscape for changes to take effect.

Enjoy that’s all. 🍂


  1. Inkscape is a free and open-source vector graphics editor used to create vector images, primarily in Scalable Vector Graphics (SVG) format. Other formats can be imported and exported. ↩︎

Winnie The Pooh Quotes That Inspires Me

Hey guys, been back after a few months since COVID-19 started. So what am I up to recently? Currently started writing in Medium, but still this blog will be my main blog. I’ll duplicate my post here and put as canonical link to my medium article. You’re braver than you believe, stronger than you seem, smarter than you think, and loved more than you’ll ever know.

Yes you are! a great motivation quote to love yourself more. A friend is one of the nicest things you can have and one of the best things you can be.

Sometimes, a friend is all you need. A friend can help you lift up your mood, but still its your life that depends on your own action. How do you spell love? You don’t spell it, you feel it.

I agree with this one, loving don’t come with a plan you just go with it and feel it. Life is a journey to be experienced, not a problem to be solved.

Go on road trips, and long beach walks. Some people think they’re job is all, for me I only work to live not the other way around. If there ever comes a day that we cannot be together, keep me in your heart, I’ll stay there forever.

For me this is more like a love quote, but here depicts a lifelong friendship.
You know lifelong friend is hard to find especially when you are going to adulthood. As soon as I saw you, I knew an adventure was going to happen.

Sometimes, sometimes not. It all depends on the person POV. How lucky I am to have something that makes saying goodbye so hard.

Can be said on a lover, rather than a friend. As a true friend will always be there and sometimes they don’t say goodbye, most probably see you when I see you. Any day spent with you is my favorite day. So today is my new favorite day.

Sometimes I think Winnie the Pooh is in love with Christopher Robin. Am I right? The story of the hundred acre wood. If you live to be 100, I want to be 100 minus 1 day so I would never have to live a day without you.

Same as the above, most of this is a quote that can be said to a lover rather than a friend. Sometimes the smallest things take up the most room in your heart.

Yes, I’ve experienced this personally smallest things make the most value.
Sometimes. One of the advantages of being disorganized is that one is always having surprising discoveries.

Ahaha. Clutter and dirt on attic. Being disorganized means probably you don’t have a plan and will just go with it. We didn’t realize we were making memories, we just knew we were having fun.

Time spent having fun, is time well spent. Experience life no just on a small smartphone screen. Go out with your love ones and enjoy. I think we dream so we don’t have to be apart so long. If we’re in each other’s dreams, we can be together all the time.

Sometimes its NSFW dreams. Always keep safe guys.

That’s all I have guys, hopefully this quotes will also inspire you. Follow me on twitter, instagram, also subs if you like.

Find Public IP in Linux Using CLI

A musician must make music, an artist must paint, a poet must write, if he is to be ultimately at peace with himself. What a man can be, he must be

— Abraham Maslow.

Hey guys, ever been in a situation you need to query your public WAN IP without any browser. Glad you came to the right post.

Prerequisites

  • dig – Dig stands for (Domain Information Groper) is a network administration command-line tool for querying Domain Name System (DNS) name servers. It is useful for verifying and troubleshooting DNS problems and also to perform DNS lookups and displays the answers that are returned from the name server that were queried.
  • curl – cURL is a computer software project providing a library and command-line tool for transferring data using various network protocols. The name stands for “Client URL”, which was first released in 1997.
  • wget – GNU Wget is a computer program that retrieves content from web servers. It is part of the GNU Project. Its name derives from World Wide Web and get. It supports downloading via HTTP, HTTPS, and FTP. Its features include recursive download, conversion of links for offline viewing of local HTML, and support for proxies.

What are the ways to find my IP?

Here are ways to find your own public IP from the terminal.

First is using OpenDNS servers. The OpenDNS servers are always free and a toolkit for a network engineer.

dig +short myip.opendns.com @resolver1.opendns.com

If resolver1 isn’t responding try the resolver2 to get your query.
Also you could achieve this query using Google’s nameservers.

dig TXT +short o-o.myaddr.l.google.com @ns1.google.com

The second is using curl or wget which is more common on many distro’s without installing any other packages. While this is much slower in resolving, the tools used is much more common.

curl https://ipinfo.io/ip

For wget command just replace the curl word above.

Conclusion

I haven’t listed all the ways, as there are many ways to achieve this. But all this commands have been tested and used by me several times, it always save my ass when there’s a problem. If you have additional command that you want to share DM me at @ffimnsr.

Reset Start Menu Layout Windows 10

Success is neither magical nor mysterious. Success is the natural consequence of consistently applying basic fundamentals.

— E. James Rohn.

Just recently on my Windows workstation a bug occurred on which the Recycle Bin doesn’t refresh its icon on desktop. I know for a fact that I’ve recently deleted some file so there should be contents inside the bin.

Let’s jump in!

What are the steps to reset explorer?

Here are the steps I’ve created for when I do not need to restart the PC to reset overall explorer settings or when its has flaw.

  1. Open the “Run command” window by pressing WIN+R.
    (i.e. hold down the Windows key and then press R.)
  2. Type cmd at the prompt, and press Enter.
  3. Wait for the command prompt to open.
    (It will be a flashing cursor block.)
  4. At the command prompt, type this: taskkill /IM explorer.exe /F You should notice these all vanish: Start Menu, Taskbar, any open File Explorer windows.
  5. Type this at the command prompt explorer.exe. Now those components should all load back in.
  6. Close the command prompt and try the Start Menu or Desktop. Hopefully it should have refreshed.

That’s it all done!

Conclusion

If there is a bug, there is always a workaround. Anyways, I’ve already reported the bug Microsoft feedback.

Follow me for similar tips and tricks at @ffimnsr.

Sending Email Using MailKit in ASP.NET Core Web API

You do not need to know precisely what is happening, or exactly where it is all going. What you need is to recognize the possibilities and challenges offered by the present moment, and to embrace them with courage, faith and hope.

— Thomas Merton.

Hey guys, recently I’ve been working on an ASP.NET Core project that needed email services to send reports. And I’ve been dumbfounded by some tutorial on how they implemented the email service functionality. Some are over complicated while others were over simplified.

So here I am creating yet another tutorial for sending email using MailKit and .NET Core.

Let’s jump in!

Prerequisites

First of all, you must have a .NET Core 3.1 SDK (Software Development Kit) installed in your computer and also I assumed you are currently running Windows 10 or some Linux with proper environment set.

And MailKit on which this package becomes a de-facto standard in sending emails as its being preferred and recommended by Microsoft in their tutorials over the standard System.Mail.Net .

So where do we start?

First we create our ASP.NET Web API project on the command-line. Execute the command below to create the project.

dotnet new webapi --name MyProject

The dotnet new command creates a project folder base on the declared template on which in our case is webapi . The --name flag indicates that the next argument would be its output path and project name.

After that go inside the project root folder. Then we add a reference to MailKit nuget package to project. If the project already reference the MailKit then try running dotnet restore to get and update the reference assemblies locally.

dotnet add package MailKit

Then we create and add the SMTP ( Simple Mail Transfer Protocol) settings to the appsettings.json and appsettings.Development.json . In the example below I’ve used Gmail setup, just fill it up with your own account settings and be sure to use an app password in the password field.

If you have a custom SMTP server just replace the port and server as well as other needed fields.

"SmtpSettings": {
  "Server": "smtp.gmail.com",
  "Port": 587,
  "SenderName": "My Name",
  "SenderEmail": "<my-account-user>@gmail.com",
  "Username": "<my-account-user>@gmail.com",
  "Password": "<my-account-password>"
}

Create an entity structure which will store the SMTP settings. This structure will receive the settings we setup above in the appsettings.json .

namespace MyProject.Entities
{
    public class SmtpSettings
    {
        public string Server { get; set; }
        public int Port { get; set; }
        public string SenderName { get; set; }
        public string SenderEmail { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
    }
}

Next is we setup the mailer interface to provide to our controllers. This IMailer interface exposes one method just to send email asynchronously. You can add more methods but I feel one is enough.

public interface IMailer
{
    Task SendEmailAsync(string email, string subject, string body);
}

Implement the mailer class structure with basic defaults, and after that try and build it, check if there are any error. Check if linting provides any warning or programming mistakes.

public class Mailer : IMailer
{
    public async Task SendEmailAsync(string email, string subject, string body)
    {
        await Task.Completed;
    }
}

If all things implemented properly, we create the template sender functionality. This method will accept recipient email, the subject of the email and the message body.

using MailKit.Net.Smtp;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using MimeKit;
using System;
using System.Threading.Tasks;
using MyProject.Entities;

namespace MyProject.Services
{
    public interface IMailer
    {
        Task SendEmailAsync(string email, string subject, string body);
    }

    public class Mailer : IMailer
    {
        private readonly SmtpSettings _smtpSettings;
        private readonly IWebHostEnvironment _env;

        public Mailer(IOptions<SmtpSettings> smtpSettings, IWebHostEnvironment env)
        {
            _smtpSettings = smtpSettings.Value;
            _env = env;
        }

        public async Task SendEmailAsync(string email, string subject, string body)
        {
            try
            {
                var message = new MimeMessage();
                message.From.Add(new MailboxAddress(_smtpSettings.SenderName, _smtpSettings.SenderEmail));
                message.To.Add(new MailboxAddress(email));
                message.Subject = subject;
                message.Body = new TextPart("html")
                {
                    Text = body
                };

                using (var client = new SmtpClient())
                {
                    client.ServerCertificateValidationCallback = (s, c, h, e) => true;

                    if (_env.IsDevelopment())
                    {
                        await client.ConnectAsync(_smtpSettings.Server, _smtpSettings.Port, true);
                    }
                    else
                    {
                        await client.ConnectAsync(_smtpSettings.Server);
                    }

                    await client.AuthenticateAsync(_smtpSettings.Username, _smtpSettings.Password);
                    await client.SendAsync(message);
                    await client.DisconnectAsync(true);
                }
            }
            catch (Exception e)
            {
                throw new InvalidOperationException(e.Message);
            }
        }
    }
}

In the source above we create first a MimeMessage which contains all the needed data for an email body and header, it contains MAIL FROM, RCPT TO , and DATA .

After that we setup SMTP client with the fields we setup in our appsettings.json . The client.AuthenticateAsync can be omitted if the SMTP server doesn’t have an authentication flow.

When everything is done in Mailer, we now edit the Startup.cs file in project root folder. We then insert SMTP settings parser and initialize a singleton object that will handle mail service in ConfigureServices .

services.Configure<SmtpSettings>(Configuration.GetSection("SmtpSettings"));
services.AddSingleton<IMailer, Mailer>();

After setting up the services in startup, we head onto the WeatherForecastController.cs which is included when we bootstrap the project. This files are part of the webapi template, you can use your own custom controller function to call on the IMailer interface.

private readonly IMailer _mailer;

public WeatherForecastController(ILogger<WeatherForecastController> logger, IMailer mailer)
{
    _logger = logger;
    _mailer = mailer;
}

Look on how we add the IMailer mailer variable as this becomes available for us when we did setup and add a singleton object in our startup. We then store the variable in our private variable for future usage.

We also create another method to handle new route /export for sending temporary weather report. Change it according to your own setup.

[HttpGet]
[Route("export")]
public async Task<IActionResult> ExportWeatherReport()
{
    await _mailer.SendEmailAsync("[email protected]", "Weather Report", "Detailed Weather Report");
    return NoContent();
}

In the code above we simply insert the mailer and called our exposed method SendEmailAsync . Check the full source below for details on what to packages needed to import on the module.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using MyProject.Services;

namespace MyProject.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class WeatherForecastController : ControllerBase
    {
        private static readonly string[] Summaries = new[]
        {
            "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
        };

        private readonly ILogger<WeatherForecastController> _logger;
        private readonly IMailer _mailer;

        public WeatherForecastController(ILogger<WeatherForecastController> logger, IMailer mailer)
        {
            _logger = logger;
            _mailer = mailer;
        }

        [HttpGet]
        public IEnumerable<WeatherForecast> Get()
        {
            var rng = new Random();
            return Enumerable.Range(1, 5).Select(index => new WeatherForecast
            {
                Date = DateTime.Now.AddDays(index),
                TemperatureC = rng.Next(-20, 55),
                Summary = Summaries[rng.Next(Summaries.Length)]
            })
            .ToArray();
        }

        [HttpGet]
        [Route("export")]
        public async Task<IActionResult> ExportWeatherReport()
        {
            await _mailer.SendEmailAsync("[email protected]", "Weather Report", "Detailed Weather Report");
            return NoContent();
        }
    }
}

When everything’s done we build and test the web API project. Execute the code below to check if there are any errors.

dotnet build

Then deploy or publish it on IIS (Internet Information Services), or rather just run it in isolated form which you can use dotnet run .

Conclusion

If you’re doing an email service always consider to make it as simple as possible to avoid any unintended bugs. Sending emails has never been easier this time around and you don’t need complicated flows as we switch to MailKit.

You can found the complete repository here .

Follow me for similar article, tips, and tricks ❤.

Haylou GT1 Fix Earbuds Pairing

Push yourself, because no one else is going to do it for you.

— Anonymous.

I’ve recently bought an Haylou GT1 earbuds (this are China manufactured earbuds). The earbuds was good but after a few weeks on using it on multiple devices, suddenly the earbuds doesn’t pair on each other. After searching some manuals I’d found out that there are steps to pair them back again. So this is just a small compilation of what I did.

  1. First, remove your earbuds from its casing (they were off and just turned on).
  2. Turn them off by touching them for 3 seconds (a red LED will blink once it turned off).
  3. When both the earbuds are already not running, touch both of the earbuds at the same time and wait for 20 seconds
  4. The earbuds LED should blink red and white at around 15 seconds and then it would blink again in 20 seconds mark (make sure both earbuds blinks twice)
  5. Return both earbuds back into its case.
  6. Then on your phone’s Bluetooth settings delete the pairing connection you’ve done before specifically for this device.
  7. Pull out the earbuds from their case and wait for them to pair.
  8. On your phone connect to the Haylou-GT1_R device. I’ve specifically specified the Haylou-GT1_R as this is the fastest out of the two earbuds to pair.

When all that is done, you’ve now completely restored your earbuds pairing to one another. So guys, if you have any question? just message me on my social media accounts and as always leave life.

Hope you guys, enjoyed this article! 😘

Headache And P90X Training

Today I woke up early with a mild headache. Even though I do have a mild headache, I still continue my early workout routine. I’ve mostly finish my 4×3 push-up reps, and some ab core cruncher. I usually followed the P90X (a commercial exercise which is popular around 2007’ish) routine.

Later afternoon, I went back to coding my own project. Then I saw a YT (YouTube) video on how to dance the hip-hop style. Tried the a few beginner dance step, it was easy. It was just 3 form dance pose routine that anyone could do. I dance and followed the tutorial for about an hour and practice it for another hour or so. Its not that hard so I didn’t sweat a lot, one thing I notice is I’m kinda slow or having some delay when following the dance instructions and doing the formations.

At night, mostly I just worked on my own project then at dinner time just ordered some food on a fast food chain. I think that sums up all the things I did this day.

❌ Originally posted on January 24, 2020.

I’ve Discovered 8D Surround Sound! And It’s Amazing!

Today I’ve started doing some exercise (some basics stretching and push ups). Then after that I’ve played some music on my laptop. Most of the music I’ve played were EDM (Electronic Dance Music) genre on 8D surround sound, I’ve tried to dance to it but I failed horribly.

At around 8am, I’ve started cleaning the outer room. I’ve moped the tile floors till it became white again. Four hours passed after cleaning, a Shopee (an e-commerce site that is popular on Southeast Asia) delivery guy arrived to deliver a package that I’ve ordered last week. You know what is interesting in that event is when I asked the price, the delivery guy said its 215 pesos. I went back into my room to get my money pouch, I’ve checked my phone and to my disbelief that the actual price was 200 pesos only. I’ve told him about the price indicated on the app, suddenly he changed his statement. What the fudge, that cheap sore guy trying to rip me off.

At 3 PM PST (Philippine Standard Time), I’ve started to work on my day job. Then at the evening started to code back to my own project. Its around 2 AM now next day as I write this journal.

❌ Originally posted on January 23, 2020.