Skip to content

Instantly share code, notes, and snippets.

View trcio's full-sized avatar

patricio trcio

  • Texas
  • 07:14 (UTC -05:00)
View GitHub Profile
@trcio
trcio / instructions.md
Created February 10, 2021 06:01 — forked from richlander/instructions.md
Installing .NET Core 3.0 on Linux ARM64

Installing .NET Core on Linux ARM64

The following intructions can be used to install .NET Core on Linux ARM64.

Pro tip: Check out .NET Core Docker files to determine the exact instructions for installing .NET Core builds, for example .NET Core 3.1 ARM32 SDK Dockerfile.

Installing .NET Core Globally

The following instructions install the latest .NET Core globally. It isn't required to do that, but it provides the best experience.

@trcio
trcio / CLIParserAndTokenizer.cpp
Last active February 16, 2019 03:44
SE 3377 CLI Parser and Tokenizer
#include <iostream>
#include <iomanip>
#include <list>
#include <stack>
#include <string>
using namespace std;
enum class TokenType
{
@trcio
trcio / SpeedyClient.cs
Created July 27, 2014 21:05
Adds speed/time remaining to the ProgressChangedEventArgs of a webclient
using System;
using System.Net;
using System.ComponentModel;
using System.Diagnostics;
namespace SpeedClient
{
public delegate void SpeedyDownloadProgressChangedEventHandler(SpeedyDownloadProgressChangedEventArgs e);
public delegate void SpeedyUploadProgressChangedEventHandler(SpeedyUploadProgressChangedEventArgs e);
@trcio
trcio / LineGraph.cs
Last active January 7, 2018 07:20
A really nice looking line graph to present your data
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Globalization;
using System.Linq;
using System.Windows.Forms;
public sealed class LineGraph : Control
{
@trcio
trcio / GAuthProvider.cs
Last active September 23, 2017 17:26
A small, lightweight class to create codes for use with the Google Authenticator app
using System;
using System.Linq;
using System.Security.Cryptography;
using System.Web;
namespace GAuthWrapper
{
public static class GAuthProvider
{
public static int CodeLength { get; set; }
@trcio
trcio / NetsealProvider.php
Last active January 31, 2017 12:02
Scroll all the way down for an example - A wrapper for Netseal's new v2 API - http://seal.nimoru.com/docs/index.php
<?php
// Created by Positron Software
// Wraps all endpoints described at http://seal.nimoru.com/docs/index.php
// Last updated 11/23/2016
class NetsealProvider
{
const ENDPOINT = 'http://seal.nimoru.com/Remote2/';
@trcio
trcio / JsonUtil.cs
Last active August 28, 2016 23:33
An easy to use JSON serializer/deserializer. Requires the assembly reference of 'System.Runtime.Serialization'.
using System.Runtime.Serialization.Json;
using System.IO;
using System.Text;
public static class JsonUtil
{
/// <summary>
/// Serializes an object to the respectable JSON string.
/// </summary>
public static string Serialize<T>(T o)
@trcio
trcio / NetsealProvider.php
Last active July 21, 2016 01:18
Netseal's PHP wrapper is dreadful, so I remade it
<?php
class NetsealProvider {
const ENDPOINT = 'http://seal.nimoru.com/';
const LICENSE_FREE = 0;
const LICENSE_BRONZE = 1;
const LICENSE_SILVER = 2;
const LICENSE_GOLD = 3;
const LICENSE_PLATINUM = 4;
@trcio
trcio / TablessControl.cs
Created November 12, 2015 04:03
Hide your tab selectors at runtime
class TablessControl : TabControl
{
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x1328 && !DesignMode)
m.Result = new IntPtr(1);
else
base.WndProc(ref m);
}
}
@trcio
trcio / ColorExtensions.cs
Created November 10, 2015 01:04
Saturate a color through an extension
public static class ColorExtensions
{
public static Color Saturate(this Color color, float coef)
{
return Color.FromArgb((int)(color.R * coef), (int)(color.G * coef), (int)(color.B * coef));
}
}