Skip to content

Instantly share code, notes, and snippets.

Setup for password protected Git SSH keys for VS Code on Windows

When working with password protected ssh keys for git in VS Code on Windows, VS Code by default does not ask for the password and times out with a permissions denied message. Adding the key to the SSH agent also does not work, since it needs to be started manually. Of course it can be started in the ~/.profile or ~/.bashrc, but that is not helpful for the VS Code issue.

To fix this we can tell git to use the OpenSSH service of Windows and add the key there, that SSH agent can be started automatically under services and will then also work with VS Code. I found this fix somewhere on the internet after some searching but unfortunately lost the post about it, thus decided to write it down myself to avoid struggling with it again in the future.

Note: This short guide only assists in setting up the key to work nicely with VS Code on Windows.

@newhub-spec
newhub-spec / create-payment-intent.ts
Created December 5, 2024 00:35 — forked from leojbchan/create-payment-intent.ts
Headless WooCommerce & Next.js: Example of API to Create Stripe Payment Intent
import type { NextApiRequest, NextApiResponse } from "next";
import { LineItem } from "../../utils/types/wooCommerceTypes";
import { retrieveProductById } from "../../utils/wooCommerceApi";
import { PaymentIntent } from "../../utils/types/stripeTypes";
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
// retrieve product price from WooCommerce based on ID and multiply by quantity
const getProductTotal = async (lineItem: LineItem) => {
let product: LineItem = await retrieveProductById(
lineItem.product_id.toString()
@newhub-spec
newhub-spec / Swarm.md
Created March 27, 2021 15:03 — forked from errordeveloper/Swarm.md
A quick guide to using Weave Net with Docker Swarm

Weave Net and Docker Swarm

This example show how-to setup a very simple Swarm cluster enabled with Weave Net.

## Infratructure

There are two hosts that have a recent version of Docker Engine running.

These hosts are named host1 and host2, and might have the following in /etc/hosts or you just substitute IP addresses in the commands shown below.

@newhub-spec
newhub-spec / private_fork.md
Created March 23, 2021 06:00 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@newhub-spec
newhub-spec / ispconfig-migration.sh
Created March 22, 2021 21:57 — forked from yorch/ispconfig-migration.sh
ISPConfig 3 script to move installation from one server to another
#!/bin/bash
# Migrate ISPConfig 3 installation from one server to another
# This script should run on the final/destination ISPConfig 3 server
# You must first install the same ISPConfig on the destination server
# and make sure to create all the users from the previous installation
# (ISPConfig creates users for each client and web page)
# Tested on ISPConfig version 3.0.5.3
# Created by Jorge Barnaby (@jbarnaby) - March 2014
# EDIT YOUR PREVIOUS ISPCONFIG SERVER HERE
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: