$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
The following is mostly taken from the example published at https://mkaz.com/2013/07/03/run-script-at-start-on-debian/
Write an init.d script according to the the dependency-booting specification (see at https://wiki.debian.org/LSBInitScripts).
, say it foo.sh
. Place the script under /etc/init.d
.
ln -s /root/scripts/foo.sh /etc/init.d/foo
Update the runlevel directories under /etc/rc*
:
update-rc.d foo defaults
select pg_terminate_backend(pid) | |
from ( | |
SELECT | |
pid | |
FROM pg_stat_activity | |
WHERE query <> '<insufficient privilege>' | |
AND state <> 'idle' | |
AND pid <> pg_backend_pid() | |
AND query_start < now() - interval '1 minute' | |
ORDER BY query_start DESC) t; |
This script, originally created on April 29, 2015, addressed a different behavior of LibreOffice
installation on macOS at that time. However, it is now outdated and no longer relevant. Please refer to the latest comments for updated information, as much has changed over the past 8–9 years.
sudo curl https://gist.githubusercontent.com/pankaj28843/3ad78df6290b5ba931c1/raw/soffice.sh > /usr/local/bin/soffice && sudo chmod +x /usr/local/bin/soffice
id=0 | |
-- represent actually PIN on nodeMCU such as | |
-- D7 and D5 in this case | |
-- GND needs to be connected | |
sda=7 -- GPIO13 | |
scl=5 -- GPIO14 | |
-- initialize i2c, set pin1 as sda, set pin2 as scl | |
i2c.setup(id,sda,scl,i2c.SLOW) |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bash_profile
# .github/workflows/app.yaml | |
name: My Python Project | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
services: |
Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.
Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple
) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic
module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.
Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.
Older Keychron keyboards (those not based on QMK) use the hid_apple
driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.