Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Globalization;
// CultureInfo culture = new CultureInfo("en-US");
// Full-date notation as defined by RFC 3339, section 5.6, for example, 2024-03-28
string date1 = string.Format("{0:yyyy}-{0:MM}-{0:dd}", DateTime.Now);

Convert video to a Twitter-friendly format

Simple, but with minimum modification:

ffmpeg -i "input.mp4" -pix_fmt yuv420p -vcodec libx264 "output.mp4"

Resizes the video and may better support encodings:

File Operations in C++

Reading a file into a string variable

#include <iostream>
#include <fstream>
using namespace std;

fstream file("", fstream::in);

PHP FFI - Using a C++ DLL with C bindings with MinGW-64


  • MinGW-64


On Windows:

odan / unbloat.bat
Last active May 12, 2024 12:25
Remove Windows Bloatware
@echo off
winget list
winget uninstall "Solitaire & Casual Games"
winget uninstall "Microsoft Kontakte"
winget uninstall "Movies & TV"
winget uninstall "News"
winget uninstall "Get Help"
winget uninstall "Microsoft People"
odan /
Last active January 10, 2023 15:07
MySqlMigrationSqlGenerator Example

MySqlMigrationSqlGenerator Example

dotnet add package MySql.Data.EntityFramework
using System.Configuration;
using System.Data;
using System.Data.Common;

Creating a ASP.NET Core Web API from scratch

Requires .NET 8 SDK

dotnet new sln -o MyApi
cd MyApi

dotnet new webapi -o MyApi


CPU Memory

NES Mega Man 5

  • $00B0: M. Buster - 00 to 9C (max)
  • $00BD: Number of E energy tanks - 80 to 89
  • $00BE: Number of M - 80 to 89
  • $00BF: Number of lives - 00 to 09