Author Archives: cowman.chiang

Wisemapping REST API

只有幾個… 不知道哪邊才有詳細的API List … Orz Ref. wisemapping-support › create and register a user via REST API Obtaining user information by email: * Template Path: /service/admin/users/email/{user.email}.json * Example: curl “http://{host.name}:{host.port}/{context.path}/service/admin/users/email/{user.email}.json” –get –basic -u “admin@wisemapping.org:admin” Deleting a based on the user id: … Continue reading

Posted in Wisemapping | Leave a comment

[Wisemapping] find user by email in Python

#! /usr/bin/python # coding:utf-8 # curl “http://localhost:8080/wisemapping/service/admin/users/email/{使用者帳號信箱}.json” –get –basic -u “admin@wisemapping.org:admin” import sys import urllib2 import base64 import yaml import datetime username = ‘admin@wisemapping.org’ password = ‘admin’ if len(sys.argv) == 2: request = urllib2.Request(“http://localhost:8080/wisemapping/service/admin/users/email/%s.json” % sys.argv[1]) base64string = base64.encodestring(‘%s:%s’ % … Continue reading

Posted in Python, Wisemapping | Leave a comment

安裝Ubuntu在VMware環境出現 Host SMBus controller not enabled!

修改/etc/modprobe.d/blacklist.conf vim /etc/modprobe.d/blacklist.conf # 最後面加上 blacklist i2c-piix4

Posted in Ubuntu, VMware | Leave a comment

Ubuntu 關閉 ipv6

修改設定檔 sudo vim /etc/sysctl.conf # 最後面加入下面 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 直接套用 sudo sysctl -p

Posted in Ubuntu | Leave a comment

Wisemapping in Ubuntu 14.04 x64 server

Wisemapping 環境 : Ubuntu 14.04 x64 server 檢查系統是否已裝了 java development kit,如果是openjdk就先移除掉 java -version 安裝 Java Development Kit (版本>7) sudo apt-get install software-properties-common python-software-properties sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer 下載 wisemapping binary檔案 wget https://bitbucket.org/wisemapping/wisemapping-open-source/downloads/wisemapping-v3.0.4.zip 安裝 unzip … Continue reading

Posted in MySQL, Ubuntu, Wisemapping | Leave a comment

Etherpad-lite in Ubuntu 14.04 x64 server

etherpad 安裝基本套件需求 sudo apt-get install gzip git-core curl python libssl-dev pkg-config build-essential 更新安裝nodejs的來源 sudo curl -sL https://deb.nodesource.com/setup | sudo bash – 安裝nodejs sudo apt-get install nodejs 新增etherpad的使用者 sudo useradd etherpad -m -s /bin/bash -r sudo passwd etherpad 將etherpad使用者加入sudoers中 sudo usermod … Continue reading

Posted in etherpad, MySQL, Nagios, Ubuntu | Leave a comment

vimrc 常用設定值

” ts => 1個tab佔幾個空格 set ts=2 ” sw => 每層縮進的空格數 set sw=2 ” 註解顏色 hi Comment ctermfg =blue ” 字串顏色 hi String ctermfg =darkred ” 類型顏色 hi Type ctermfg =yellow ” 數字顏色 hi Number ctermfg =darkblue ” 常數顏色 hi Constant … Continue reading

Posted in Linux, Vim | Leave a comment

git push 失敗

當要push的時候發生了一點錯誤…. [tdg@udnlap01 mail]$ git push -u 20141028 master Enter passphrase for key ‘/home/tdg/.ssh/id_rsa’: To git@cowman.no-ip.org:udn/udn_mail_log.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to ‘git@cowman.no-ip.org:udn/udn_mail_log.git’ To prevent you from losing history, non-fast-forward updates were rejected Merge … Continue reading

Posted in Git | Leave a comment

MySQL 單向備份

參考: 如何在 MySQL 5.5 設定單向資料庫複寫機制 (Replication) Setting up MySQL replication without the downtime 定義 Master => 被複製抄寫的伺服器 Slave => 執行抄寫的伺服器 修改 Master 端的 mysql 設定 vim /etc/my.cnf (或 vim /etc/ysql/my.cnf) #在[mysqld]區段中加入 server-id=1 log-bin=mysql-bin #需要同步的數據庫名 binlog-do-db= radius #避免同步的數據庫名 binlog-ignore-db= mysql 重新啟動 … Continue reading

Posted in MySQL | Leave a comment

GitLab – Requirements

Source : Hardware requirements CPU 1 core works supports up to 100 users but the application can be a bit slower due to having all workers and background jobs running on the same core 2 cores is the recommended number … Continue reading

Posted in Git | Leave a comment