Microsoft will release GUI app support for WSL in the next Windows 11; more information are here:
These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).
Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.
Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
named Scancode Map
.
I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.
Framework | Throughput (req/s) | Latency (ms) | Consistency (σ ms) |
---|
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
function! ConvertShouldToExpect() | |
let rspec_conversions = { | |
\ 'should': 'to', | |
\ 'should_not': 'not_to', | |
\ 'should_receive': 'to receive', | |
\ 'should_not_receive': 'not_to receive', | |
\ } | |
for [old, new] in items(rspec_conversions) | |
execute "normal! " . ':%s/\v^(\s+)(.+)\.' . old . '>/\1expect(\2).' . new . '/ge' . "\<CR>" |
#!/usr/bin/env ruby | |
# Install gems: | |
# gem install github_api | |
# gem install hub | |
# | |
# Then run script in github repo | |
require 'github_api' | |
g = Github.new |
- Your class can be no longer than 100 lines of code.
- Your methods can be no longer than five lines of code.
- You can pass no more than four parameters and you can’t just make it one big hash.
- When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done. And your view can only know about one instance variable.
You can break these rules if you can talk your pair into agreeing with you.
######################## | |
# Customize the test machine | |
######################## | |
machine: | |
# Set the timezeone - any value from /usr/share/zoneinfo/ is valid here | |
timezone: | |
America/Los_Angeles | |
# Version of ruby to use |
bcx david$ rake stats | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Controllers | 3704 | 2942 | 72 | 479 | 6 | 4 | | |
| Helpers | 1901 | 1529 | 13 | 261 | 20 | 3 | | |
| Models | 5310 | 4116 | 50 | 653 | 13 | 4 | | |
| Libraries | 2167 | 1593 | 51 | 200 | 3 | 5 | | |
| Integration tests | 297 | 217 | 6 | 1 | 0 | 215 | | |
| Functional tests | 3897 | 3065 | 61 | 11 | 0 | 276 | |