To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
| import scala.util.parsing.json._ | |
| val result = JSON.parseFull(""" | |
| {"name": "Naoki", "lang": ["Java", "Scala"]} | |
| """) | |
| result match { | |
| case Some(e) => println(e) // => Map(name -> Naoki, lang -> List(Java, Scala)) | |
| case None => println("Failed.") | |
| } |
| -- 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%' |
| #!/bin/bash | |
| # This line sorts first according to numerical size in bytes | |
| # the second pass through du in the while loop converts to human readable | |
| # format | |
| du -s * | sort -n | cut -f 2- | while read a; do du -hs "$a"; done |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
| #!/bin/bash | |
| # Install prerequisites | |
| yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel ruby-devel gcc-c++ jq git | |
| # Import key | |
| curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | |
| # Install RVM | |
| curl -sSL https://get.rvm.io | bash -s stable --ruby |
Preferences | Appearance | Tabs | Theme > Darkdstr > ttf, install all font files by double clicking)Preferences | Profiles | Text
Font to 14pt Fira code regular and Check Use Ligatures checkboxNon ASCII Font to 14pt Fira mono and Check Use Ligatures checkboxPreferences | Profiles | Color Presets > SnazzyInstall, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.