Code Monkey home page Code Monkey logo

sqlweb's Introduction

sqlweb

sql web based on golang, currently only MySQL supported!

build

  1. install golang 1.11+
  2. git clone [email protected]:bingoohuang/sqlweb.git & cd sqlweb
  3. build:
    • go build -o sqlweb
    • go install ./...
    • env GOOS=linux GOARCH=amd64 go build -o sqlweb

docker

docker run -d \
 --name go-sql-web \
 --restart=always \
 -p 8381:8381 \
 -v $(pwd)/appConfig.toml:/root/appConfig.toml:ro \
 registry.cn-hangzhou.aliyuncs.com/bingoo-docker/go-sql-web

center database tables for multiple-tenant databases

CREATE TABLE sqlweb (
  MERCHANT_ID bigint(20) NOT NULL COMMENT '商户ID',
  DB_NAME varchar(50) NOT NULL COMMENT '数据库名',
  DB_USERNAME varchar(50) NOT NULL COMMENT '用户名',
  DB_PASSWORD varchar(100) NOT NULL COMMENT '用户密码',
  PROXY_IP varchar(100) NOT NULL COMMENT '应用接入数据库的IP。',
  PROXY_PORT varchar(100) NOT NULL COMMENT '应用端口号',
  MERCHANT_NAME varchar(50)  NULL COMMENT '商户名称',
  MERCHANT_CODE varchar(20)  NULL COMMENT '商户code',
  HOME_AREA varchar(15)  NULL COMMENT '部署中心',
  CLASSIFIER varchar(45)  NULL COMMENT 'default',
  PRIMARY KEY (MERCHANT_ID),
  UNIQUE KEY MERCHANT_CODE (MERCHANT_CODE)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '数据库信息';

snapshots

Main page:

image

LinksTo & Fast Entries:

image

LinksTo & Fast Entries Config:

image

Show table column info(Right click on the cell):

image

Table head context menu:

image

More Tools for single table (Left click on the ...) :

image

Sql Templates: image

Copy Columns As TSV(Tab separated values, can be pasted in Excel very well): image

others

如何在Mac上关闭后退和前进触控板手势

image

方法1:如果您使用Mac笔记本电脑进行冲浪,您可能已经注意到,在触控板上向左或向右轻轻滑动两个手指会导致网络浏览器向前和向后翻页。 对于一些人来说,这是一个伟大的。 对于其他人来说,它偶然发生的比意外发生更频繁,这可能是恼人的。 image

方法2: 执行命令defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE

UPX

Citing:If you’re concerned about the binary size of your new executable, check out UPX. After installing it on my laptop via brew install upx, I ran upx -9 on an executable created with the above instructions. While the executable was an overly simplistic example, upx compressed it down to 34% of the original size. Even if you don’t care about the size of the binary once it’s on the server, it at least made the scp go faster.

Some useful javascript snippet

date-fns

var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://cdn.bootcss.com/date-fns/1.30.1/date_fns.min.js';
document.head.appendChild(script);

dateFns.parse('20090131')
dateFns.startOfWeek(dateFns.parse('20090131'))

dateFns.format(dateFns.addHours(dateFns.parse('20090131'), 8), 'YYYY-MM-DD HH:mm:ss')

date and time datajs

var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/datejs/date.js';
document.head.appendChild(script);

var jan312009 = new Date(2009, 1-1, 31);
var oneMonthFromJan312009 = new Date(jan312009).add(1).month();

// What date is next thursday?
Date.today().next().thursday();

// Add 3 days to Today
Date.today().add(3).days();

// Is today Friday?
Date.today().is().friday();

// Number fun
(3).days().ago();

// 6 months from now
var n = 6;
n.months().fromNow();

// Set to 8:30 AM on the 15th day of the month
Date.today().set({ day: 15, hour: 8, minute: 30 });

function yyyy_mm_dd (date) {
    var now = new Date(date)
    year = "" + now.getFullYear();
    month = "" + (now.getMonth() + 1); if (month.length == 1) { month = "0" + month; }
    day = "" + now.getDate(); if (day.length == 1) { day = "0" + day; }
    return year + "-" + month + "-" + day;
}

function yyyy_mm_dd_hh_mm_ss (date) {
    var now = new Date(date)
    hour = "" + now.getHours(); if (hour.length == 1) { hour = "0" + hour; }
    minute = "" + now.getMinutes(); if (minute.length == 1) { minute = "0" + minute; }
    second = "" + now.getSeconds(); if (second.length == 1) { second = "0" + second; }
    return yyyy_mm_dd(date) + " " + hour + ":" + minute + ":" + second;
}

yyyy_mm_dd_hh_mm_ss(new Date('2018-08-30 16:53:14').add(1).month())

sqlweb's People

Contributors

bingoohuang avatar gucovip avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.