This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name piwik.vandorjw.ca; | |
| root /srv/piwik/piwik; | |
| index index.php index.html index.htm; | |
| access_log /var/log/nginx/ca/vandorjw/piwik/access.log; | |
| error_log /var/log/nginx/ca/vandorjw/piwik/error.log; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [uwsgi] | |
| project_dir = /srv/piwik/piwik | |
| plugin = php | |
| socket = /run/uwsgi-emperor/%n.sock | |
| chmod-socket = 660 | |
| chown-socket = www-data:www-data | |
| uid = www-data | |
| gid = www-data | |
| logto = /var/log/uwsgi/ca_vandorjw_piwik.log | |
| chdir = %(project_dir) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Using TCP-Sockets | |
| [uwsgi] | |
| projectname = com_example_www | |
| base = /srv/site/com/example/www | |
| chdir = %(base)/src/%(projectname) | |
| pythonpath = %(base)/src/%(projectname) | |
| virtualenv = %(base)/venv/%(projectname) | |
| disable-logging = true | |
| logto = %(base)/logs/uwsgi.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3.4 | |
| """ | |
| Short notes and sample code for obtaining weight from Weightronix 6250. | |
| required software: | |
| Linux (any distro will do) | |
| python | |
| pyserial 2.7+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Here are steps: | |
| 1. # yum upgrade | |
| 2. $ curl -O http://fedora.mirror.nexicom.net/epel/6/i386/epel-release-6-8.noarch.rpm | |
| 3. # yum localinstall epel-release-6-8.noarch.rpm | |
| 4. $ curl -O http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm | |
| 5. # yum localinstall pgdg-centos93-9.3-1.noarch.rpm | |
| 6. # yum install postgresql93-server postgresql93-contrib postgresql93-devel | |
| 7. # service postgresql-9.3 initdb | |
| 8. # service postgresql-9.3 start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // named.conf | |
| // | |
| // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS | |
| // server as a caching only nameserver (as a localhost DNS resolver only). | |
| // | |
| // See /usr/share/doc/bind*/sample/ for example named configuration files. | |
| // | |
| options { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a step by step tutorial on how to run uwsgi in emperor mode, | |
| # behind nginx on Fedora 20. I'll add to the tutorial as time goes on. | |
| # SeLinux will likely be a pain (even in permissive mode), so please see my comment on how to fix it. | |
| sudo yum upgrade | |
| sudo yum install nano yum-utils gcc uwsgi-plugin-python3 nginx | |
| yum-builddep python3-psycopg2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo yum install uwsgi uwsgi-plugins-python3 | |
| uwsgi.ini | |
| [uwsgi] | |
| #variables | |
| projectname = vandorjw | |
| base = /var/sites/me/vandorjw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo groupadd $GRP-NAME | |
| sudo usermod -G $GRP-NAME -a $USR-NAME | |
| setfacl -Rm g:$GRP-NAME,d:g:$GRP-NAME:rwX /top/level/directory/location | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| For a server not running X we need to have setools-console and optionally fpaste installed. | |
| fpaste will put the results on the fedora pastebin | |
| (| fpaste optional in each command) | |
| (shell) # yum install setools-console | |
| The following seems to check if booleans are set. | |
| (shell) sesearch -ASCT -s httpd_t -t postgresqld_port_t -c tcp_socket -p name_connect | fpaste |