Skip to content

Instantly share code, notes, and snippets.

View beyoung's full-sized avatar
🥋
Focusing

beyoung beyoung

🥋
Focusing
View GitHub Profile
[{"name":"All Time","data":[{"x":1,"y":748,"ride":3700226,"date":1550025352000},{"x":2,"y":639,"ride":3700226,"date":1550025352000},{"x":3,"y":617,"ride":3700237,"date":1550384804000},{"x":4,"y":608,"ride":3700237,"date":1550384804000},{"x":5,"y":600,"ride":3700237,"date":1550384804000},{"x":6,"y":592,"ride":3700237,"date":1550384804000},{"x":7,"y":580,"ride":3700237,"date":1550384804000},{"x":8,"y":573,"ride":3700237,"date":1550384804000},{"x":9,"y":571,"ride":3700237,"date":1550384804000},{"x":10,"y":570,"ride":3700237,"date":1550384804000},{"x":11,"y":568,"ride":3700237,"date":1550384804000},{"x":12,"y":566,"ride":3700237,"date":1550384804000},{"x":13,"y":563,"ride":3700237,"date":1550384804000},{"x":14,"y":563,"ride":3700237,"date":1550384804000},{"x":15,"y":562,"ride":3700237,"date":1550384804000},{"x":16,"y":561,"ride":3700237,"date":1550384804000},{"x":17,"y":560,"ride":3700237,"date":1550384804000},{"x":18,"y":559,"ride":3700237,"date":1550384804000},{"x":19,"y":559,"ride":3700237,"date":1550384804000
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<title>不等距折线图</title>
<script src="jquery.js"></script>
<script src="echarts-en.common.min.js"></script>
</head>
<body>
<div id="main" style="height:400px"></div>
<script type="text/javascript">
# ArangoDB configuration file
#
# Documentation:
# https://docs.arangodb.com/latest/Manual/Administration/Configuration/
#
[database]
directory = /var/lib/arangodb3
# maximal-journal-size = 33554432
{
"stackOrchestrator" : "swarm",
"credSstore" : "osxkeychain",
"auths" : {
"https://registry.cn-hangzhou.aliyuncs.com" : {
},
"https://registry.cn-shanghai.aliyuncs.com" : {
}
@beyoung
beyoung / docker-compose.yml
Created April 1, 2019 14:26
docker-compose file for jetbrains team-city
version: '3.1'
services:
db:
container_name: teamcity-postgres
image: postgres:10-alpine
restart: always
environment:
- POSTGRES_PASSWORD=12345678
volumes:
@beyoung
beyoung / jit.c
Created March 30, 2019 15:01 — forked from skeeto/jit.c
Basic JIT
/* http://redd.it/2z68di */
#define _BSD_SOURCE // MAP_ANONYMOUS
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/mman.h>
#define PAGE_SIZE 4096
@beyoung
beyoung / rownum.sql
Created March 21, 2019 10:35 — forked from tototoshi/rownum.sql
Grouped LIMIT in PostgreSQL: show the first N rows for each group
-- http://stackoverflow.com/questions/1124603/grouped-limit-in-postgresql-show-the-first-n-rows-for-each-group
-- http://www.postgresql.jp/document/9.2/html/tutorial-window.html
CREATE TABLE empsalary (
depname varchar(10) not null
, empno integer not null
, salary integer not null
);
INSERT INTO empsalary (depname, empno, salary) VALUES ('develop', 11, 5200);

数据备份:pg_dump -h [host] -p [3433] -U [user] -F c -b -v -f file.backup [dbname]

数据还原:pg_restore -h [host] -p [3433] --dbname=[dbname] --jobs=4 --verbose file.backup -U [user]

@beyoung
beyoung / asymmetric.go
Created February 12, 2019 15:35 — forked from cryptix/LICENSE
example of using JWT for http authentication in go
package main
// using asymmetric crypto/RSA keys
import (
"crypto/rsa"
"fmt"
"io/ioutil"
"log"
"net/http"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.