Skip to content

Instantly share code, notes, and snippets.

View nosami's full-sized avatar

Jason Imison nosami

View GitHub Profile
@nosami
nosami / fsharp-tab-width
Last active February 16, 2017 18:53
fsharp-tab-width
(add-hook 'fsharp-mode-hook
(lambda ()
(setq c-basic-offset 2) ; indents 2 chars
(setq tab-width 2) ; and 2 char wide for TAB
(setq indent-tabs-mode nil))) ; And force use of spaces
For mono :-
fsharpc -g --debug:full --noframework --define:DEBUG --optimize- --tailcalls- -r:/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5-api/System.dll --target:exe --warnaserror:76 --fullpaths --flaterrors --highentropyva- octokit.fsx --out:/tmp/octokit.exe
Not tested Windows yet, but I assume I will just omit `--noframework` and the System.dll
ctrl_table = {
sends_escape = true,
last_mods = {}
}
control_key_timer = hs.timer.delayed.new(0.15, function()
ctrl_table["send_escape"] = false
-- log.i("timer fired")
-- control_key_timer:stop()
end
✔ ~/.karabiner.d/configuration
14:19 $ cat karabiner.json
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"caps_lock": "left_control"
}
7 echo "deb http://download.mono-project.com/repo/debian beta main" | sudo tee /etc/apt/sources.list.d/mono-xamarin-beta.list
8 echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
9 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
10 sudo apt-get install git autoconf automake mono mono-runtime libglib2.0-cil-dev libgtk2.0-cil-dev libglade2.0-cil-dev monodoc-base libgnome2.0-cil-dev libgconf2.0-cil-dev cmake libssh2-1-dev referenceassembiles-pcl fsharp
11 sudo apt-get update
12 sudo apt-get install git autoconf automake mono mono-runtime libglib2.0-cil-dev libgtk2.0-cil-dev libglade2.0-cil-dev monodoc-base libgnome2.0-cil-dev libgconf2.0-cil-dev cmake libssh2-1-dev referenceassembiles-pcl fsharp
13 echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
14 sudo apt-get update
15
✔ ~/src/kestrel-classic [master|✚ 1]
14:05 $ ./build.sh
Checking Paket version (downloading latest stable)...
Version 2.62.5 not found in cache.
Starting download from https://github.com/fsprojects/Paket/releases/download/2.62.5/paket.exe
Done.
Paket version 2.62.5.0
Downloading Microsoft.AspNetCore.Hosting 1.0.0-rc3-20541
Downloading Microsoft.AspNetCore.Hosting.Abstractions 1.0.0-rc3-20550
Downloading Microsoft.AspNetCore.Http.Abstractions 1.0.0-rc3-20550
jason ~/src/kestrel-classic $ cp ./packages/Microsoft.AspNetCore.Server.Kestrel/runtimes/osx/native/libuv.dylib build/
jason ~/src/kestrel-classic $ mono build/kestrel-classic.exe
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Diagnostics.DiagnosticSourceEventSource' threw an exception. ---> System.TypeLoadException: Could not load type 'System.Diagnostics.Tracing.EventSourceSettings' from assembly 'System.Diagnostics.Tracing, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at System.Diagnostics.Diagnostic
XBuild Engine Version 14.0
Mono, Version 4.4.0.0
Copyright (C) 2005-2013 Various Mono authors
Build started 19/04/2016 15:18:35.
__________________________________________________
Project "/Users/jason/src/kestrel-classic/src/KestrelClassic.fsproj" (Build target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU
Created directory "obj/Debug/"
@nosami
nosami / _readme.md
Created March 13, 2016 23:31 — forked from bradwilson/_readme.md
bash-git prompt overrides

CAVEAT: This works for me on Linux Mint 17.3. YMMV, caveat emptor, etc.

If this looks like (like maybe it should be a bash-git theme), hey, I agree with you, but I spent as many hours struggling with doing this "the right way" as I'm willing to put in.

Some of the custom characters come from Font Awesome. You should install the Font Awesome font into your system to use them. They may have what appears to be odd extra-spacing owing to the fact that Font Awesome is not fixed pitch, but Terminal expects it to be.

Add the following three lines to your .bashrc:

source ~/.bash-git-prompt/gitprompt.sh
:{ company-post-command args: nil
::{ company-keep args: (windmove-left)
::} company-keep result: nil
::{ company--perform args: nil
:::{ company--should-complete args: nil
:::} company--should-complete result: nil
::} company--perform result: nil
::{ company--should-begin args: nil
::} company--should-begin result: nil
::{ company-install-map args: nil