I hereby claim:
- I am onnimonni on github.
- I am onnimonni (https://keybase.io/onnimonni) on keybase.
- I have a public key ASBEolFdlopdbp9M-WWDjR7eC911qcQ0iEdrW05TevOxxwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
We used Niftydrive with Sandisk 128gb UHS-I Micro SD Card and this config to allocate more space for Macbooks with small ssd drives. For 128gb and 256gb models this is a lot more space.
Save yourself the trouble and don't try to buy UHS-II cards since they don't have better performance vs UHS-I in Mac.
Please use Filevault encryption in your main hard-drive. This setup makes it easy to use Time machine backups to the contents of the SD card too.
#!/bin/bash | |
set -ex | |
# This is a hack to use wpallimport without http request. | |
# We need this to be synchronized so that importers don't overlap and cause too much strain | |
# Import Asunnot with wpallimport | |
php -e -r 'parse_str("import_key=XXXXXXXXX&import_id=16&action=trigger", $_GET); include "/data/code/web/wp/wp-cron.php";' | |
# Wait until importer is ready |
#!/bin/bash | |
# Copyright © 2015 Bjørn Johansen | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
# Source: https://bjornjohansen.no/wordpress-cron-wp-cli | |
# Github: https://gist.github.com/bjornjohansen/a00a9fee5475c4dadb56#file-run-wp-cron-sh | |
# This is modified for our container. In this container you don't need to use --path | |
# because it's automatically included |
#!/bin/bash | |
# envsubst like substitution; only replacing ${VAR} if they exists | |
# based on http://mywiki.wooledge.org/TemplateFiles | |
# source: https://gist.github.com/pebo/c30d9b4819e908a305244874c916a4dc | |
while read -r; do | |
while [[ $REPLY =~ \$(\{([a-zA-Z_][a-zA-Z_0-9]*)\})(.*) ]]; do | |
if [[ -n ${!BASH_REMATCH[2]} ]]; then | |
printf %s "${REPLY%"$BASH_REMATCH"}${!BASH_REMATCH[2]}" | |
else | |
printf %s "${REPLY%"$BASH_REMATCH"}\$${BASH_REMATCH[2]}" |
#!/bin/sh | |
## | |
# This script contains helper for sha256 validating your downloads | |
# | |
# Source: https://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1 | |
# Author: Onni Hakala | |
# License: MIT | |
## | |
# Stop program and give error message |
#!/bin/bash | |
## | |
# This startup script adds all docker container ENVs to php-fpm ENVs by adding them into static config file | |
## | |
php_config_file=/etc/php-fpm.d/env.conf | |
# Don't recreate the php-fpm file if it exists ( the container was restarted ) | |
if [ ! -f $php_config_file ]; | |
then |
<?php | |
/** | |
* Plugin Name: Disable All Updates and External Connections | |
* Description: Plugin which disables core, plugin and theme updates and connections to wordpress.org This is quite useful in local development | |
* Version: 1.0.0 | |
* Author: Onni Hakala | |
* Author URI: https://github.com/onnimonni | |
* License: MIT License | |
*/ |
#!/bin/bash | |
## | |
# Script to run WP All Import scripts sychronously with cron | |
## | |
# This is default wp core directory for us | |
ABSPATH="/var/www/project/wp" | |
function usage() | |
{ |
<?php | |
/** | |
* Plugin Name: Mercator https domain alias | |
* Description: Redirects mercator aliases into main site when wp-admin is accessed | |
* Version: 0.1 | |
* Author: Onni Hakala / Geniem Oy | |
* Author URI: https://github.com/onnimonni | |
* License: MIT | |
*/ |