Skip to content

Instantly share code, notes, and snippets.

@ericstj
ericstj / resolveNuPkgs.md
Created July 6, 2016 16:16
How to resolve binaries from NuGet packages

Resolving binaries from NuGet packages

NuGet is handy for sharing code but sometimes you need to deal with raw binaries. Picking those directly out of NuGet packages can be challenging since NuGet has many complex/inter-related conventions for determining which assets are applicable.

This document will describe a technique for resolving binaries using NuGet's asset selection algorithm via DotNET CLI.

Prerequisites

@Happy-Ferret
Happy-Ferret / lib.hs
Last active November 8, 2016 16:17
Mixed assembly (C/Haskell)
{-# LANGUAGE ForeignFunctionInterface #-}
module Test where
import Foreign.C.Types
hsfun :: CInt -> IO CInt
hsfun x = do
putStrLn "Hello from haskell"
return (42 * x)
hsfoo :: CInt -> IO CInt

Take-home functional programming interview

This document is licensed CC0.

These are some questions to give a sense of what you know about FP. This is more of a gauge of what you know, it's not necessarily expected that a single person will breeze through all questions. For each question, give your answer if you know it, say how long it took you, and say whether it was 'trivial', 'easy', 'medium', 'hard', or 'I don't know'. Give your answers in Haskell for the questions that involve code.

Please be honest, as the interviewer may do some spot checking with similar questions. It's not going to look good if you report a question as being 'trivial' but a similar question completely stumps you.

Here's a bit more guidance on how to use these labels:

@izahn
izahn / helm_config.el
Created May 20, 2016 19:48
Helm config
;;; Completion hints for files and buffers buffers
(require 'helm-config)
(helm-mode 1)
;;rebind tab to do persistent action
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
;; make TAB works in terminal
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)
;list actions using C-z
(define-key helm-map (kbd "C-z") 'helm-select-action)
@evan1026
evan1026 / .gitignore
Last active June 4, 2017 00:43
C++ implementation of Haskell's Maybe
*.swp
using BuildScraping;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
@falfaddaghi
falfaddaghi / .fsproj
Created March 3, 2016 04:42
fsproj reference issue with Ionide
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{949FD636-F58E-43DE-AAAD-48FE0336F445}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Suave</RootNamespace>
<AssemblyName>Suave</AssemblyName>
@warrenbuckley
warrenbuckley / UpdateCheckerController.cs
Last active November 27, 2016 10:54
V3 Nuget API using Nuget.Core Package
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
using NuGet.Configuration;
using NuGet.Protocol.Core.Types;
using NuGet.Protocol.Core.v3;
using NuGet.Versioning;
namespace Umbraco.Forms.UpdateChecker.Controller
{
@blippy
blippy / has-charts.ipynb
Created January 19, 2016 10:43
Charts in Haskell
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruxo
ruxo / fuzzy.fsx
Last active February 9, 2023 23:18
Fuzzy logic
type CategoryFunc = float -> float
type Category = string * CategoryFunc
module private CategoryRandom =
let r = System.Random()
let from n = r.Next n
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module Category =