You can format XML in vi using xmllint
:%!xmllint "%" --format
Default indentation is 2 spaces. You can change that by assigning a value to the XMLLINT_INDENT environment variable. To do that without
source "https://rubygems.org" | |
gem 'eventmachine' | |
gem 'sinatra' | |
gem 'yajl-ruby', require: 'yajl' | |
gem 'thin' | |
gem 'em-websocket' |
http://invisible-island.net/xterm/ | |
XTerm Control Sequences | |
Edward Moy | |
University of California, Berkeley | |
Revised by |
""" | |
@debounce(3) | |
def hi(name): | |
print('hi {}'.format(name)) | |
hi('dude') | |
time.sleep(1) | |
hi('mike') | |
time.sleep(1) |
package com.sam016.vsflatomation.service.ble; | |
import java.util.HashMap; | |
import java.util.UUID; | |
public class AllGattCharacteristics { | |
private static HashMap<String, String> attributes = new HashMap(); | |
static { | |
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name"); |
Generally, the Git proxy configuration depends on the Git Server Protocol you use. And there're two common protocols: SSH and HTTP/HTTPS. Both require a proxy setup already. In the following, I assume a SOCKS5 proxy set up on localhost:1080
. But it can also be a HTTP proxy. I'll talk about how to set up a SOCKS5 proxy later.
When you do git clone ssh://[user@]server/project.git
or git clone [user@]server:project.git
, you're using the SSH protocol. You need to configurate your SSH client to use a proxy. Add the following to your SSH config file, say ~/.ssh/config
:
ProxyCommand nc -x localhost:1080 %h %p
{
"apps": {
"http": {
"servers": {
"example": {
"listen": [
":80",
":443"
],
Recently github has a very cramped TOC size,
Some pages are very difficult to read.
this script (paste and run in browser F12)
help maximize the TOC div size.
//github readme.md toc maximize
with(document.querySelector('readme-toc .SelectMenu-modal.mt-1').style){
maxHeight=(document.documentElement.clientHeight-40)+'px'