- clone from eclipse jdtls
- compile with
cd eclipse.jdt.ls && ./mvnw clean install -DskipTests - download google java format
- create launch-jdtls.sh
#!/bin/sh| public Mono<Person> load(UUID id) { | |
| return API.Match(tryLoadPerson(id)).of( | |
| Case($Success($()), Mono::just), | |
| Case($Failure($(instanceOf(IllegalArgumentException.class))), Mono::error), | |
| Case($Failure($()), x -> Mono.error(new RuntimeException("unknown error"))) | |
| ); | |
| } | |
| private Try<Person> tryLoadPerson(UUID id) { |
cd eclipse.jdt.ls && ./mvnw clean install -DskipTests #!/bin/sh| # prevent vim from losing colors | |
| # set -g default-terminal "xterm" | |
| set -g default-terminal "screen-256color" | |
| tmux_conf_theme_24b_colour=true | |
| tmux_conf_theme_focused_pane_bg='default' | |
| tmux_conf_theme_pane_border_style=thin | |
| tmux_conf_theme_left_separator_main='\uE0B0' | |
| tmux_conf_theme_left_separator_sub='\uE0B1' | |
| tmux_conf_theme_right_separator_main='\uE0B2' |
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "strings" | |
| "time" | |
| "github.com/fatih/color" | |
| "github.com/google/go-cmp/cmp" |
| package main | |
| import ( | |
| "archive/tar" | |
| "bytes" | |
| "compress/gzip" | |
| "fmt" | |
| "io" | |
| "os" | |
| "path/filepath" |
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| var ( | |
| app = `db.username=hello | |
| db.password=world |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "os" | |
| ) | |
| type NotificationState int |
| package main | |
| // Here we show how to properly terminate multiple go routines by using a context. | |
| // Thanks to WaitGroup we'll be able to end all go routines gracefully before the main function ends. | |
| import ( | |
| "context" | |
| "fmt" | |
| "math/rand" | |
| "os" |
| #!/bin/bash | |
| LENGTH=25 | |
| if [ ! -z "$1" ] && [ $1 -gt 1 ]; then | |
| LENGTH=$1 | |
| fi | |
| NUMBYTES=`echo $LENGTH | awk '{print int($1*1.16)+1}'` | |
| openssl rand -base64 $NUMBYTES | tr -d "=+/" | cut -c1-$LENGTH |
| import React, { useReducer, useEffect, useContext, createContext } from "react"; | |
| import "./App.css"; | |
| import { | |
| BrowserRouter as Router, | |
| Switch, | |
| Route, | |
| Link, | |
| useParams, | |
| } from "react-router-dom"; |