- Download getcomposer.org/composer.phar to your account's home directory —
/home/username. - Edit
.bashrcfile in same directory by addingalias composer='/usr/local/php56/bin/php-cli ~/composer.phar'line. Updatephp56part to current relevant version, if necessary. - Restart SSH session or run
source ~/.bashrcto reload config. - Use
composercommand!
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
| #!/bin/sh | |
| ## backup each mysql db into a different file, rather than one big file | |
| ## as with --all-databases. This will make restores easier. | |
| ## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
| ## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
| ## Create the user and directories | |
| # mkdir -p /var/backups/mysql/databases | |
| # useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup | |
| ## Remember to make the script executable, and unreadable by others |
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
| <!-- Prevent FOUC (flash of unstyled content) - http://johnpolacek.com/2012/10/03/help-prevent-fouc/ --> | |
| <style type="text/css"> | |
| .no-fouc {display: none;} | |
| </style> | |
| <script type="text/javascript"> | |
| document.documentElement.className = 'no-fouc'; | |
| // add to document ready: $('.no-fouc').removeClass('no-fouc'); | |
| </script> |
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 sqlalchemy import func | |
| from sqlalchemy.types import UserDefinedType, Float | |
| class EasyGeometry(UserDefinedType): | |
| def get_col_spec(self): | |
| return "GEOMETRY" | |
| def bind_expression(self, bindvalue): |
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
| <?php | |
| /** | |
| * To get this to work, you need to tinker with the acf/settings/ filter and reset the default language | |
| * so that the get_field() function returns the correct results even when not on the default language. | |
| * | |
| * You can add the filter before you call the get_field() function and then call it again with the current | |
| * language to reset it again, so it will affect other pages. | |
| * | |
| * answer courtesy of James of ACF Support | |
| */ |
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
| <?php | |
| function fwp_custom_pager() { | |
| ?> | |
| <script> | |
| (function($) { | |
| $(document).on('click', '.pagination a', function(e) { | |
| if ('object' === typeof FWP) { | |
| e.preventDefault(); | |
| var matches = $(this).attr('href').match(/\/page\/(\d+)/); |
I keep fixing this up, but if it fails for you, check if these are better maintained https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.
Cloning the repo using one of the below techniques should work correctly but you may still be getting an unrecognized import error.
As it stands for Go v1.13, I found in the doc that we should use the GOPRIVATE variable like so:
GOPRIVATE=github.com/ORGANISATION_OR_USER_NAME go get -u -f github.com/ORGANISATION_OR_USER_NAME/REPO_NAME
The 'go env -w' command (see 'go help env') can be used to set these variables for future go command invocations.
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
| #cloud-config | |
| # Enable automatic package updates and upgrades during cloud-init execution | |
| package_update: true | |
| package_upgrade: true | |
| packages: | |
| # Security and Hardening | |
| - ufw | |
| - fail2ban |