Skip to main content

Posts

CI/CD for .NET Core

If you have a .NET API that you want to containerize, here are the steps to prepare it. Create docker image Push to repository Setup ECS The TLS 1.0 option is needed if your SQL Server database does not support TLS 1.2. The recommended option is to update your database to the secure protocol. You may also change sdk and aspnet version to 5.0 if you haven't updated to 6.0 yet. This Dockerfile uses a multi-stage build to get an optimal image size. Dockerfile FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /app # Copy csproj and restore as distinct layers COPY *.csproj ./ RUN dotnet restore # Copy everything else and build COPY . ./ RUN dotnet publish -c Release -o out # Build runtime image FROM mcr.microsoft.com/dotnet/aspnet:6.0 WORKDIR /app # Enable TLS 1.0 RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /etc/ssl/openssl.cnf RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@
Recent posts

Creating a Google Account Using Your Work Email

Ever had a colleague invite you to collaborate on a Google Doc using your work email and get prompted to request access using your gmail account? To avoid this, you can create a Google account using your work email (e.g. @xyzcorp.com) instead of the default @gmail.com or subscribing to GSuite. When your work email is a Google account, you can use it to login wherever there is a prompt for a Google account (Google Drive, Google SSO Login - Gitlab, Trello, Airtable, Jira, Clubhouse, etc.). 1. In your browser, set to Incognito mode and go to   https://drive.google.com 2. Click on Create account -> For myself 3. Click on “Use my current email address instead” and type your work email. Fill in the other fields, then click on next. After doing this, your work email is now a Google account and you can be invited to collaborate on other Google services.

Get uptime alerts in Telegram

You will be configuring 3 services. The assumption is that you have accounts already for these services. UptimeRobot — source of the uptime/downtime notifications. It currently supports email, Twitter, Slack, Pushover, Pushbullet and others but not Telegram. We will use the webhook notification as the way to send messages to Telegram. IFTTT — bridges UptimeRobot and Telegram by providing the webhook for UptimeRobot and triggering a message to Telegram. In IFTTT terminology: IF {event trigger from UptimeRobot}, then {send message to Telegram group} Telegram — destination of the notification. You will need to create a group for this. Telegram Configuration In Telegram, create a new group, if needed. You may opt to use an existing group. Go to @IFTTT and follow the instruction so link your Telegram account to your IFTTT account. Send /connect_group to @IFTTT and connect the group where you want to send the notifications. IFTTT Configuration Sign in to IFTTT and add a ne

How to get Google Play Music trial

  Google has a 4th of July weekend promotion where you can get 4 months of free Google Play Music. This is only available to US. So if you are in the Philippines, you can try the following steps to get the promotion. (documentation in progress, trying to retrace how I did it) Download Opera developer browser which has a free VPN. Turn on VPN. Go to wallet.google.com and click on the settings button on the right. Change the country to US and type in any US address. (Zip code 91505 is Burbank, California) Go to play.google.com and you should see the 4th of July promotion banner. Click on that. This will take you to music.google.com. Follow the subscribe instructions and enter a payment method. PayPal worked for me. I had some issues with some accounts that were solved by clearing the browser data and trying again.

Getting Started with R

The easy way to get started with R is to use RStudio. You will need to install both R and RStudio. Here are the software packages you need to install: Windows http://cran.csie.ntu.edu.tw/ http://www.rstudio.com/products/rstudio/download/ Mac OSX http://xquartz.macosforge.org/landing/ http://cran.csie.ntu.edu.tw/ http://www.rstudio.com/products/rstudio/download/ You will need access to the internet to download R packages. If you need to configure a proxy, in RStudio, you will need to edit the environment text file: file.edit('~/.Rprofile') In that file, you will need to add the following settings: Mac OSX: Sys.setenv(http_proxy="http://proxy:8080") Windows: http_proxy=http://proxy:8080 Instructions were based from the following articles: https://support.rstudio.com/hc/en-us/articles/200488488-Configuring-R-to-Use-an-HTTP-Proxy http://www.kenbenoit.net/how-to-set-proxy-settings-for-r-mac-osx/ Once you have set up internet access, you s

Classifieds Scam

Here's an actual scam attempt that I encountered. The pattern is similar and looks believable. The general steps: Scammer will signify interest in purchasing item. Scammer will say he is working for some non-profit and wants to buy the item for a fiance who is in South Africa. He will ask you to calculate the shipping cost via Fedex and will say he plans to pay by PayPal. Once you give the shipping cost, he will ask for the email where he will send the PayPal payment. He will then say he will make the payment now and ask you to check your email for the PayPal. You will receive an email from service@paypal. If you are using Gmail, this will likely be flagged as a phishing email in the Spam folder. Notice that the email will have typos and will ask that you send the tracking number to ppalonlinecare@mail2consultant.com or something other than paypal.com. The general content of this bogus email is that this is a new PayPal policy and that the funds will only transferred to you o