Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖

Michael Kohl citizen428

🤖
View GitHub Profile
@Lysxia
Lysxia / Binary.hs
Created Feb 26, 2020
Binary pattern-matching on bytestrings
View Binary.hs
{-# LANGUAGE
ScopedTypeVariables,
ViewPatterns,
PatternSynonyms #-}
import Data.Bits (Bits, shift)
import Data.Word
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as B8
@swlaschin
swlaschin / fsharpjobs.md
Last active Aug 26, 2020
My suggestions on how to look for F# jobs
View fsharpjobs.md

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:

@swlaschin
swlaschin / effective-fsharp.md
Last active Oct 19, 2020
Effective F#, tips and tricks
View effective-fsharp.md

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
    • Keep IO at edges
View fsharp-fable-tips.md

Basic Tooling Setup

Fable is an F# language to javascript compiler powered by Babel.

F# is a language that runs on a Microsoft CLR. Using the .NET Core CLR implementation it works on Windows, Mac or Linux.

F# Linux

  • .NET Core SDK - download the latest 2.1 SDK
  • Mono - mono-complete package
  • F# compiler - fsharp package from the mono repository
View golang_essence.md

Code organization

Overview

  • Go programmers typically keep all their Go code in a single workspace.
  • A workspace contains many version control repositories (managed by Git, for example).
  • Each repository contains one or more packages.
@nickytonline
nickytonline / my-mac-setup.sh
Last active Sep 28, 2020
Mac Setup Scripts
View my-mac-setup.sh
#!/bin/sh
# More Mac setup at https://mac.iamdeveloper.com
# Log file
timestamp=$(date +%s)
logFile="./my-mac-setup-$timestamp.log"
# if true is passed in, things will reinstall
reinstall=$1
@palkan
palkan / Gemfile
Last active Jul 27, 2020
FactoryProf: profiler for your FactoryGirl
View Gemfile
# if you want to render flamegraphs
gem "stackprof", require: false # required by flamegraph
gem "flamegraph", require: false
@zg
zg / freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Last active Jun 11, 2020
Create FreeBSD virtual machine using qemu. Run the VM using xhyve.
View freebsd-qemu-xhyve-mac-os-x-virtual-machine.md

TL;DR

  • Create 10GB FreeBSD image using QEMU.
  • Run the VM using xhyve.
  • Mount host directory.
  • Resize the image.

Requisites

@bastman
bastman / docker-cleanup-resources.md
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
You can’t perform that action at this time.