This file contains 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 bash | |
OS=`uname -s` | |
if [ $OS != "Darwin" ]; then | |
echo "This script is OSX-only. Please do not run it on any other Unix." | |
exit 1 | |
fi | |
if [[ $EUID -eq 0 ]]; then |
This file contains 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 alpine:3.14 | |
MAINTAINER AKQA 2022 <Wel.Tech@akqa.com> | |
ENV DOCROOT="/var/www/html/" | |
WORKDIR $DOCROOT | |
RUN apk update && apk upgrade | |
COPY .aws/foo-cron/hourly/* /etc/periodic/hourly/ |
This file contains 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
- Open recent file (Not workspace) | |
* https://github.com/Microsoft/vscode/issues/49629 | |
- DISABLE: Opening a file in a different location to my current location, the file hierarchy navigation will automatically drop to there | |
- CHECK: How to debug Python in VSCode | |
* See: https://github.com/microsoft/ptvsd/blob/master/TROUBLESHOOTING.md | |
Extensions: | |
DotEnv | |
PHP Intellisense |
This file contains 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
Dockerfile Best Practice: | |
* Keep no. RUN directoves to a minimum: | |
- Reduces filesize of generated image | |
- Ensures that changes to the command, regenerates the image properly (viz Dockerfile caching) | |
- Each command creates a new layer which is itself a separate image | |
* Security: | |
- Each service should have a dedicated user+group to use, to minimuse "leakage" from hacks in one service into other services | |
- Check snyk.io for additional security best-practices | |
* Images share commonalities, so makes sense ot use the same Base OS as the O/S' required by services themselves |
This file contains 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
......SHORTCUT ALL THE THINGS! OR | |
"STUFF YOU REALLY NEVER THOUGHT YOU NEEDED TO KNOW"... | |
Scenario: You have multiple _separate_ instances of the same window open e.g. Firefox or Chrome | |
Use: "alt + ~" to switch between them | |
Scenario: You have typed a long command, (or a short one with a long filename) and you need to change something at the end or the beginning: |
This file contains 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
List of PGP tools: | |
Link to Wikipedia: https://en.wikipedia.org/wiki/Pretty_Good_Privacy#Digital_signatures | |
CLI: | |
* gpg2 | |
* https://www.linuxbabe.com/ubuntu/install-veracrypt-ubuntu-16-04-16-10 | |
GUI: |
This file contains 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
Laptop: | |
* Webcam | |
* Headphone jack NOT on RHS | |
* 8Gb DDR3/4 RAM | |
* Core i5/i7 | |
* >= 250Gb SSD | |
* 13-14" screen | |
* ~1.2Kg (Lenovo is 2kg) | |
* Chiclet keyboard |
This file contains 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
Add the following methods to your `Image` subclass to allow SVG uploads via `$has_one` `UploadField`'s and uploads via the Asset Admin. | |
Hat-tip to https://github.com/restruct/silverstripe-svg-images. All I've done is: | |
* Removed superfluous SVG template logic | |
* Called `isSVG()` from everywhere | |
* Added comments where appropriate | |
* Put all necessary YML config into one place | |
YML config: |
This file contains 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
#!/bin/bash | |
# | |
# Replace Eklektos' namespaces with the one used in your project. | |
# | |
# Run the following command from the directory containing your project's "app" or "mysite" directory: | |
# | |
# $> ./namespaceify.sh 'Foo\Bar' app | |
# | |
# This will convert for example: namespace Eklektos\Eklektos\Model\FooBar into: namespace Foo\Bar\Model\FooBar |
This file contains 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
Docker image reqs | |
* Ubuntu Bionic | |
* go 1.11.x https://golang.org/doc/install?download=go1.11.4.linux-amd64.tar.gz | |
wget -O /tmp/go-1.11.4.tar.gz https://golang.org/doc/install?download=go1.11.4.linux-amd64.tar.gz \ | |
tar -C /usr/local -xzf /tmp/go-1.11.4.tar.gz \ | |
* php7.1 | |
* nginx |
NewerOlder