Skip to content

Instantly share code, notes, and snippets.

View viniciusjarina's full-sized avatar
😊

Vinicius Jarina viniciusjarina

😊
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@dongle-the-gadget
dongle-the-gadget / MainWindow.xaml
Last active November 24, 2022 10:24
WinUI 3 + Windows.UI.Composition
<Window
x:Class="WinUIThreeTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUIThreeTest"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<SwapChainPanel Name="SwapChainPanel">
@viniciusjarina
viniciusjarina / VSCodeSettings.json
Last active November 19, 2021 04:59
VSCodeSettings.json
{
"editor.fontSize": 16,
"editor.renderWhitespace": "all",
"workbench.colorTheme": "Visual Studio Light",
"telemetry.enableTelemetry": false,
"workbench.editor.enablePreview": false,
"explorer.confirmDelete": false,
"search.quickOpen.includeHistory" : false
}
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active April 23, 2024 12:18
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@viniciusjarina
viniciusjarina / PSProfile.ps1
Last active January 26, 2021 16:04
~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Set-Alias -Name "open" -Value "explorer"
Import-Module 'C:\Users\vinic\posh-git\posh-git\src\posh-git.psd1'
#Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll'
#& { Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll'; Enter-VsDevShell -InstanceId bd6d43cd}
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll'
Enter-VsDevShell -InstanceId bd6d43cd
# Settings for the prompt are in GitPrompt.ps1, so add any desired settings changes here.
# Example:
cd ~\projects\
@mairod
mairod / Webgl shader Hue Shift function
Last active February 10, 2024 16:57
Optimised Hue shift function in GLSL
vec3 hueShift( vec3 color, float hueAdjust ){
const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114);
const vec3 kRGBToI = vec3 (0.596, -0.275, -0.321);
const vec3 kRGBToQ = vec3 (0.212, -0.523, 0.311);
const vec3 kYIQToR = vec3 (1.0, 0.956, 0.621);
const vec3 kYIQToG = vec3 (1.0, -0.272, -0.647);
const vec3 kYIQToB = vec3 (1.0, -1.107, 1.704);
@Jjagg
Jjagg / IPrimitiveBatcher.cs
Last active July 2, 2021 20:04
Platform agnostic primitive batcher with implementation for MonoGame.
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
namespace MgWheels
{
public interface IPrimitiveBatcher
{
void DrawLine(Vector2 p1, Vector2 p2, Color color, float lineWidth);
void DrawLineStrip(IEnumerable<Vector2> points, Color color, float lineWidth);
@yizhang82
yizhang82 / host.cpp
Created January 28, 2017 07:43
Simple coreclr host
#include <iostream>
#include <limits.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <string.h>
#include <set>
#include <dirent.h>
#include <sys/stat.h>
#include "coreclrhost.h"

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?