Skip to content

Instantly share code, notes, and snippets.

View simonqian's full-sized avatar

simonqian simonqian

View GitHub Profile
@simonqian
simonqian / docker-compose.yml
Last active July 20, 2022 06:46
JanusGraph Dynamic Graphs Docker Config: use cassandra and es
version: "3"
services:
jce-janusgraph:
image: janusgraph/janusgraph:0.5
container_name: jce-janusgraph
environment:
JANUS_PROPS_TEMPLATE: cql-es
janusgraph.storage.hostname: 192.168.0.1
janusgraph.storage.port: 9042
  window.addEventListener('resize', resizeWidth)
 
  function resizeWidth() {
    console.log('resize')
    const body = document.getElementsByTagName('body')[0]
    var heRatio = window.innerHeight / 1080
    var widRatio = window.innerWidth / 1920
    var ratio = widRatio + ',' + heRatio
 body.style.transform = 'scale(' + ratio + ')'
@simonqian
simonqian / idea-run-dashboard.md
Created December 7, 2018 03:07
open idea run dashboard
  1. open the .idea/workspace.xml
  2. find RunDashboard
  3. add new option
<option name="configurationTypes">
  <set>
    <option value="SpringBootApplicationConfigurationType" />
  </set>
</option>
@simonqian
simonqian / classnotfoundexception-after-include-local-jar-to-maven-project.md
Created November 1, 2018 09:36
classnotfoundexception-after-include-local-jar-to-maven-project

To export

If it's an entire DB, then:

$ mysqldump -u [uname] -p[pass] db_name > db_backup.sql

If it's all DBs, then:

$ mysqldump -u [uname] -p[pass] --all-databases > all_db_backup.sql
@simonqian
simonqian / wine_fontsmoothing.reg
Created February 24, 2018 06:46 — forked from cdfmr/wine_fontsmoothing.reg
Enable font smoothing in wine
REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
"FontSmoothingType"=dword:00000002
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001
@simonqian
simonqian / Speed Up Terminal App in Mac
Created January 22, 2018 05:59
Speed Up Terminal App in Mac
sudo rm -rf /private/var/log/asl/*.asl
@simonqian
simonqian / dynamic-specifications-with-vue.html
Last active April 20, 2018 03:44
动态规格生成表格vue版
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>规格选择</title>
<style>
*,
html,
body,
@simonqian
simonqian / dynamic-specifications-with-jquery.html
Last active April 20, 2018 03:44
动态规格生成表格
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>规格选择</title>
<style>
*,
html,
body,
function cartesian() {
return _.reduce(arguments, function (a, b) {
return _.flatten(_.map(a, function (x) {
return _.map(b, function (y) {
return x.concat([y])
})
}), true)
}, [[]])
}