Skip to content

Instantly share code, notes, and snippets.

Derobukal RitterHou

View GitHub Profile
@RitterHou
RitterHou / colors.py
Created Jul 2, 2020 — forked from lilydjwg/colors.py
colors.py: show all kinds of terminal colors at a glance
View colors.py
#!/usr/bin/python3
from functools import partial
def colors16():
for bold in [0, 1]:
for i in range(30, 38):
for j in range(40, 48):
print(f'\x1b[{bold};{i};{j}m {bold};{i};{j} |\x1b[0m', end='')
print()
View es-term-test.txt
➜ ab ./test.sh
2020-05-16 13:52:52
Query DSL: {
"query": {
"term": {
"acctId": "A00000000000"
}
},
"size": 0
}
View es-test.sh
#!/usr/bin/env bash
date '+%Y-%m-%d %H:%M:%S'
# 打印查询DSL
echo -n 'Query DSL: '
cat query.json
echo ''
# 默认并发数
cocurrency=60
View ES-7.5.2-mapping.json
{
"acct-trades-bills": {
"mappings": {
"dynamic_templates": [
{
"long_fields": {
"match": "*",
"match_mapping_type": "long",
"mapping": {
"fields": {
View ES-1.5.2-mapping.json
{
"acct-trades-bills": {
"mappings": {
"_default_": {
"dynamic_templates": [
{
"string_fields": {
"mapping": {
"index": "not_analyzed",
"type": "string",
View uBlacklist.txt
*://*.voidcc.com/*
*://*.codeday.me/*
*://*.voidcn.com/*
*://*.codenong.com/*
*://*.helplib.com/*
*://*.jishuwen.com/*
*://*.csdn.net/*
*://stackoverrun.com/*
*://*.itranslater.com/*
*://365airsoft.com/*
View elasticsearch2elastic.py
#!/usr/bin/env python
import datetime
import time
import urllib
import json
import urllib2
import os
import sys
# ElasticSearch Cluster to Monitor
View 动态规划.md
View doughnut.c
#include <math.h>
k;double sin()
,cos();main(){float A=
0,B=0,i,j,z[1760];char b[
1760];printf("\x1b[2J");for(;;
){memset(b,32,1760);memset(z,0,7040)
;for(j=0;6.28>j;j+=0.07)for(i=0;6.28
>i;i+=0.02){float c=sin(i),d=cos(j),e=
sin(A),f=sin(j),g=cos(A),h=d+2,D=1/(c*
View how-to-add-image-to-gist.md

How to add an image to a gist

  1. Create or find a gist that you own.
  2. Clone your gist (replace <hash> with your gist's hash):
    # with ssh
    git clone git@gist.github.com:<hash>.git mygist
    
    # with https
    git clone https://gist.github.com/<hash>.git mygist
You can’t perform that action at this time.