Skip to content

Instantly share code, notes, and snippets.

View huxs001's full-sized avatar
:octocat:
I may be slow to respond.

HU Xuesong huxs001

:octocat:
I may be slow to respond.
View GitHub Profile
@huxs001
huxs001 / how-to-ssh-into-windows.md
Created October 18, 2024 13:32 — forked from teocci/how-to-ssh-into-windows.md
How to SSH into Windows 10 or 11?

How to SSH into Windows 10 or 11?

The latest builds of Windows 10 and Windows 11 include a build-in SSH server and client that are based on OpenSSH. This means now you can remotely connect to Windows 10/11 or Windows Server 2019 using any SSH client, like Linux distros. Let's see how to configure OpenSSH on Windows 10 and Windows 11, and connect to it using Putty or any other SSH client.

OpenSSH is an open-source, cross-platform version of Secure Shell (SSH) that is used by Linux users for a long time. This project is currently ported to Windows and can be used as an SSH server on almost any version of Windows. In the latest versions of Windows Server 2022/2019 and Windows 11, OpenSSH is built-in to the operating system image.

@huxs001
huxs001 / aria.sh
Created October 16, 2024 03:37 — forked from amrza/aria.sh
Download List of files with aria2
#!/bin/sh
aria2c --dir=./ --input-file=urls.txt --max-concurrent-downloads=1 --connect-timeout=60 --max-connection-per-server=16 --split=16 --min-split-size=1M --human-readable=true --download-result=full --file-allocation=none
date
# Now create this file in the same directory and paste all urls in it: urls.txt
@huxs001
huxs001 / extract_bam_tag.sh
Created October 11, 2024 01:38 — forked from Shians/extract_bam_tag.sh
Extract BAM tag as tsv
#!/usr/bin/env bash
# called by
# sh extract_bam_tag.sh input.bam BC
# to print read_id and BC tag value
# two arguments, a bam file and the tag to extract
BAM=$1
TAG=$2
@huxs001
huxs001 / github_multiple-accounts.md
Created July 16, 2021 09:09 — forked from JoaquimLey/github_multiple-accounts.md
How to Work with GitHub and Multiple Accounts

Step 1 - Create a New SSH Key

We need to generate a unique SSH key for our second GitHub account.

ssh-keygen -t rsa -C "your-email-address"

Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I've saved the file to ~/.ssh/id_rsa_work.

Step 2 - Attach the New Key