Skip to content

Instantly share code, notes, and snippets.

distribution downloads_period1 downloads_period2 change_in_downloads
Amazon Linux 768 61010 60242
Debian GNU/Linux 4400 41935 37535
macOS 116 121 5
Arch Linux 8 10 2
Alpine Linux 2 3 1
AlmaLinux 2 2 0
openSUSE Tumbleweed 1 0 -1
Rocky Linux 6 5 -1
SLES 1 0 -1
1
00:00:00,000 --> 00:00:02,000
(音声)
(声音)
2
00:00:02,000 --> 00:00:05,000
そろそろ行かないと
我们差不多该走了
@ringsaturn
ringsaturn / tzf_server_clickable_debugger_prompts.md
Last active September 10, 2023 13:56
GPT Prompts for tzf-server's clickable debugger, from https://github.com/ringsaturn/tzf-server/pull/99

Please write a web page for me using Leaflet. When I left-click on the map:

  1. Call API /api/v1/tz
    curl "http://localhost:8080/api/v1/tz?lng=116.3883&lat=39.9289"
    Response:
    {
      "timezone": "Asia/Shanghai",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ringsaturn
ringsaturn / bye-LoudMurmurs.py
Last active February 19, 2023 09:35
《小声喧哗》批量备份音频文件脚本
import os
import time
from multiprocessing import Pool
from typing import List, TypedDict
import feedparser
import requests
class Author(TypedDict):
package main
import (
"log"
"github.com/fhs/go-netcdf/netcdf"
)
const NC_PATH = "XXX.nc"
@ringsaturn
ringsaturn / gist:4fbd116ad286fd043034782a06171e3f
Created November 9, 2020 12:24 — forked from singhabhinav/gist:132b8196abac026b43fa
Install SSL certificate in Nginx (Using .crt & .ca-bundle certificate files)
Step 1 - Create .crt file
cat domainname.crt domainname.ca-bundle > domainname-ssl-bundle.crt
Step 2-
Add lines for ssl_certificate in nginx configuration
server {
listen 80 default_server;
@ringsaturn
ringsaturn / gist:d617fb7d0c2a55d88c1301e980ecb8e7
Created November 9, 2020 12:24 — forked from singhabhinav/gist:132b8196abac026b43fa
Install SSL certificate in Nginx (Using .crt & .ca-bundle certificate files)
Step 1 - Create .crt file
cat domainname.crt domainname.ca-bundle > domainname-ssl-bundle.crt
Step 2-
Add lines for ssl_certificate in nginx configuration
server {
listen 80 default_server;

WGS-84 坐标系,是 GPS 系统所采用的坐标系。一切正常工作的 GPS 或 GPS 芯片所返回的坐标值都是这个坐标系下的数值。Google 地图采用的卫星图也是按照这个坐标系摆放的。

GCJ-02 坐标系,是我天朝政府搞出来的加密坐标系,也常常被称为“火星坐标系”。包括(但可能不限于)高德地图在内的国内地图服务商采用它来绘制地图。Apple、Google等国外公司在其道路地图中使用的也是高德的数据。BD-09 坐标系则是百度地图专用的坐标系。

在开发一些 LBS 应用时,如果不加处理,很容易出现几种形式的地图之间出现偏移的情况。因此在这几个坐标系之间进行转换非常重要。以下代码就是网络上泄露出的从 WGS-84 转 GCJ-02 的算法,以及 GCJ-02 与 BD-09 的互相转换算法。

@ringsaturn
ringsaturn / .pre-commit-config.yaml
Created November 11, 2019 04:04
pre-commit 三板斧
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
hooks:
- id: flake8