Skip to content

Instantly share code, notes, and snippets.

@drvink
drvink / FindExecutable.fs
Created April 20, 2015 16:51
F# inline MSBuild tasks via FSharp.Compiler.CodeDom
namespace Example
open System
open System.IO
open System.Runtime.InteropServices
open System.Text
open Microsoft.Build.Framework
open Microsoft.Build.Utilities
module internal Externs =
let inline retype (t : ^t) :^tm = (# "" t : ^tm #)
let inline (++) (w : ^W when ^W : (static member IsMeasureAbbrev : ^tm * ^t -> unit)) (t : ^t) = (# "" t : ^tm #)
open System
[<MeasureAnnotatedAbbreviation>]
type Guid<[<Measure>] 'Measure> = Guid
[<MeasureAnnotatedAbbreviation>]
type string<[<Measure>] 'Measure> = string
@drvink
drvink / old-haskell-indentation-mode.el
Last active May 14, 2018 20:41
haskell-indentation-mode delete behavior prior to merge of hi2.el
;;; old-haskell-indentation-mode.el --- pre-hi2 behaviors
;; Keywords: languages
;;; Commentary:
;; haskell-indentation-mode delete behavior prior to hi2 merge
;;; Code:
@drvink
drvink / .profile
Last active May 21, 2022 20:52
on nix: a language crash course for ml and haskell programmers
# locale bug workaround
[ -e "$HOME/.nix-profile/lib/locale/locale-archive" ] \
&& export LOCALE_ARCHIVE="$HOME/.nix-profile/lib/locale/locale-archive"
# needed for GHC, Cabal, etc. to find stuff properly
# requires nix's patched ghc-paths package
if [ -e "$HOME/.nix-profile/bin/ghc" ]; then
export NIX_GHC="$HOME/.nix-profile/bin/ghc"
export NIX_GHCPKG="$HOME/.nix-profile/bin/ghc-pkg"
export NIX_GHC_DOCDIR="$HOME/.nix-profile/share/doc/ghc/html"
@drvink
drvink / merlin-init.sh
Last active September 4, 2015 10:37 — forked from unhammer/merlin-init.sh
Create .merlin file for a project with all your ocamlfind packages and .opam sources in there
#!/bin/sh
if test -f .merlin; then
echo ".merlin already exists, bailing out ..." >&2
exit 1
else
# You could add your default EXT's and such to this list:

Keybase proof

I hereby claim:

  • I am drvink on github.
  • I am mdl (https://keybase.io/mdl) on keybase.
  • I have a public key whose fingerprint is 28C7 91EF 1A28 F40D 7E94 CB80 0C26 AF37 93F3 2F5F

To claim this, I am signing this object:

@drvink
drvink / cornbread.md
Created December 15, 2018 23:46
best cornbread recipe

The cornbread recipe is easy; it's right off the Alber's Yellow Cornmeal box.

  • 1 cup Alber's yellow cornmeal
  • 1 cup all purpose flour
  • 1/4 cup granulated sugar
  • 1 Tbs. baking powder (Not soda)
  • 1 tsp. salt
  • 1 cup milk
  • 1/3 cup vegetable oil (like canola)
  • 1 large egg, slightly beaten
@drvink
drvink / bitrock-unpacker.tcl
Created September 13, 2020 17:12 — forked from mickael9/bitrock-unpacker.tcl
Bitrock unpacking script
#!/usr/bin/env tclkit
#
# Bitrock unpacking script
#
# This script must be executed using 32-bit tclkit
#
# Author : mickael9 <mickael9 at gmail dot com>
#
# Latest version can be found at:
# https://gist.github.com/mickael9/0b902da7c13207d1b86e
@drvink
drvink / extract-installbuilder.tcl
Created September 13, 2020 17:12 — forked from zhangyoufu/extract-installbuilder.tcl
extract password-protected InstallBuilder installer
#!./tclkit
## prepare runtime environment
proc init {} {
## mount optional.pak (for tcltwofish)
set optionalPak installbuilder/paks/optional.pak
vfs::mk4::Mount $optionalPak $optionalPak -readonly
## adjust library search path
set ::auto_path [list $tcl::kitpath/lib/tcl$::tcl_version $tcl::kitpath/lib $tcl::kitpath/libraries $optionalPak/linux-x64 $tcl::kitpath]
@drvink
drvink / brownies.txt
Created July 21, 2021 13:43
best brownie recipe
CREAM CHEESE BROWNIES
Preheat oven to 350; coat 8 x 8 pan with non-stick spray.
BROWNIE LAYER: (See NOTE)
6 oz. Baker's German semi-sweet chocolate
1/2 c. (1-4 oz.stick) butter
3/4 c. sugar
3 eggs
1 ½ tsp. vanilla
¾ c. all-purpose flour