I hereby claim:
- I am v3rm0n on github.
- I am maido (https://keybase.io/maido) on keybase.
- I have a public key whose fingerprint is 6F6B C310 7A47 C258 4430 80B9 C2D4 29D4 E7A3 E875
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
0x52423dc2162e4a82ae2fc74d0f51dbd29baf0f2a |
val user: User? | |
// Get user ID | |
//If expression (userId is nullable) | |
val userId = if(user != null) user.id else null | |
//Elvis operator (userId is not nullable, fail fast) | |
val userId = user.id ?: throw IllegalStateException("User can not be null at this time") |
class OrderBuilder { | |
var id: Long = Random().nextLong() | |
var userId = 1L | |
var from = 100.btc | |
var to = 10.ltc | |
var rate = 0.5 | |
var status = NEW | |
private fun build() = Order(id, userId, from, to, rate, status) |
fun MessageChannel.sendMessage(o: Any): Boolean { | |
return this.send(MessageBuilder.withPayload(o).build()) | |
} | |
// Usage | |
val mailMessageChannel // A MessageChannel instance | |
fun sendEmail(message: Message) { | |
mailMessageChannel.sendMessage(message) | |
} |
#!/bin/bash -eo pipefail
flutter -v test --coverage
[ +45 ms] executing: [/home/cirrus/sdks/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +49 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/master
[ ] executing: [/home/cirrus/sdks/flutter/] git rev-parse --abbrev-ref HEAD
[ +10 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] master
[ ] executing: [/home/cirrus/sdks/flutter/] git ls-remote --get-url origin
// ==UserScript== | |
// @name OnVoteMoveDownReddit | |
// @description Simple script that allows using a/z for voting and on vote will move to next element and expand it in Reddit. x will expand the thing if it is not already expanded. When at the end of the page, new content is loaded automatically | |
// @exclude https://old.reddit.com/r/*/comments/* | |
// @match https://old.reddit.com/r/* | |
// @match https://old.reddit.com/ | |
// ==/UserScript== | |
// CSS for the active thing | |
const style = document.createElement("style"); |
local json = nil | |
local dayOrder = {'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'} | |
function descriptor() | |
return { title = "Bassdrive Radio", capabilities = {} } | |
end | |
function indexOf(array, value) | |
for i, v in ipairs(array) do | |
if v == value then |
#!/bin/bash | |
[ "$UID" -eq 0 ] || exec sudo bash "$0" "$@" | |
((count = 10)) # Maximum number to try. | |
autoreboot_log="/var/log/autoreboot.log" | |
echo $(date -u) "Current time: $(date)" >> "$autoreboot_log" |