Skip to content

Instantly share code, notes, and snippets.

View ivandrofly's full-sized avatar

Ivandro Jao ivandrofly

View GitHub Profile
@ivandrofly
ivandrofly / multiple-ssh-keys-git.adoc
Created December 21, 2024 01:05 — forked from alejandro-martin/multiple-ssh-keys-git.adoc
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

When publishing an application using JetBrains Rider, you are essentially deploying your application so that it can be run independently of the development environment. The publish mode offers a variety of options to tailor the deployment process according to your needs. Here are the key options and settings you will encounter in Rider's publish mode:

  1. Target Framework:

    • This specifies the .NET framework version your application will run on. You can select from multiple versions depending on your project's requirements.
  2. Configuration:

    • Common options include Debug and Release. The Release configuration typically includes optimizations suitable for a production environment.
  3. Target Runtime:

  • Defines the platform your application is being deployed to, such as win-x64, linux-x64, or osx-x64.
@ivandrofly
ivandrofly / ilopcodes.md
Created July 25, 2024 09:16 — forked from KaanGaming/ilopcodes.md
Useful IL opcodes

Useful IL Opcodes

IL opcodes documentation designed with dynamically building assemblies in C# in mind. This documentation implies you know the basics of C# and programming fundamentals, but not how a computer operates at the deep level of understanding (e.g. stacks, heap, instructions, opcodes, etc.)

What's IL?

If you don't know what IL is, it stands for Intermediate Language, also referred to as Common Intermediate Language (CIL). CIL is the one that's used in generating IL code for dynamic assemblies in C#.

@ivandrofly
ivandrofly / Srp-By-Zoran-Horvat.cs
Last active September 10, 2023 04:23
Keep an Eye on SRP - That Might Just Save Your Broken Code Base
// https://youtu.be/vTnlFdRf1Kc
var martinFowler = new Person(10, "Martin Fowler);
var server = new DemoDiscountServer(person);
var book = new Book("Design Patern", new List<Person>{martinFowler});
var discountApplications = server.GetDiscountAmounts(10, new DiscountContext(book))
public interface IDiscount
@ivandrofly
ivandrofly / ebu country of origin.json
Created October 27, 2020 09:33
The three-letter (Alpha-3) codes given in the table below are those used in the Country of Origin (CO) field of the GSI block. The 2 character codes and 4 character codes given are from the current ISO Standard 3166-3. The country names indicated here are not necessarily the official names of the countries or territories. The information given h…
[
{
"CO": "ABW",
"CountryName": "Aruba",
"TwoLettersCode": "AW"
},
{
"CO": "AFG",
"CountryName": "Afghanistan",
"TwoLettersCode": "AF"
@ivandrofly
ivandrofly / [subtitleedit]-language.cs
Created March 19, 2017 05:39
shotter way to set value from xml reader
private static void SetValue(Language language, XmlReader reader, string name)
{
// Note: Not yet tested!
var path = name.Split('/');
var currentType = typeof(Language);
// get 1st prop => General -> General/Title
System.Reflection.PropertyInfo propInfo = currentType.GetProperty(path[0]); // if Name/type then -> Name
for (int i = 1; i < path.Length; i++)
{
propInfo = propInfo.DeclaringType.GetProperty(path[i]);
@ivandrofly
ivandrofly / expression-tree.cs
Created March 18, 2017 16:41
this method is written to fix Subtitle Edit's GetRegExContextMenu(Combobox/TextBox) nightmare
// this method is written to fix Subtitle Edit's GetRegExContextMenu(Combobox/TextBox) nightmare
// make more sense as an extension method.
public static Action<TControl, string> BuildContextMenuRegex<TControl>()
{
var setMethod = typeof(TControl).GetProperty("SelectedText").GetSetMethod();
var instanceParam = Expression.Parameter(typeof(TControl), "instance");
var regexTokenParam = Expression.Parameter(typeof(string), "regexToken");
var lambaExp = Expression.Lambda<Action<TControl, string>>(Expression.Call(instanceParam, setMethod, regexTokenParam), instanceParam, regexTokenParam);
return lambaExp.Compile();
using System.Security.Cryptography;
using System.Text;
namespace Snippets
{
public static class SHA1Util
{
/// <summary>
/// Compute hash for string encoded as UTF8
/// </summary>
@ivandrofly
ivandrofly / Unicode table
Created May 4, 2014 02:20
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character: