Skip to content

Instantly share code, notes, and snippets.

View tqyq's full-sized avatar

altman tqyq

  • Earth
View GitHub Profile
apt install postgresql
编辑 /etc/postgresql/9.6/main/pg_hba.conf 允许本地 trust
apt install redmine redmine-pgsql
apt install apache2 libapache2-mod-passenger
cp /usr/share/doc/redmine/examples/apache2-passenger-host.conf /etc/apache2/sites-available/redmine.conf
edit /etc/apache2/sites-available/redmine.conf
a2enmod passenger
a2ensite redmine.conf
docker run -d --name some-postgres -e POSTGRES_PASSWORD=redmine -e POSTGRES_USER=redmine postgres
docker run -e "TZ=Asia/Shanghai" -d --name some-redmine -p 3000:3000 -v /data/redmine:/usr/src/redmine/files --link some-postgres:postgres redmine
set time
option 1: -v /etc/localtime:/etc/localtime:ro
option 2: -e "TZ=Asia/Shanghai"
curl -L https://raw.githubusercontent.com/citusdata/docker/master/docker-compose.yml > docker-compose.yml
docker-compose -p citus up -d
#test
docker exec -it citus_master psql -U postgres
#shutdown
docker-compose -p citus down
@tqyq
tqyq / apache-drill-learn
Created October 3, 2016 02:39
apache drill learning
curl -u xxx:xxx -X POST -H "Content-Type: application/json" -d '{"queryType":"SQL", "query": "SELECT * FOM cp.`employee.json` LIMIT 20"}' http://drill.datahunter.cn/query.json
@tqyq
tqyq / find_and_replace_string
Created August 14, 2016 00:30
replace a string in multiple files in linux command line
find ./ -type f -exec sed -i 's/string1/string2/g' {} \;
@tqyq
tqyq / git ignore file mode
Created May 6, 2016 03:19
git ignore file mode
git config core.filemode false
@tqyq
tqyq / raspberry 使用
Last active June 1, 2016 07:11
raspberry pi 3 使用
设置全屏(撑满不留黑框) https://www.raspberrypi.org/forums/viewtopic.php?f=46&t=47152
vi /boot/config.txt
disable_overscan=1
开机后自运行app
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
防黑屏
nano /etc/lightdm/lightdm.conf
[SeatDefaults]
@tqyq
tqyq / git remove error commit
Created April 8, 2016 03:20
git 删除错误提交的commit
git reset --hard <commit_id>
git push origin HEAD --force
@tqyq
tqyq / mongodb export data to csv
Created April 6, 2016 07:27
mongoexport mongodb export data to csv
mongoexport -d h5pop_dc -c user -q "{ appid: '56fceb9f340cc5571a8b4567'}" --csv --fields openid,phone --out test.csv
@tqyq
tqyq / php mongodb numberlong
Created December 17, 2015 02:25
php mongodb numberlong
edit php.ini and add a line:
mongo.native_long=0