Skip to content

Instantly share code, notes, and snippets.

View augustoproiete's full-sized avatar
👨‍💻
shipping it :shipit: from home 🏠

C. Augusto Proiete augustoproiete

👨‍💻
shipping it :shipit: from home 🏠
View GitHub Profile
@augustoproiete
augustoproiete / month-name-in-portuguese-using-liquid-jekyll.liquid
Last active March 8, 2019 19:14
Printing month name in Portuguese using Liquid/Jekyll
{% 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
public class PhatomReferenceQueue<THandle>
{
private BlockingCollection<THandle> _queue = new BlockingCollection<THandle>();
private ConditionalWeakTable<object, PhatomReference> _refs = new ConditionalWeakTable<object, PhatomReference>();
public void Register(object instance, THandle handle)
{
_refs.Add(instance, new PhatomReference(this, handle));
}
@augustoproiete
augustoproiete / GitHub-Forking.md
Created January 25, 2018 04:08 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@augustoproiete
augustoproiete / github-wiki-how-to.md
Created August 24, 2017 14:33
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com/myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo.

How do I add images to a wiki page?

You need to clone the wiki repo and edit it on your system.

@augustoproiete
augustoproiete / ExcelHelper.cs
Created December 5, 2016 19:27 — forked from garethhayter/ExcelHelper.cs
Get version, filepath, bitness of installed versions of Excel
/**** 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
@augustoproiete
augustoproiete / testharness.py
Created July 9, 2016 15:01 — forked from tintoy/testharness.py
Logging to Seq from Python 3
#!/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",
@augustoproiete
augustoproiete / gist:4958139
Created February 15, 2013 02:23
tracert -h 60 216.81.59.173
Tracing route to FIN [216.81.59.173]
over a maximum of 60 hops:
1 1 ms <1 ms <1 ms 192.168.42.1
2 11 ms 8 ms 37 ms 216.249.32.150
3 15 ms 28 ms 22 ms 66.55.118.63
4 22 ms 14 ms 17 ms eHEX-ce-01.northrock.bm [66.55.117.47]
5 106 ms 157 ms 344 ms eNYC-ce-01.northrock.bm [66.55.117.50]
6 62 ms 52 ms 52 ms core1.nyc4.he.net [198.32.118.57]
7 57 ms 50 ms 44 ms 10gigabitethernet2-3.core1.ash1.he.net [72.52.92.86]
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace Caio.Proiete.Utils
{
public class SilentProcessRunner : IDisposable
{
@augustoproiete
augustoproiete / gist:7e37ab5209a1a47d6ab0
Last active November 30, 2015 18:54 — forked from nblumhardt/gist:07c8046ffdcbd3d6b1fa
Configuring Serilog w/ AppSettings and Seq

1. Install Serilog.Extras.AppSettings

PM> Install-Package Serilog.Extras.AppSettings

2. Add the 'read' method to logger config

... = new LoggerConfiguration()