Edit /etc/default/keyboard and add the following:
XKBOPTIONS="ctrl:nocaps"
Then run:
sudo dpkg-reconfigure keyboard-configuration
I'm don't think any of this stuff will be interesting to anyone else, but it's just a place for me to write down things I want to remember. :-)
Friday, December 28, 2018
Friday, November 23, 2018
Convert epoch to human readable datetime
- Linux: date -d @1316645223
- BSD and MacOS: date -r 1316645223
Friday, August 31, 2018
Pretty print JSON from command line
echo '{ "element0" : "hi", "element1" : "there" }' | python -m json.tool
prints:
{
"element0": "hi",
"element1": "there"
}
You can also cat a JSON file and pipe to the same command
Ansible become_user for a block of commands
use a block to apply a become_user to a block of commands
- block:
- name: checkout repo
git:
repo: https://github.com/some/repo.git
version: master
dest: "{{ dst }}"
- name: change perms
file:
dest: "{{ dst }}"
state: directory
mode: 0755
owner: some_user
become: yes
become_user: some user
- block:
- name: checkout repo
git:
repo: https://github.com/some/repo.git
version: master
dest: "{{ dst }}"
- name: change perms
file:
dest: "{{ dst }}"
state: directory
mode: 0755
owner: some_user
become: yes
become_user: some user
Subscribe to:
Posts (Atom)