sudo $EDITOR /etc/hosts
# `add 127.0.0.1 <domain_name>`
sudo systemctl restart systemd-resolved.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rspec $(git diff --name-only HEAD~1 HEAD -- '*_spec.rb') | |
rubocop -a $(git diff --name-only HEAD~1 HEAD -- '*_spec.rb') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flatpak run --filesystem=home:ro com.slack.Slack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import connection | |
connection.queries_log.clear() | |
# do some stuff | |
query_count = len(connection.queries) | |
print(f"Number of queries for this request: {query_count}") |
cd /home/alex/.local/share/applications
# select and delete what you don't need
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
class ModelName < ApplicationRecord | |
# INCLUDES | |
# DEFAULT SCOPE | |
# CONSTANTS | |
# ATTR ACCESSORS | |
# ATTRIBUTES | |
# ENUMS | |
# RELATIONS |
This file describes an overall manual deploy instructions of the rails + capistrano application to the VPS.
Connect to server
ssh root@<ip>
Configure user
adduser deployer
Zoom .deb package provided by zoom themselves has very annoying and unnecessary ibus package dependency. Here how u can easily remove it by several lines in your command line:
scratch=$(mktemp -d)
# Extract package contents