Skip to content

Instantly share code, notes, and snippets.

View et1975's full-sized avatar

Eugene Tolmachev et1975

View GitHub Profile
### Keybase proof
I hereby claim:
* I am et1975 on github.
* I am et1975 (https://keybase.io/et1975) on keybase.
* I have a public key ASCfDLB4zDxt18Cg65LoL5DDAYlOI2nuFvWRS-Ypbil3oAo
To claim this, I am signing this object:
@et1975
et1975 / csd-wrapper.sh
Created December 11, 2018 19:18 — forked from l0ki000/csd-wrapper.sh
Cisco Anyconnect CSD wrapper for OpenConnect (exhanced to autodownload and autoupdate hostscan)
#!/bin/bash
# Cisco Anyconnect CSD wrapper for OpenConnect
# Enter your vpn host here
CSD_HOSTNAME=
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi
@et1975
et1975 / translate.fs
Last active January 10, 2017 14:28
F# record selection translated into C# properties init expression tree
open System.Reflection
open System
open System.Linq
open System.Linq.Expressions
let memoize f =
let dict = System.Collections.Concurrent.ConcurrentDictionary<_,_>()
fun x -> dict.GetOrAdd(x, lazy (f x)).Force()
let getProperties = memoize(fun (t:Type) -> t.GetProperties(BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.SetProperty).ToDictionary(fun p -> p.Name.ToLower()))