Skip to content

Instantly share code, notes, and snippets.

View kortschak's full-sized avatar

Dan Kortschak kortschak

View GitHub Profile
/*
Upside-down approach for a devkit case: The devkit is put
in from behind, display first. So all components
(batteryholder, cam, ...) are freely reachable and
sensitive parts (like TS-connector) are covered. And the
processor heat can be taken care of as it's just open - a
fan can be mounted.
The idea is to plug the devkit in and put some hot glue
to the corners to fix it or screw it to the risers.
@kortschak
kortschak / Go-Semantic.sublime-syntax
Created September 28, 2018 07:53
Semantic syntax highlighting files for GoSublime
%YAML 1.2
---
name: "Go Semantic"
comment: Based on work from github.com/frou/GoFeather and github.com/DisposaBoy/GoSublime
hidden: false
first_line_match: "-[*]-( Mode:)? Go -[*]-"
scope: source.sem.go
contexts:
main:
- match: /\*
@kortschak
kortschak / git.bash
Created August 31, 2018 05:07
snippet for git prompt - add to .bashrc
# git prompt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\[\]\w\[\e[0m\] $(__git_ps1 "[\[\e[0;32m\]%s\[\e[0m\]\[\e[1;33m\]$(parse_git_dirty)\[\e[0m\]]")\$ \[\e[0m\]'
@kortschak
kortschak / terminal.text
Created August 30, 2018 03:57
vg build output
~/Development/vg [master]$ source source_me.sh
~/Development/vg [master]$ make -j 4
rm -rf lib/libprotobuf* lib/libprotoc*
rm -Rf include/google/protobuf/
. ./source_me.sh && cd deps/sdsl-lite && BUILD_PORTABLE=1 ./install.sh /home/xxxxx/Development/vg
. ./source_me.sh && cd deps/ssw/src && make && ar rs /home/xxxxx/Development/vg/lib/libssw.a ssw.o ssw_cpp.o && cp ssw_cpp.h ssw.h /home/xxxxx/Development/vg/lib
. ./source_me.sh && cd deps/snappy && ./autogen.sh && ./configure --prefix=/home/xxxxx/Development/vg && make && make install
. ./source_me.sh && cd deps/protobuf && ./autogen.sh && export DIST_LANG=cpp && ./configure --prefix="/home/xxxxx/Development/vg" && make && make install && export PATH=/home/xxxxx/Development/vg/bin:$PATH
/home/xxxxx/Development/vg/deps/ssw/src
/home/xxxxx/Development/vg/deps/snappy
~/Development/3d/Slic3r [(version_1.40.0-alpha)]$ export LDLOADLIBS=-lstdc++
~/Development/3d/Slic3r [(version_1.40.0-alpha)]$ perl Build.PL
Attempting to create directory /home/xxxx/Development/3d/Slic3r/local-lib
--> Working on App::cpanminus
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz ... OK
Configuring App-cpanminus-1.7044 ... OK
Building and testing App-cpanminus-1.7044 ... OK
Successfully installed App-cpanminus-1.7044 (upgraded from 1.7040)
1 distribution installed
Class::XSAccessor is up to date. (1.19)
This file has been truncated, but you can view the full file.
; generated by Slic3r Prusa Edition 1.39.1-prusa3d-linux64 on 2018-05-10 at 07:33:21
;
; external perimeters extrusion width = 0.45mm
; perimeters extrusion width = 0.45mm
; infill extrusion width = 0.45mm
; solid infill extrusion width = 0.45mm
; top infill extrusion width = 0.40mm
; first layer extrusion width = 0.42mm
@kortschak
kortschak / flagstat-1.svg
Created February 2, 2017 02:22
flagstat CPU profiling
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kortschak
kortschak / rings_test.go
Created September 1, 2016 02:53
updated test cases
// Copyright ©2013 The bíogo Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package rings_test
import (
"flag"
"fmt"
"image/color"
func Zseri(z complex128, fnu float64, kode, n int, y []complex128, tol, elim, alim float64) (nz int) {
var AA, AK, ATOL,
DFNU, FNUP, RS, S, SS float64
var I, IB, IDUM, IFLAG, IL, L, M, NN, NW int
var w [2]complex128
var sin, cos float64
var first bool
var scale float64
var ak1, coef, rz, s1, s2, st complex128
@kortschak
kortschak / all.bash.text
Created April 28, 2016 01:23
all.bash failure output
$ GOROOT_BOOTSTRAP=/home/kortschak/go-bootstrap ./all.bash
##### Building Go bootstrap tool.
cmd/dist
##### Building Go toolchain using /home/kortschak/go-bootstrap.
bootstrap/internal/obj
bootstrap/asm/internal/flags
bootstrap/compile/internal/big
bootstrap/internal/gcprog
bootstrap/internal/obj/arm