Skip to content

Instantly share code, notes, and snippets.

@jen20
jen20 / capslock.reg
Created December 14, 2017 14:00
Map caps-lock to escape on Windows
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,46,00,01,00,3a,00,00,00,00,00
@jen20
jen20 / README.md
Last active June 19, 2017 21:58
Patches for Vagrant guest support in SmartOS.

Vagrant SmartOS Guest Support Patches

Many of these patches have been merged into Vagrant, but are not yet released. To patch the distributed version to avoid noise from the source builds of Vagrant, apply the patches via the following (assuming OS X with Vagrant 1.9.5 installed from the binary distribution, including via Homebrew Cask):

$ cd /opt/vagrant/embedded/gems/gems/vagrant-1.9.5
$ curl -L https://gist.githubusercontent.com/jen20/b3e26ee869f546347680e7aa47a41718/raw/86e6f45fba022c5f8338232f87bc5b5417895d8c/vagrant-smartos.patch | \
	sudo patch -p1
@jen20
jen20 / ldargs.d
Created May 2, 2017 04:32
Trace all args to `ld` and `gcc`. Probably SmartOS only.
#!/usr/sbin/dtrace -ws
#pragma D option quiet
#pragma D option switchrate=10
syscall::exec*:return
/ execname == "ld" || execname == "gcc"/
{
stop();
system("pargs %d", pid);
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
@jen20
jen20 / hello.c
Created March 16, 2016 09:00 — forked from AlainODea/hello.c
Cross-compiler from x86_64 Linux to x86_64 Illumos on Ubuntu (works for Hello World and possibly more)
#include<stdio.h>
main()
{
printf("Hello World");
}
" vim:fdm=marker
" Nocompatible and Leader {{{
set nocompatible
let mapleader="\<Space>"
" }}}
" Plugins {{{
call plug#begin('~/.vim/plugged')
" Fast file switching
" vim:fdm=marker
" Nocompatible and Leader {{{
set nocompatible
let mapleader="\<Space>"
" }}}
" Plugins {{{
call plug#begin('~/.vim/plugged')
" Fast file switching
@jen20
jen20 / main.go
Created February 5, 2016 13:29
Example using Seq for partial object equality.
// $ go run main.go
// Differences:
// Expected 'PointerToNumber' to be '5' but got '4'
// Expected 'Endpoint.Blob' to be 'Test24343' but got 'Test1'
// Expected 'String' to be 'John Smith' but got 'John'
package main
import (
"fmt"
provider "aws" {
region = "${var.region}"
}
variable "bucket1_name" {
default = "test-test-test-test-test-bucket1"
}
variable "bucket2_name" {
default = "test-test-test-test-test-bucket2"
}
00000058 Using solution path /Users/James/.dotfiles/vim/bundle/omnisharp-vim/server/OmniSharp.sln
00000059 Using config file /Users/James/.dotfiles/vim/bundle/omnisharp-vim/server/OmniSharp/bin/Debug/config.json
Monodoc documentation tree could not be loaded.System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.First[String] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
at MonoDevelop.Projects.HelpService.InitializeHelpTree () [0x00000] in <filename unknown>:0
00001304 OmniSharp server is listening
Unhandled Exception:
System.IO.FileNotFoundException: Assembly does not exist!