File tree 6 files changed +28
-33
lines changed
6 files changed +28
-33
lines changed Original file line number Diff line number Diff line change @@ -39,18 +39,17 @@ git commit -m "commit message"
39
39
40
40
git commit --amend
41
41
git commit --amend -m " revise message"
42
- ```
43
-
44
42
45
43
git branch feature132
46
44
git checkout feature132
47
45
48
46
# Create branch and checkout
49
47
git checkout -b feature132
50
-
48
+ ```
51
49
52
50
##### Disable IPTables
53
51
52
+ ``` sh
54
53
iptables -F
55
54
iptables -X
56
55
iptables -t nat -F
@@ -60,12 +59,12 @@ iptables -t mangle -X
60
59
iptables -P INPUT ACCEPT
61
60
iptables -P OUTPUT ACCEPT
62
61
iptables -P FORWARD ACCEPT
63
-
62
+ ```
64
63
65
64
##### Find suspicious process
66
65
66
+ ``` sh
67
67
lsof -i | less
68
-
69
- note the PID
70
-
71
- lsof | grep pid
68
+ # note the PID
69
+ lsof | grep pid
70
+ ```
Original file line number Diff line number Diff line change 9
9
10
10
##### Create App
11
11
12
- `phonegap create path/to/my-app --id "com.example.app" --name "My App"
12
+ ` phonegap create path/to/my-app --id "com.example.app" --name "My App" `
13
13
14
14
###### App Templates
15
15
Original file line number Diff line number Diff line change
1
+ ## PostgreSQL Commands
1
2
2
- #### Switch User to Postgres
3
+ ``` sh
3
4
root@server$: su - postgres
4
-
5
5
postgres@server$: psql
6
-
7
- #### Switch Database
8
6
postgres=# \c mydatabase
9
-
10
7
postgres=# \list
11
-
12
8
postgres=# \dt
9
+ ```
13
10
11
+ ``` sql
14
12
GRANT ALL PRIVILEGES ON DATABASE mydatabase TO myuser
15
13
ALTER DATABASE mydatabase OWNER TO myuser;
16
-
17
14
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO mydatabase;
18
15
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO mydatabase;
16
+ ```
19
17
20
-
21
-
18
+ ``` sh
22
19
sudo su - postgres
23
20
createuser -d -E -i -l -P -r -s myuser
24
21
psql -U postgres
@@ -27,5 +24,5 @@ CREATE DATABASE mydatabase
27
24
psql -h localhost -U myuser -W
28
25
\q
29
26
psql -h localhost -d mydatabase -U myuser -W < schema.sql
30
-
31
- psql -h localhost -d mydatabase -U myuser -W
27
+ psql -h localhost -d mydatabase -U myuser -W
28
+ ```
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ QuickRef
3
3
4
4
A collection of commands, scripts and config I have used and need to refer often
5
5
6
- [ iOS] ( iOS.md )
7
- [ LinuxCommands] ( LinuxCommands.md )
8
- [ NGINX] ( NGINX.md )
9
- [ Phonegap] ( Phonegap.md )
10
- [ RaspberryPi] ( RaspberryPi.md )
11
- [ SSL] ( SSL.md )
12
- [ VPSSetup] ( VPSSetup.md )
13
- [ Wordpress] ( Wordpress.md )
6
+ - [ iOS] ( iOS.md )
7
+ - [ LinuxCommands] ( LinuxCommands.md )
8
+ - [ NGINX] ( NGINX.md )
9
+ - [ Phonegap] ( Phonegap.md )
10
+ - [ RaspberryPi] ( RaspberryPi.md )
11
+ - [ SSL] ( SSL.md )
12
+ - [ VPSSetup] ( VPSSetup.md )
13
+ - [ Wordpress] ( Wordpress.md )
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ sudo vim /etc/wpa_supplicant/wpa_supplicant.conf
6
6
7
7
add to last
8
8
9
- `
9
+ ```
10
10
network={
11
11
ssid="your_wifi_ssid"
12
12
psk="your_wifi_password"
13
13
}
14
- `
14
+ ```
15
15
16
16
restart wifi network interface
17
17
Original file line number Diff line number Diff line change 3
3
4
4
Generate a private key from within the Start SSL control panel. Save it securely.
5
5
6
- cat key.crt sub.class3.server.ca.pem ca.pem > key.crt
6
+ ` cat key.crt sub.class3.server.ca.pem ca.pem > key.crt `
7
7
8
8
9
9
##### Remove password from private key
10
10
11
- openssl rsa -in ssl.key -out ssl.key
12
-
11
+ ` openssl rsa -in ssl.key -out ssl.key `
13
12
14
13
If you get a PEM_read_bio error on ` nginx -t `
15
14
Open concatenated .crt file in vim and add a new line in between where the new line is missing
You can’t perform that action at this time.
0 commit comments