Skip to content

Instantly share code, notes, and snippets.

View aaronchn's full-sized avatar

Aaron aaronchn

View GitHub Profile
@deneschen
deneschen / 开启xterm终端256色和终端下vim 256色
Last active September 13, 2022 07:56
开启xterm终端256色和终端下vim 256色
相同的colorschema,vim和gvim的颜色差距还是很大的,因为gvim使用X的颜色,而vim只能使用终端提供的颜色,所以造成了二者的显示差异。
xterm开启256色
现在的终端模拟器早就支持256色了,不过默认可能还是8色的。
开启xterm终端,查看xterm终端支持的颜色
命令:
$ tput colors
8
@scrapehero
scrapehero / geocoder.py
Created March 30, 2017 07:57
Python script to parse unstructured addresses
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']:
@JayH5
JayH5 / acme-cert-dump.py
Created October 19, 2016 12:03
Dump certificates from Traefik's acme.json
#!/usr/bin/env python
import argparse
import base64
import json
import os
import shlex
import subprocess
import sys
@minhdanh
minhdanh / gist:14c379a31b71c5a85c02
Last active April 17, 2020 15:28
nodogsplash.conf
#
# 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.