-
Notifications
You must be signed in to change notification settings - Fork 1
/
notes.txt
111 lines (63 loc) · 2.32 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
*****
TODOS
*****
- https://github.com/typesafehub/play-plugins/tree/master/mailer
- ??? new library for json: https://github.com/jrudolph/json-lenses/
*****************
required settings
*****************
INSERT INTO setting VALUES ('jenkinsUsername', 'jenkinsbuilder');
INSERT INTO setting VALUES ('jenkinsPassword', 'xxxxxxxxxxxxxx');
INSERT INTO setting VALUES ('enablePollings', 'true');
ALLOWED USERS
INSERT INTO login (email) VALUES ('[email protected]');
.....
**********
postgresql
**********
INSTALL
- brew install postgresql
- edit /usr/local/var/postgres/postgresql.conf
==> max_connections = 50
- according to http://willbryant.net/software/mac_os_x/postgres_initdb_fatal_shared_memory_error_on_leopard
sudo sysctl -w kern.sysv.shmall=65536
sudo sysctl -w kern.sysv.shmmax=16777216
- make these settings stick: edit (create) "sudo emacs /etc/sysctl.conf"
kern.sysv.shmall=65536
kern.sysv.shmmax=16777216
START & STOP
start: pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
stop: pg_ctl -D /usr/local/var/postgres stop -s -m fast
CREATE DUMP
/usr/local/bin/pg_dump -h localhost -U scalabuilds --insert scalabuilds > dump.sql
******
heroku
******
- create app:
heroku create --stack cedar
(adds a git remote)
- publish
git push heroku heroku:master
- view logs
heroku logs
- sql console
https://github.com/ddollar/heroku-sql-console
- dump / backup database (https://devcenter.heroku.com/articles/pgbackups)
heroku addons:add pgbackups
heroku pgbackups (list existing)
heroku pgbackups:capture (new backup)
heroku pgbackups:url b004 (get download url)
heroku pgbackups:destroy b003
http://devcenter.heroku.com/articles/import-data-heroku-postgres
http://www.postgresql.org/docs/8.3/static/datatype-numeric.html
**********************
http / rest api tricks
**********************
issue post requests programmatically: open javascript console in chrome on the page,
paste the following (deltes builds in jenkins)
http = new XMLHttpRequest();
http.open("POST", "https://scala-webapps.epfl.ch/jenkins/job/scala-checkin/6444/doDelete", false);
http.send("");
http = new XMLHttpRequest();
http.open("POST", "https://scala-webapps.epfl.ch/jenkins/job/scala-checkin/6443/doDelete", false);
http.send("");