Skip to content

Instantly share code, notes, and snippets.

View lookis's full-sized avatar

Jingsi lookis

  • 快手
  • BeiJing
  • 04:54 (UTC +08:00)
View GitHub Profile
stages:
- build
- deploy
build:
stage: build
script:
- |
export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG}
export CI_APPLICATION_TAG=${CI_APPLICATION_TAG:-$CI_COMMIT_SHA}
@lookis
lookis / install.sh
Last active December 13, 2022 08:02
在线使用,通过 shlink 跳过来
#!/bin/sh
set -e
is_wsl() {
case "$(uname -r)" in
*microsoft* ) true ;; # WSL 2
*Microsoft* ) true ;; # WSL 1
* ) false;;
esac
}
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>aliyun-public</id>
<mirrorOf>*</mirrorOf>
<name>aliyun public</name>
<url>https://maven.aliyun.com/repository/public</url>
@lookis
lookis / maven_settings.xml
Last active December 13, 2022 08:03
在线使用,通过 shlink 跳过来
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>aliyun-public</id>
<mirrorOf>*</mirrorOf>
<name>aliyun public</name>
<url>https://maven.aliyun.com/repository/public</url>
@lookis
lookis / gist:d1771d8816018305b70fde3591638ba8
Last active September 8, 2023 06:47
snowflake in postgresql
CREATE SEQUENCE IF NOT EXISTS public.global_id_sequence;
CREATE OR REPLACE FUNCTION id_generator()
RETURNS bigint
LANGUAGE 'plpgsql'
AS $BODY$
DECLARE
epoch BIGINT := 1688745600000;
seq_id BIGINT;
now_millis BIGINT;