Some notes when I was working with ubuntu-ics. These might not be complete and are probably missing things
- remove/disable apparmor might help
- logs are in syslog (
cat /var/log/syslog)
- OS = Xubuntu (Ubuntu 18.04.1 LTS)
| // This was a test for Jenkins running Docker containers | |
| stage('Build') { | |
| agent { | |
| docker { | |
| image 'composer:latest' | |
| // If you use SSH cloning you need this. TODO - look at tokens for private repos and http clone | |
| args '-v /etc/passwd:/etc/passwd:ro' | |
| // args '-e HOME -v $HOME/.ssh:$HOME/.ssh:ro -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro' | |
| } |
| #!/usr/bin/env bash | |
| set -e | |
| # MIT licensed | |
| # This script is AS-IS where is (no warranty, liability etc - see the license for full details) | |
| # https://opensource.org/licenses/MIT and/or https://en.wikipedia.org/wiki/MIT_License | |
| # Notes: | |
| # * This script is meant to be loaded from the root of the git repo, which can contain a .env file (with project settings) |
| #!/usr/bin/env bash | |
| set -e | |
| # MIT licensed | |
| # This script is AS-IS where is (no warrenty, liability etc - see the license for full details) | |
| # see: https://opensource.org/licenses/MIT and/or https://en.wikipedia.org/wiki/MIT_License | |
| # About: | |
| # This file converts a single file (client.conf) with inline certs into an Untangle compatible client (to be imported) |
| REGISTRY_URI=registry.example.com | |
| APPLICATION_DOCKER_FROM_IMAGE=ubuntu:18.04 | |
| APPLICATION_PHP_VERSION=7.2 | |
| APPLICATION_CODE=some-thing | |
| APPLICATION_NAME=Some\ Thing | |
| APPLICATION_DESCRIPTION=Some\ Thing\ Else | |
| APPLICATION_VENDOR_NAME=Your\ Name | |
| DATA_DIR=../some-thing-data | |
| # Dev only. |
| #!/usr/bin/env bash | |
| set -e | |
| # MIT licensed | |
| # This script is AS-IS where is (no warrenty, liability etc - see the license for full) | |
| # see: https://opensource.org/licenses/MIT and/or https://en.wikipedia.org/wiki/MIT_License | |
| # Note: This script should just be used as an example. Use at your own risk! |
sudo systemctl disable apport.service
| ---x------ 1 nobody nogroup 0 Sep 1 20:34 100 | |
| --w------- 1 nobody nogroup 0 Sep 1 20:34 200 | |
| --wx------ 1 nobody nogroup 0 Sep 1 20:34 300 | |
| -r-------- 1 nobody nogroup 0 Sep 1 20:34 400 | |
| -r-x------ 1 nobody nogroup 0 Sep 1 20:34 500 | |
| -rw------- 1 nobody nogroup 0 Sep 1 20:34 600 | |
| -rwx------ 1 nobody nogroup 0 Sep 1 20:34 700 | |
| <?php | |
| //This is not just about performance, but also readability! | |
| //But if you can get a win win, why not! | |
| //Please read https://nikic.github.io/2012/01/09/Disproving-the-Single-Quotes-Performance-Myth.html | |
| $varA = "Some really long string here dasdlasmd;mas;lemas;lem;lasmel;asme"; | |
| $varB = "Some other string here"; | |
| //Test 1 |
| --Useful queries for database(s) with no documentation | |
| --Note: Phpmyadmin, database() will not work and this needs to be a param | |
| SET @inspect_table = 'change_me'; | |
| SET @database = database(); | |
| --SELECT ALL | |
| SET @s = CONCAT('select * from ', @inspect_table); | |
| PREPARE stmt1 FROM @s; | |
| EXECUTE stmt1; | |
| DEALLOCATE PREPARE stmt1; |