Skip to content

Instantly share code, notes, and snippets.

@dylanmei
dylanmei / Justfile
Created November 14, 2021 16:54
Install kotlin-language-server
install: clean
./gradlew :server:distZip
@cd server/build/distributions && unzip server.zip
@rm -rf ~/.local/share/kotlin-language-server
mv server/build/distributions/server \
~/.local/share/kotlin-language-server
clean:
./gradlew :server:clean
@dylanmei
dylanmei / pgn.kt
Created September 9, 2019 14:06
Parse PGN chess database files
import java.io.File
import java.io.Reader
import java.io.StringReader
import java.io.BufferedReader
import kotlin.sequences.*
import kotlin.collections.*
data class Match(
val event: String,
@dylanmei
dylanmei / archlinux_from_usb.md
Last active December 23, 2017 20:18
Archlinux from USB
@dylanmei
dylanmei / steps.sh
Created June 15, 2017 14:26
simple ss-cert
openssl genrsa -out ca-key.pem 2048
openssl req -x509 -new -nodes -key ca-key.pem -subj "/CN=*" -days 3650 -out ca.pem
openssl genrsa -out telepath-key.pem 2048
openssl req -new -key telepath-key.pem -subj "/CN=telepath" -out telepath.csr
openssl x509 -req -in telepath.csr -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out telepath.pem -days 3650
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"crypto/tls"
"crypto/x509"
@dylanmei
dylanmei / heat-resource.yml
Last active October 16, 2015 22:36
heat-resource
heat_template_version: 2014-10-16
description: >
Simple nested resource
resources:
random_string:
type: OS::Heat::RandomString
@dylanmei
dylanmei / rsc-ss-upload.go
Last active August 29, 2015 14:25
RSC SS Upload Example
package main
import (
"fmt"
"os"
"path/filepath"
"github.com/rightscale/rsc/rsapi"
"github.com/rightscale/rsc/ss/ssd"
)
@dylanmei
dylanmei / gist:1759c5b47a5e7a0b8681
Last active December 21, 2015 22:27
eclim install
# http://eclim.org/install.html
# http://qiita.com/youhei/items/09756fba4f969b075486
# http://wiki.eclipse.org/Eclipse/Installation#Download_Eclipse
brew install caskroom/cask/brew-cask
#brew cask install java
brew cask install eclipse-java
@dylanmei
dylanmei / gist:1c94c11276ad53cd856a
Created May 16, 2015 18:45
Watch alias for OSX
watch_for_osx() {
while :
output=`eval "$@"`
do clear;
echo $output
sleep 5
done
}
alias watch=watch_for_osx

Keybase proof

I hereby claim:

  • I am dylanmei on github.
  • I am dylanmei (https://keybase.io/dylanmei) on keybase.
  • I have a public key whose fingerprint is B068 6A5C 1FBE 9127 25A4 DF31 7D8E 57A7 3DDA 9FC0

To claim this, I am signing this object: