Skip to content

Instantly share code, notes, and snippets.

@lessismore1
lessismore1 / getMimeTypefromString
Created February 2, 2019 15:24
Get mimeType from file extension as string
//Mime types. Some keys are duplicated.
array(
".3dm"=>"x-world/x-3dmf",
".3dmf"=>"x-world/x-3dmf",
".a"=>"application/octet-stream",
".aab"=>"application/x-authorware-bin",
".aam"=>"application/x-authorware-map",
".aas"=>"application/x-authorware-seg",
".abc"=>"text/vnd.abc",
@lessismore1
lessismore1 / gist:24e587eb2cd1fc5dc49695bcf228f843
Created February 17, 2019 03:49 — forked from nakamura-to/gist:4316660
ASP.NET Web API Test in F#
open System
open System.Collections.Generic
open System.Net
open System.Net.Http
open System.Web.Http
open System.Web.Http.Dispatcher
open System.Web.Http.SelfHost
open Microsoft.VisualStudio.TestTools.UnitTesting
open Newtonsoft.Json.Linq
open Newtonsoft.Json.Serialization
@lessismore1
lessismore1 / .gitlab-ci.yml
Created February 21, 2022 21:52 — forked from t3easy/.gitlab-ci.yml
Build and deploy docker containers with GitLab CI
image: an-image-with-docker-and-docker-compose
variables:
DOCKER_TLS_VERIFY: "1"
DOCKER_CERT_PATH: ".docker"
before_script:
- mkdir -p $DOCKER_CERT_PATH
- echo "$DOCKER_CA" > $DOCKER_CERT_PATH/ca.pem
- echo "$DOCKER_CERT" > $DOCKER_CERT_PATH/cert.pem