Replace user
with the name of the user you want to ssh as.
Replace the ip
with the ip of the machine / host / vps you want to connect to.
cat ~/.ssh/id_rsa.pub | ssh user@ip "cat >> ~/.ssh/authorized_keys"
type CloudinaryPayload = { | |
id: string; | |
batchId: string; | |
asset_id: string; | |
public_id: string; | |
version: number; | |
version_id: string; | |
signature: string; | |
width: number; | |
height: number; |
Today we ran into an issue adding a multi-database setup to prior single-db setup. Here's how we fixed it and reference links.
From the maintainer of Flask-Migrate, Miguel Grinberg:
I was able to convert a single-db repository to multi-db with the following procedure:
migrations
folder to something else (i.e. migrations-old
)"You write a test by creating a file with a name ending in _test.go
that contains functions named TestXXX with signature func (t *testing.T)
.
The test framework runs each such function; if the function calls a failure function such as
t.Error
or t.Fail
, the test is considered to have failed."
📓 Reference: https://go.dev/doc/code.
To test a file named reverse.go
simply create a file named reverse_test.go
in the package directory
with the following content:
"To remove all downloaded modules, you can pass the -modcache flag to go clean:"
go clean -modcache
📓 Reference: https://go.dev/doc/code
#! /usr/bin/sh | |
# A simple script to upload the file given via the single input parameter | |
# via the full path to the file. | |
# This uses Python to grab the filename, since bash and other shell | |
# scripting languages are comparably unreadable. | |
bucket_name=<that-sexy-bucket-name-of-yours> | |
bucket=s3://$bucket_name/ | |
input=$1 | |
filename=$(python3 -c "print('$1'.split('/')[-1])") |
// __mocks__/fileMock.js | |
module.exports = { | |
src: '/img.jpg', | |
height: 24, | |
width: 24, | |
blurDataURL: 'data:image/png;base64,imagedata', | |
} |
See here: https://www.osradar.com/install-the-latest-version-of-git-centos-8-rhel-oracle-linux/
$ sudo su
# dnf groupinstall "Development Tools"
# dnf install wget unzip curl
# wget https://github.com/git/git/archive/v<latest>.zip -O latestgit.zip
# unzip latestgit.zip
# cd git-<latest>/
# make configure