- Lean and Functional Programming - Bryan Hunter
- A tour of the language landscape - Yan Cui
- Enterprise Tic-Tac-Toe -- A functional approach - Scott Wlaschin
- Learning from Haskell - Venkat Subramaniam
- Computation expression in context : a history of the otter king - Andrea Magnorsky
- Type-Driven Development - Mark Seemann
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Test that I passed on codility.com for TopTal company | |
# | |
# Task #1 | |
def binary_gap(N): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-Path() { | |
[Cmdletbinding()] | |
param([parameter(Mandatory=$True,ValueFromPipeline=$True,Position=0)][String[]]$AddedFolder) | |
# Get the current search path from the environment keys in the registry. | |
$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path | |
# See if a new folder has been supplied. | |
if (!$AddedFolder) { | |
Return 'No Folder Supplied. $ENV:PATH Unchanged' | |
} | |
# See if the new folder exists on the file system. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/main_content" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@* Goes in Views\PersonList *@ | |
@using EditableListMvc.Models | |
@model IEnumerable<Person> | |
@{ | |
ViewBag.Title = "Person List"; | |
} | |
<h2>Person List</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class IQueryableExtensions | |
{ | |
private static readonly TypeInfo QueryCompilerTypeInfo = typeof(QueryCompiler).GetTypeInfo(); | |
private static readonly FieldInfo QueryCompilerField = typeof(EntityQueryProvider).GetTypeInfo().DeclaredFields.First(x => x.Name == "_queryCompiler"); | |
private static readonly PropertyInfo NodeTypeProviderField = QueryCompilerTypeInfo.DeclaredProperties.Single(x => x.Name == "NodeTypeProvider"); | |
private static readonly MethodInfo CreateQueryParserMethod = QueryCompilerTypeInfo.DeclaredMethods.First(x => x.Name == "CreateQueryParser"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'"> | |
<CreateItem Include="$(SolutionDir)\packages\ILMerge.*\tools\ILMerge.exe"> | |
<Output TaskParameter="Include" ItemName="ILMergeExe" /> | |
</CreateItem> | |
<Error Text="@(ILMergeExe) does not exists" Condition="!Exists('@(ILMergeExe)')" /> | |
<CreateItem Include="@(ReferencePath)" Condition="'%(CopyLocal)'=='true'"> | |
<Output TaskParameter="Include" ItemName="ILMergeAssemblies" /> | |
</CreateItem> | |
<Delete Files="$(OutputPath)\ILMerge.log" Condition="Exists('$(OutputPath)\ILMerge.log')" /> | |
<Exec Command=""@(ILMergeExe)" /ndebug /log:$(OutputPath)\ILMerge.log /out:@(MainAssembly) "@(IntermediateAssembly)" @(ILMergeAssemblies->'"%(FullPath)"', ' ')" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.IO.MemoryMappedFiles; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
namespace FileAnalyzer | |
{ | |
public static unsafe class NativeRecord |
First of all, we are going to store all the data in a Docker shared volume, called openvpn_data
.
To initialise the OpenVPN configuration and CA:
$ docker run -v openvpn_data:/etc/openvpn --rm evolvedm/openvpn-rpi ovpn_genconfig -u udp://your-vpn.address.com
$ docker run -v openvpn_data:/etc/openvpn --rm -it evolvedm/openvpn-rpi ovpn_initpki
To start daemon (and auto-restart it):
Full source code can be found here
- 2016-12-20
- New performance test - Paul Westcott (@manofstick) made me aware that SeqComposer has a more performant API. SeqComposer2 uses this API.
- 2016-12-23
OlderNewer