Skip to content

Instantly share code, notes, and snippets.

View capoferro's full-sized avatar

Josiah Kiehl capoferro

View GitHub Profile
package swiss
import (
"log"
"math"
"sort"
)
type Scorer interface {
ID() int
import { cardText } from "../config/cardText";
import fileDownload from "js-file-download";
import { cardTypeIDs, setIDs, warbandLookup } from "../config/dataMapping";
const createSave = ObjectStates => {
return {
SaveName: "",
GameMode: "",
Date: "",
Table: "",
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.Closure' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at DLRCachedCode.test$1(CodeContext $globalContext, FunctionCode $functionCode)
at IronPython.Compiler.OnDiskScriptCode.Run()
at IronPython.Runtime.PythonContext.InitializeModule(String fileName, ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
at IronPython.Runtime.ModuleLoader.load_module(CodeContext context, String fullName)
at Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at IronPython.Runtime.PythonContext.Call(CodeContext context,
@capoferro
capoferro / docker-ssl-cert-generate
Last active May 14, 2017 02:09 — forked from cameron/docker-ssl-cert-generate
Generate self-signed SSL certs for docker client <— HTTPS —> daemon
#! /bin/bash
# HEADS UP! Make sure to use '*' or a valid hostname for the FDQN prompt
echo 01 > ca.srl
openssl genrsa -out ca-key.pem
openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem
openssl genrsa -out server-key.pem
openssl req -new -key server-key.pem -out server.csr
$tempPath = Join-Path $env:TEMP "dnvminstall"
$dnvmPs1Path = Join-Path $tempPath "dnvm.ps1"
$dnvmCmdPath = Join-Path $tempPath "dnvm.cmd"
Write-Host "Using temporary directory: $tempPath"
if (!(Test-Path $tempPath)) { md $tempPath | Out-Null }
$webClient = New-Object System.Net.WebClient
$webClient.Proxy = [System.Net.WebRequest]::DefaultWebProxy
gocd () {
for i in `find $GOPATH -name $1`
do (sh -c "ls $i/.git 2> /dev/null > /dev/null" || sh -c "ls $i/.hg" 2> /dev/null > /dev/null) && echo "cd $i" && cd $i
done
}
curl -LO http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p3.tar.gz
tar xzvf ntp*.tar.gz && rm ntp*.tar.gz
cd ntp*
./configure
make
sudo make install
sudo sed -i.bak 's/sntp/\/usr\/local\/bin\/sntp/g' /usr/libexec/ntpd-wrapper
sudo sed -i.bak2 's/\/usr\/sbin\/ntpd/\/usr\/local\/sbin\/ntpd/g' /usr/libexec/ntpd-wrapper
sudo cp /etc/ntp.conf /etc/ntp.conf.bak
echo "driftfile /var/db/ntp.drift
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
package main
import (
"fmt"
"log"
"github.com/capoferro/wow"
)
func main() {