Skip to content

Instantly share code, notes, and snippets.

View zhuqling's full-sized avatar

zhuqling zhuqling

  • @xinsailei
  • Guangzhou
View GitHub Profile
@zhuqling
zhuqling / URL Schemes.md
Created August 30, 2022 09:30 — forked from zhuziyi1989/URL Schemes.md
常用 URL Schemes 收集。

关于 URL Scheme 你知道多少?

iOS系统中

由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在APP之间跳转的方法:URL Scheme。简单的说,URL Scheme就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的URL Scheme都是不一样的,如果存在一样的URL Scheme,那么系统就会响应先安装那个 APP 的URL Scheme,因为后安装的 APP 的URL Scheme被覆盖掉了,是不能被调用的。

Android系统中

Android中的 Scheme 是一种页面内跳转协议,是一种非常好的实现机制,通过定义自己的 Scheme 协议,可以非常方便跳转app中的各个页面;通过scheme协议,服务器可以定制化告诉App跳转那个页面,可以通过通知栏消息定制化跳转页面,可以通过H5页面跳转页面等。 URL Scheme 就如同网页的url链接一样,可以打开App或跳转到相应的页面。但是大部分APP没有公开自己的URL Scheme。

@zhuqling
zhuqling / _chrome-ext-auth-identity.md
Created November 12, 2021 01:23 — forked from raineorshine/_chrome-ext-auth-identity.md
How to set up user authentication for a Chrome Extension using the Chrome Identity API

How to set up user authentication for a Chrome Extension using the Chrome Identity API

  1. Create a private key file, from which you can create the manifest key and Application ID, as detailed here: https://stackoverflow.com/questions/23873623/obtaining-chrome-extension-id-for-development
  2. Add the manifest key to "key" in manifest.json
  3. Create a new project in Google Developer Console https://console.developers.google.com/project
  4. Go to "APIs & auth > Credentials" and create new client id for a Chrome Application using the Application ID generated in step 3.
  5. Copy the Client ID to oauth2.client_id in the manifest.json

Deprecated?

安装pyspark + VSCode IDE环境

环境macos 10.14

  • 安装Java 8,系统默认是Java 10,需到oracle官网下载并手动安装
  • 安装scala, brew install scale
  • python版本,建议python 2.7
  • 安装spark, brew install apache-spark
@zhuqling
zhuqling / ArcTextLayer.swift
Created May 13, 2019 23:41 — forked from cemolcay/ArcTextLayer.swift
Draws a curved string on a CALayer with angle, radius and text that you give.
import UIKit
// swift port of stackoverflow answer
// http://stackoverflow.com/a/31301238/2048130
extension CGFloat {
/** Degrees to Radian **/
var degrees: CGFloat {
return self * (180.0 / .pi)
}
@zhuqling
zhuqling / FontInstaller.py
Created December 20, 2018 05:08 — forked from omz/FontInstaller.py
FontInstaller
# FontInstaller (by @olemoritz)
# This script installs a custom TTF font on iOS (system-wide).
# It can be used in one of two ways:
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font
# you'd like to install (if there's a URL in the clipboard, it'll be used by default)
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in...
# menu' setting. This way, you can simply download a ttf file in Safari and open it in
@zhuqling
zhuqling / sem-ver.md
Created October 23, 2018 01:44
sem version版本定义

规则:[major, minor, patch]

  • x.y.z := 主版本.次版本.修订号

标准的版本号“必须 MUST ”采用 XYZ 的格式,其中 X、Y 和 Z 为非负的整数,且“禁止 MUST NOT”在数字前方补零。X 是主版本号、Y 是次版本号、而 Z 为修订号。每个元素“必须 MUST ”以数值来递增。例如:1.9.1 -> 1.10.0 -> 1.11.0。

标记版本号的软件发行后,“禁止 MUST NOT ”改变该版本软件的内容。任何修改都“必须 MUST ”以新版本发行。

主版本号为零(0.y.z)的软件处于开发初始阶段,一切都可能随时被改变。这样的公共 API 不应该被视为稳定版。

@zhuqling
zhuqling / druid.io-index-example.json
Created October 23, 2018 01:37
druid.io 索引示例
{
"type" : "index_hadoop",
"spec" : {
"ioConfig" : {
"type" : "hadoop",
"inputSpec" : {
"type" : "static",
"paths" : "@file"
}
},
@zhuqling
zhuqling / druid.io-schema-example.json
Created October 23, 2018 01:36
druid.io schema示例
{
"dataSource": "wikiticker",
"granularitySpec": {
"type": "uniform",
"segmentGranularity": "day",
"queryGranularity": "none",
"intervals": ["2017-01-19/2017-01-20"]
},
"parser": {
"type": "string",
@zhuqling
zhuqling / druid.io-index-server-api.md
Created October 23, 2018 01:36
Druid.io 索引管理服务接口

Druid.io 索引管理服务接口

Schema

查询所有schema

GET /schema

Response: schema[]

@zhuqling
zhuqling / druid.io-realtime-schema-config.json
Created October 23, 2018 01:35
druid.io实时schema配置
{
"dataSources" : {
"test1" : {
"spec" : {
"dataSchema" : {
"dataSource" : "test1",
"parser" : {
"type" : "string",
"parseSpec" : {
"timestampSpec" : { "column" : "timestamp", "format" : "auto" },