⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
import java.security.MessageDigest | |
val String.sha1: String | |
get() { | |
val bytes = MessageDigest.getInstance("SHA-1").digest(this.toByteArray()) | |
return bytes.joinToString("") { | |
"%02x".format(it) | |
} | |
} |
Tested on HP Elitebook 840 G3. You may also use this tool to change the logo to your own custom one.
Recently I acquired an used HP Elitebook 840 G3. Everything was fine with it, but it had a custom UEFI logo when starting the OS - it was branded by the company that owned this laptop before.
As it became my personal laptop I didn't want it to be branded by them and I tried to find a way to restore the original HP/Windows logo (it had the custom logo during POST and during the OS startup as well).