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
// Source: https://x.com/FelippeRegazio/status/1829529731320160675 | |
const result = []; | |
const running = { interval: null }; | |
const $column = document.querySelector('[data-testid="primaryColumn"]'); | |
function scrap() { | |
const $user = $column.querySelector('[data-testid="cellInnerDiv"]'); | |
if (!$user && running.interval) { |
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.
This assumes both machines, server and client, are on the same network and the port that will be used is open for network connections.
Assuming you already have docker installed
vi /lib/systemd/system/docker.service
SELECT version, json_content, pg_try_advisory_xact_lock(s.id) as locked, s.id as id | |
FROM snapshots s | |
WHERE ar_id = $1 | |
-- from https://github.com/crabzilla/crabzilla/blob/f66e43ca4d7c119a00fab68c48386aa7672b0e95/crabzilla-engine-postgres/src/main/java/io/github/crabzilla/engine/command/CommandController.kt#L48 | |
-- more at https://hashrocket.com/blog/posts/advisory-locks-in-postgres |
map <leader>t :call SendToTmux("clear\ryarn test:unit " . expand('%') . "\r")<cr> |
sudo pacman -S postgresql postgis | |
sudo su postgres -l # or sudo -u postgres -i | |
initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data/' | |
exit | |
sudo systemctl enable --now postgresql.service | |
sudo su postgres -c psql | |
CREATE USER deployer WITH PASSWORD 'eldeployerloco'; |
pacman -S interception-tools interception-caps2esc
Create /etc/interception/udevmon.d/caps2esc.yaml
with the following content:
- JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE"
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
class Smallest | |
def self.resolve(array_size, array_of_numbers) | |
( (1..array_size + 1).to_a - array_of_numbers ).min | |
end | |
end |
So today I noticed my git repository was taking too much disk space and discovered it was due to bundler caching gems.
At first I thought I'd just remove vendor/cache
directory it be done with it. But that's not how git works, is it?
That's how I came across git filter-branch
.
The following command will remove the vendor/cache
directory and all its references throughout your repository history.
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch -r vendor/cache"
# 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 | |