Skip to content

Instantly share code, notes, and snippets.

View markusl's full-sized avatar

Markus Lindqvist markusl

  • Supercell
  • Finland
View GitHub Profile
#if INTERACTIVE
#r "Microsoft.CSharp.dll"
#endif
open System
open System.Dynamic
open System.Linq.Expressions
open System.Reflection
open System.Runtime.CompilerServices
open Microsoft.CSharp.RuntimeBinder
@panesofglass
panesofglass / TcpServer.fsx
Created January 4, 2011 17:43
Asynchronous TCP server in F#
// [snippet: Async socket server using F# async computations.]
open System
open System.IO
open System.Net
open System.Net.Sockets
open System.Threading
type Socket with
member socket.AsyncAccept() = Async.FromBeginEnd(socket.BeginAccept, socket.EndAccept)
@ErikAugust
ErikAugust / spectre.c
Last active July 5, 2024 18:14
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@iann0036
iann0036 / gist:b473bbb3097c5f4c656ed3d07b4d2222
Last active July 17, 2024 17:03
List of expensive / long-term effect AWS IAM actions
route53domains:RegisterDomain
route53domains:RenewDomain
route53domains:TransferDomain
ec2:ModifyReservedInstances
ec2:PurchaseHostReservation
ec2:PurchaseReservedInstancesOffering
ec2:PurchaseScheduledInstances
rds:PurchaseReservedDBInstancesOffering
dynamodb:PurchaseReservedCapacityOfferings
s3:PutObjectRetention