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 are the steps to create a folder with dependencies for a specific python version for AWS lambda | |
| # | |
| # create a folder | |
| mkdir folder1 | |
| # now run docker to | |
| docker run --rm -v `pwd`:/var/task:z lambci/lambda:build-python3.8 python3.8 -m pip --isolated install -t folder1 pdpyras simple-salesforce |
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
| # substitute app with anything you want | |
| RUN addgroup --gid 10001 app | |
| RUN adduser --gid 10001 --uid 10001 --home /app --shell /sbin/nologin --disabled-password app |
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
| # single database | |
| SELECT SUM(((DATA_LENGTH + INDEX_LENGTH)/1024/1024)) AS "MB" | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE TABLE_SCHEMA = "wordpress"; | |
| # all instance | |
| SELECT TABLE_SCHEMA as 'Database', | |
| SUM(((DATA_LENGTH + INDEX_LENGTH)/1024/1024)) AS "MB" | |
| FROM INFORMATION_SCHEMA.TABLES |
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
| nginx: | |
| image: 'bitnami/nginx' | |
| ports: | |
| - '8080:80' | |
| links: | |
| - phpfpm | |
| volumes: | |
| - ./logs/access.log:/opt/bitnami/nginx/logs/myapp-access.log | |
| - ./logs/error.log:/opt/bitnami/nginx/logs/myapp-error.log | |
| - ./nginx/app.conf:/bitnami/nginx/conf/vhosts/app.conf |
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
| FROM ubuntu:16.04 | |
| MAINTAINER Sven Dowideit <SvenDowideit@docker.com> | |
| RUN apt-get update && apt-get install -y openssh-server | |
| RUN mkdir /var/run/sshd | |
| RUN echo 'root:screencast' | chpasswd | |
| RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
| # SSH login fix. Otherwise user is kicked off after login | |
| RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd |
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
| $('a').each(function() | |
| { | |
| var reg_exp = new RegExp('/' + window.location.host + '/'); | |
| if (!reg_exp.test(this.href)) | |
| { | |
| // External Link Found | |
| $(this).attr('rel','nofollow'); | |
| } | |
| }); |
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
| # install macports | |
| # update hostname + /etc/host | |
| sudo hostname dw-mbp-home | |
| # add user account + configure keys in sshd_config + add ssh key |