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
- 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
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 |
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
1. Censorship resistant resource access. | |
Govts turn off the internet. (Egypt 2014). Use of peer to peer resource access allows N geographically proximate users accesss to the same file or resources, assuming at least one peer has downloaded them already, for everyone else to get it through them. | |
2. Broken Links. | |
The original tenets of the web are violated daily: Links to corporate-supplied services and resources are taken down when censored or when that service goes down or when that corporate goes out of business, or when a hitherto free resource is hidden behind a paywall. Burning books anyone? | |
3. Verifiability. |
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 | |
# | |
# Russell Michell 2018 <[email protected]> | |
# | |
# What is this? | |
# | |
# Provides an indication of any security vulnerabilities in a project's composer and npm dependencies | |
errors_npm=0 | |
errors_cmp=0 |
NewerOlder