把 Caps Lock 變成智慧的 Control 以及 Escape :
- 單獨輕按一下就是 Escape 。
- 若按下時同時按著其他鍵,就會是 Control 。
這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)
- Send Escape if you tap Caps Lock alone.
package main | |
import ( | |
"net" | |
"log" | |
"time" | |
) | |
func Ping(proto, addr string, out chan<- string) { | |
c, err := net.Dial(proto, addr) |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect | |
# [email protected] - http://jeroen.massar.ch | |
server { | |
listen 192.0.1.1:80; | |
listen [2001:db8::1]:80; | |
# Redirect all non-HTTPS traffic to the HTTPS variant | |
return 301 https://$host$request_uri; | |
} |
#!/bin/bash | |
set -euo pipefail | |
function myFunction() { | |
myCommand | |
return $? | |
} | |
retry=0 | |
maxRetries=5 |
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect | |
# Forked from [email protected] - http://jeroen.massar.ch | |
# Preparation: you need to install and configure fcgiwrap and set it to listen at fcgiwrap.socket. | |
# An example tutorial: https://www.howtoforge.com/serving-cgi-scripts-with-nginx-on-centos-6.0-p2 | |
# A useful hint: add -f as a parameter to fcgiwrap to redirect the cgi errors to your nginx error log. | |
server { | |
listen 80; | |
server_name git.example.com; | |
import * as admin from 'firebase-admin' | |
import * as fft from 'firebase-functions-test' | |
const ft = fft() | |
import * as sinon from 'sinon' | |
import { makeUppercase, addMessage } from './function' | |
describe('order', () => { | |
describe('makeUpperCase', () => { | |
it('should upper case input and write it to /uppercase', async () => { | |
const fakeSnaphost = ft.firestore.makeDocumentSnapshot({ |
<!DOCTYPE html> | |
<html lang='`en'> | |
<head> | |
<meta charset='utf-8'/> | |
<title>Audio only stream example</title> | |
<script src="//cdn.jsdelivr.net/npm/hls.js@latest"></script> | |
<style> | |
video { | |
width: 640px; | |
height: 360px; |
#!/usr/bin/env bash | |
START_TIME=$SECONDS | |
set -e | |
echo "-----START GENERATING HLS STREAM-----" | |
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
# comment/add lines here to control which renditions would be created | |
renditions=( |