The following are a list of resources I find myself referring to:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# add to .zshrc on mac | |
# assumes firefox developer edition installed | |
# uses $1 to search google | |
# works like `google "hi"` | |
google () { | |
open "/Applications/Firefox Developer Edition.app" "https://google.com.au/search?q=$1" | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Typescript enums are bad, and unsafe | |
Typescript map key are compared by reference and not by value. | |
ie. | |
``` | |
const map = new Map<any,string>() | |
map.set({},'hi') | |
map.set({},'hi2') | |
console.log(map.keys()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = fill me | |
email = fill@example.com | |
[alias] | |
squash = "!f(){ git reset --soft $(git merge-base master $(git branch --show-current)) && git commit -m \"${1}\";};f" | |
update = "!f(){ git checkout master && git pull && git checkout $(git branch --show-current) && git rebase;};f" | |
[push] | |
autoSetupRemote = true | |
[pull] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// carely use get, and set, it's good with extension functions with no arguements, allowing you to not have the extra "()" | |
val foo2: Int get() { | |
println("Calculating the answer") | |
return 42 | |
} | |
// just use this | |
fun getInt(): Int { |
- basically just wrap things in
Mono
, likeMono.just("someString")
, flux is like a stream - spring data reactive repositories main concern and still in incuberator, has good support for SQL, and some NoSQL, DynamoDB might be hard at the moment. Is better performing that JDBC (see 3.) it's largely based around R2DBC (see 1.), had issues with h2-console, and schema.sql/data.sql seems to be handled differently
- can apparently handle 1.5 times the number of requests of Servlet stack (see 2.) with a small server, has lower memory, and cpu footprint
- JSON isn't really streamed but
Flux
is useful for that - code can look really similar to what you are used to (link code)
- reactive means basically non-blocking
- using RouterFunctions routing is an option, but maybe not a good one (https://spring.io/guides/gs/reactive-rest-service/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
path="/tmp" # /home/pi/Documents | |
if [ -f "$path/pid.txt" ]; then | |
echo "pid file found. Exiting..." | |
exit 0 | |
fi | |
echo "running" > "$path/pid.txt" |
Python date diff calculator:
https://github.com/jordanst3wart/date-diff
An npm module I'm working on to manage Postman collections:
cd /tmp
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm" -o "session-manager-plugin.rpm"
sudo dnf install -y session-manager-plugin.rpm # fails
sudo rpm-ostree install session-manager-plugin.rpm # fails
alternative
These rules are adopted from the AngularJS commit conventions.
NewerOlder