Skip to content

Instantly share code, notes, and snippets.

@vbfox
vbfox / CreateRelativePath.cs
Last active March 21, 2023 07:31
Make a path relative in C# and F#
using System;
using System.IO;
static class RelativePath
{
private static string[] GetPathPart(string path)
{
return path
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar)
.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
@dragon788
dragon788 / README.md
Last active March 24, 2024 07:57 — forked from atenni/README.md
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@callmekohei
callmekohei / interlop_tiny_memo.md
Last active January 18, 2019 08:57
interlopのメモ

Sample

cpp code ( nativedll.cpp )

#include <stdio.h>
extern "C" void __attribute__((visibility("default"))) HelloWorld()
{
printf("Hello world, invoked by F#!\n");
}