View ReadingPortableExecutable_PE_header.cs
// Credits: John Stewien
// From: http://code.cheesydesign.com/?p=572
/*
Reading the Portable Executable (PE) header in C#
My job consists of writing fully custom applications for groups of people. The time pressure of these projects is quite high, so generally people start using the application while I’m still writing it, which means I write it modularly and add features as I go along. I also fix bugs as they are discovered. My clients are 2 tiered where expert users get a new build first, they test if for a while, and if they think it’s acceptable they then pass it on to others.
This method of distribution is quite ad-hoc so when a client rings me up and asks me to view their screen to look at something, it’s useful to know what build they are running. To facillitate this I print the link date in the main Window Title so I instantly have an idea about how old the version is that I am looking at. This date is calculated at run time. To do this requires reading in the Portable Executable (PE) header from th
View ExcelHelper.cs
/**** Requires PeHeaderReader to determine bitness: http://code.cheesydesign.com/?p=572 ****/
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.AccessControl;
/// <summary>
/// See: http://support.microsoft.com/kb/240794
View detectfx.cpp
#include <stdio.h>
#include <windows.h>
#include <tchar.h>
#include <strsafe.h>
#include <mscoree.h>
// In case the machine this is compiled on does not have the most recent platform SDK
// with these values defined, define them here
#ifndef SM_TABLETPC
#define SM_TABLETPC 86
View testharness.py
#!/usr/bin/env python3
import datetime
import logging
import requests
# Well-known keyword arguments used by the logging system.
_well_known_logger_kwargs = [
"extra",
"exc_info",
View month-name-in-portuguese-using-liquid-jekyll.liquid
{% assign m = page.date | date: "%-m" %}
{% capture month_name_pt %}
{% case m %}
{% when '1' %}Janeiro
{% when '2' %}Fevereiro
{% when '3' %}Março
{% when '4' %}Abril
{% when '5' %}Maio
{% when '6' %}Junho
{% when '7' %}Julho
View Liquid for Designers.md
View SimpleHttpServer.cs
using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Net;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using Westwind.Utilities;
namespace Westwind.WebConnection
View SilentProcess.cs
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace Caio.Proiete.Utils
{
public class SilentProcessRunner : IDisposable
{
View App.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="custom1:serilog:minimum-level" value="Warning" />
<add key="custom2:serilog:minimum-level" value="Error" />
</appSettings>
</configuration>
View keybase.md

Keybase proof

I hereby claim:

  • I am caioproiete on github.
  • I am caioproiete (https://keybase.io/caioproiete) on keybase.
  • I have a public key whose fingerprint is 06E3 2C7B EE28 4DE5 F315 B43B 8BB1 65D1 FD13 745D

To claim this, I am signing this object: