Skip to content

Instantly share code, notes, and snippets.

View laminko's full-sized avatar
...

La Min Ko laminko

...
View GitHub Profile
@y56
y56 / ERROR launchpadlib 1.10.6 requires testresources which is not installed
Created April 11, 2020 19:26
ERROR: launchpadlib 1.10.6 requires testresources, which is not installed.
https://www.discoverbits.in/864/error-launchpadlib-requires-testresources-which-installed
==
ERROR: launchpadlib 1.10.6 requires testresources, which is not installed.
+2 votes
asked Oct 6, 2019 in Programming Languages by pythonuser (11.5k points)
recategorized Oct 6, 2019 by pythonuser
I am getting the following error when I try to upgrade setuptools:
@devshawn
devshawn / INSTALL_MINIKUBE.MD
Last active January 19, 2022 02:52
Install Kubernetes on Ubuntu 18.04

Install Kubernetes on Ubuntu 18.04

Quick guide to install Kubernetes via Minikube on Ubuntu 18.04.

1. Install VirtualBox

Install VirtualBox to be used as the hypervisor.

sudo apt-get install -y virtualbox virtualbox-ext-pack
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@chetanppatil
chetanppatil / set-dbeaver-timezone-to-UTC.md
Last active December 19, 2023 01:34
Set dbeaver timezone to UTC (default timezone)

For Linux Users

  1. Go to directory: /usr/share/dbeaver
  2. Edit dbeaver.ini file
  3. In that file add -Duser.timezone=UTC this line under -vmargs tag
  4. Save it and restart dbeaver.
  5. Enjoy with correct date without any date conversion.

Finally your dbeaver.ini file will look like this:

@ashish2199
ashish2199 / SQL Server commands and queries.md
Last active July 1, 2024 10:15
List of Microsoft SQL Server queries and commands

To create a Table

	create table risk_clos_rank(
		id_num int IDENTITY(1,1) NOT NULL,
	    username nvarchar(100),
	    datetime_of_decision DATETIME
	);
	
	CREATE TABLE TheNameOfYourTable (
 ID INT NOT NULL IDENTITY(1,1),
@wilvk
wilvk / kill_open_files.sh
Created August 16, 2017 06:50
Linux - Kill all processes of deleted files that are still open
#!/bin/bash
lsof|grep deleted|awk '{print $2}'|xargs kill -9
@macloo
macloo / local_db_test.py
Last active March 12, 2024 18:00
Test your MySQL database connection for Flask-SQLAlchemy
#!/Users/username/Documents/python/projectname/env/bin/python
# change username and projectname above to match yours - the path must match the path in YOUR virtualenv
"""
edit line 1 to match what YOU get when you are in YOUR virtualenv and type:
which python
# NO SPACES in first 3 chars in line 1: #!/
# make sure env is activated!
@AtulKsol
AtulKsol / psql-error-fix.md
Last active April 10, 2024 07:41
Solution of psql: FATAL: Peer authentication failed for user “postgres” (or any user)

psql: FATAL: Peer authentication failed for user “postgres” (or any user)

The connection failed because by default psql connects over UNIX sockets using peer authentication, that requires the current UNIX user to have the same user name as psql. So you will have to create the UNIX user postgres and then login as postgres or use sudo -u postgres psql database-name for accessing the database (and psql should not ask for a password).

If you cannot or do not want to create the UNIX user, like if you just want to connect to your database for ad hoc queries, forcing a socket connection using psql --host=localhost --dbname=database-name --username=postgres (as pointed out by @meyerson answer) will solve your immediate problem.

But if you intend to force password authentication over Unix sockets instead of the peer method, try changing the following pg_hba.conf* line:

from

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?