This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
相同的colorschema,vim和gvim的颜色差距还是很大的,因为gvim使用X的颜色,而vim只能使用终端提供的颜色,所以造成了二者的显示差异。 | |
xterm开启256色 | |
现在的终端模拟器早就支持256色了,不过默认可能还是8色的。 | |
开启xterm终端,查看xterm终端支持的颜色 | |
命令: | |
$ tput colors | |
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from requests import get | |
from pprint import pprint | |
from json import dump | |
from csv import QUOTE_ALL, DictWriter | |
API_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
def address_resolver(json): | |
final = {} | |
if json['results']: | |
data = json['results'][0] | |
for item in data['address_components']: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import base64 | |
import json | |
import os | |
import shlex | |
import subprocess | |
import sys | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Nodogsplash Configuration File | |
# | |
# Parameter: GatewayInterface | |
# Default: NONE | |
# | |
# GatewayInterface is not autodetected, has no default, and must be set here. | |
# Set GatewayInterface to the interface on your router | |
# that is to be managed by Nodogsplash. |