Skip to content

Instantly share code, notes, and snippets.

@judwhite
judwhite / liteide_tips.md
Last active January 26, 2018 03:35
LiteIDE tips

Install LiteIDE

  • Download http://sourceforge.net/projects/liteide/files
  • Unzip to a directory of your choice and make a shortcut to ./liteide/bin/liteide.exe
  • Recommended settings in View | Options:
    • LiteApp
      • Display
        • Toolbar Icon Size: 18x18
    • LiteEditor
  • Behavior
_ _ _ 8 _ _ 5 _ _
_ _ 9 _ 2 5 _ _ 8
_ _ _ _ _ _ _ _ 4
_ _ _ 1 _ _ 2 8 _
_ 8 _ 6 5 3 _ 7 _
_ 7 5 _ _ 8 _ _ _
2 _ _ _ _ _ _ _ _
3 _ _ 4 7 _ 8 _ _
_ _ 6 _ _ 9 _ _ _
@judwhite
judwhite / advent07.go
Created December 18, 2015 20:33
Advent of Code #7
package main
import (
"fmt"
"log"
"strconv"
"strings"
)
var gates map[string]*gate
@judwhite
judwhite / test.sh
Last active November 14, 2016 23:40
Standard Go test.sh
#!/bin/bash
# go get -u github.com/kisielk/errcheck
# go get -u github.com/golang/lint/golint
# go get -u honnef.co/go/simple/cmd/gosimple
# go get -u honnef.co/go/unused/cmd/unused
# go get -u github.com/mdempsky/unconvert
# go get -u github.com/client9/misspell/cmd/misspell
# go get -u github.com/gordonklaus/ineffassign
# go get -u honnef.co/go/staticcheck/cmd/staticcheck
@judwhite
judwhite / launch.json
Created March 18, 2016 07:16
.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceRoot}",
"env": {},
@judwhite
judwhite / tasks.json
Created March 18, 2016 07:17
.vscode/tasks.json
{
"version": "0.1.0",
"command": "go",
"showOutput": "always",
"tasks": [
{
"taskName": "build",
"isBuildCommand": true
@judwhite
judwhite / gofmt.xml
Last active March 31, 2016 11:57
IntelliJ - gofmt on save, except autosave
<?xml version="1.0" encoding="UTF-8"?>
<TaskOptions>
<TaskOptions>
<option name="arguments" value="-w $FilePath$" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" value="Run gofmt after saving go file" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="go" />
<option name="immediateSync" value="false" />
<option name="name" value="Gofmt" />
@judwhite
judwhite / productions.go
Created June 2, 2016 13:13
Mathematical Productions with order of operations and avoiding left tail recursion
func addMathProductions() {
// expr -> expr + term
// | expr - term
// | term
//
// rewritten:
// expr -> term restAdd
addProduction(expr,
rules{
{term, restAdd},
@judwhite
judwhite / build.cake
Created June 23, 2016 16:43
psake: Example cake file
//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
//////////////////////////////////////////////////////////////////////
// PREPARATION
//////////////////////////////////////////////////////////////////////
@judwhite
judwhite / CredentialManager.cs
Created July 7, 2016 04:01 — forked from meziantou/CredentialManager.cs
Using the Windows Credential API (CredRead, CredWrite, CredDelete, CredEnumerate)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Win32.SafeHandles;
public static class CredentialManager
{
public static Credential ReadCredential(string applicationName)