Skip to content

Instantly share code, notes, and snippets.

View markylaredo's full-sized avatar
:shipit:
Love coding 🧔💪🫰

> _markylaredo markylaredo

:shipit:
Love coding 🧔💪🫰
View GitHub Profile
@markylaredo
markylaredo / redshift.conf
Created July 5, 2024 03:08
Ubuntu redshift config
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5500
temp-night=3500
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=0
@markylaredo
markylaredo / dev.sh
Last active May 14, 2024 08:25
.net core dev script
#!/bin/bash
# Function to display the menu
function show_menu {
echo "1. Run Project with 'dotnet watch --no-hot-reload'"
echo "2. Build Project with 'dotnet build'"
echo "3. Publish Project"
echo "4. Add Migration"
echo "5. Remove Migrations"
echo "6. Update Database"

Abstract

This is a full guide for people who wanted to setup Windows 10/11 VM with QEMU/KVM hypervisor for laptops that configured with hybrid graphics card like Intel/AMD + NVIDIA. This process will take about 1 to 2 hours, depending on your system's performance.

There is another comprehensive guide you can follow here (shoutout to asus-linux team). It is more up-to-date than mine. I'll probably incorporate those information to my guide, but you are welcome to use this one as a reference!

Before we proceed:

  • This guide is exclusively for Fedora because this distro is quite different to set up than other distro such as Arch. I would say Arch is easier to setup than Fedora, but sometimes your prefer Fedora than Arch in terms of its usage & features.
  • This tutorial mostly focus on laptops with NVIDIA Optimus MUXed configuration when dGPU (dedicated GPU) can connect directly to HDMI/DP output. If in doubt, sea
@markylaredo
markylaredo / checkbook_balancer.c
Created January 15, 2024 14:33
Simple Checkbook Balancer in C
#include <stdio.h>
int main() {
float initial_balance = 0.0;
float current_balance = initial_balance;
float transaction;
printf("Enter deposits and issuances (terminate with 0):\n");
do {
@markylaredo
markylaredo / jquery-textarea-sample.html
Last active June 15, 2023 10:30
Prevent Copy-Paste in Textarea
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jquery-textarea</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js"
integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
@markylaredo
markylaredo / CBM_Calculator.html
Last active May 1, 2023 11:23
This is a simple JavaScript program that calculates the total freight volume, weight (in pounds), volumetric weight for sea shipment
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CBM Calculator</title>
</head>
<body>
@markylaredo
markylaredo / node_nginx_ssl.md
Created June 15, 2022 03:23 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@markylaredo
markylaredo / AdbCommands
Created March 2, 2022 05:49 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@markylaredo
markylaredo / countries.csv
Created January 12, 2022 16:59 — forked from zspine/countries.csv
Country Code, ISO and Nationality ( Please use https://mledoze.github.io/countries/ )
CCA2 Name CCA3 Nationality
AD Andorra AND Andorran
AE United Arab Emirates ARE Emirati
AF Afghanistan AFG Afghan
AG Antigua and Barbuda ATG Antiguan, Barbudan
AI Anguilla AIA Anguillian
AL Albania ALB Albanian
AM Armenia ARM Armenian
AN Netherlands Antilles ANT Dutch
AO Angola AGO Angolan
@markylaredo
markylaredo / Web.config
Created February 3, 2021 09:42
IIS Web configuration for SPA websites
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">