Skip to content

Instantly share code, notes, and snippets.

View leandromoh's full-sized avatar
💭
Talk is Cheap, Show me the code!

Leandro Fernandes leandromoh

💭
Talk is Cheap, Show me the code!
View GitHub Profile
@swlaschin
swlaschin / fsharpjobs.md
Last active June 10, 2024 04:19
My suggestions on how to look for F# jobs

How to find F# jobs

People often ask me how to find F# jobs. I don't have any special connections to companies using F#, and I don't have any special tricks either. I wish I did!

So, given that, here's my take on F# jobs.

Job hunting

For job hunting my suggestions are:

@eujoy
eujoy / RobertCMartin-CleanCodeHeuristics.md
Last active July 12, 2024 19:56
Robert C. Martin - Clean Code Heuristics
@swlaschin
swlaschin / FsCsInterop.md
Last active July 9, 2024 15:41
F# to C# interop tips

Tips on exposing F# to C#

Api and Methods

I suggest that you create one or more Api.fs files to expose F# code in a C# friendly way.

In this file:

  • Define functions with PascalCase names. They will appear to C# as static methods.
  • Functions should use tuple-style declarations (like C#) rather than F#-style params with spaces.
@AlbertoMonteiro
AlbertoMonteiro / ObjectSpread.cs
Created February 14, 2018 23:24
Spread object in C#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
namespace Playground
{
public class Program
@erikkinding
erikkinding / fsharp_osx_dotnet_core.md
Last active January 9, 2024 19:47
Debug F# in Visual Studio Code on OSX (and Linux?) targeting dotnet core

I thought I'd share some simple steps you can follow if you wan't to build, run and debug an F# program on OSX using dotnet core 2.0. I guess these steps would also work if you're running Linux, with some minor modifications.

  1. Install dotnet sdk for OSX: https://www.microsoft.com/net/learn/get-started/macos

  2. Install Visual Studio Code for OSX: https://code.visualstudio.com/

  3. Install C# (yes, C#) extension for OSX: https://code.visualstudio.com/docs/languages/csharp

  4. Create a new console application project using dotnet cli: dotnet new console -lang F# -n HelloWorld

@sindbach
sindbach / groupby_count_aggregation.cs
Created March 30, 2016 09:47
A simple C# script to demo MongoDB aggregation performing group by count.
using System;
using MongoDB.Bson;
using MongoDB.Driver;
using System.Threading.Tasks;
using System.Linq;
/* Where document structure stored in localhost MongoDB : {token:"word"}
*/
namespace Aggregation_01
@vasanthk
vasanthk / System Design.md
Last active July 18, 2024 00:52
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@MatthewSteeples
MatthewSteeples / mousemove.ps1
Created February 26, 2015 19:09
Powershell Script to keep the mouse moving
Add-Type -AssemblyName System.Windows.Forms
while ($true)
{
$Pos = [System.Windows.Forms.Cursor]::Position
$x = ($pos.X % 500) + 1
$y = ($pos.Y % 500) + 1
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
Start-Sleep -Seconds 10
}
@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@zelid
zelid / gist:6965002
Last active August 3, 2023 17:23
Examples of BulkInsert for PostgreSQL, MySQL and MS SQL using ServiceStack OrmLite. Work in progress...
public static void BulkInsertNpgsql<T>(this IDbConnection dbConn, IEnumerable<T> list, IEnumerable<string> insertFields = null)
{
if (list == null) return;
if (list.Count() < 1) return;
var objWithAttributes = list.FirstOrDefault();
var modelDef = OrmLiteConfig.GetModelDefinition(objWithAttributes.GetType());
if (insertFields == null) insertFields = new List<string>();