Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.6.0/redux.js"></script>
</head>
<body>
<div id="root">
</div>
1. Download Git Bash (only if on Windows)
2. Go to your users folder and open the .ssh folder. Then open Git Bash / Terminal there and generate a key pair:
ssh-keygen -m PEM -t rsa
3. Copy the key to your server:
ssh-copy-id -i <keyname> <user>@<host>
5. Login to your Ubuntu server via SSH:
ssh -i <keyname> <user>@<host>
@tangxiaocheng
tangxiaocheng / merge_pr_and_test_ci
Last active May 9, 2023 22:45
it quickly merges code change and triggers github action workflow on a machine group.
#!/bin/bash
echo "name: $0"
echo "pwd: $(pwd)"
@tangxiaocheng
tangxiaocheng / quick_pr
Last active September 2, 2024 20:19
quick create or merge pr
#!/bin/bash
##############################################################################
##
## File: quick_pr.sh
## Author: Randy
## Date: 2021-09-30
## Description: Create and merge a PR in a agile way. Especially for testing ci/cd pipeline.
## Usage example: ./quick_pr.sh --runner 'github' --repo_path '/path/to/repo' --base_branch 'main'
##
## Required input parameters:
@tangxiaocheng
tangxiaocheng / camera_list.json
Last active September 15, 2024 17:52
camera_list.json
{
"cameras": [
{
"deviceId": "cam001_mav",
"deviceName": "Front Door Camera",
"resolution": "1080p",
"device_model": "WYZEC1",
"isActive": true,
"lastRecordedEvent": "2024-09-01T12:30:45Z"
},