Skip to content

Instantly share code, notes, and snippets.

View TomiToivio's full-sized avatar

Tomi Toivio TomiToivio

View GitHub Profile
#
# WARNING: heavily refactored in 0.9.0 release. Please review and
# customize settings for your setup.
#
# Changes: in most of the cases you should not modify this
# file, but provide customizations in jail.local file,
# or separate .conf files under jail.d/ directory, e.g.:
#
# HOW TO ACTIVATE JAILS:
#
@TomiToivio
TomiToivio / wordpress.sh
Created June 14, 2019 18:30
WordPress installation commands
# Install some PHP libraries.
sudo apt-get install php-curl, php-zip, php-mbstring, php-xml, php-soap
# Create database for WordPress.
mysql -u root -p
CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE wordpress;
GRANT ALL ON wordpress.* TO 'wordpress'@'localhost';
# To use mod rewrite add this to your virtualhost file.
@TomiToivio
TomiToivio / wp-permissions-script
Created April 6, 2019 22:31 — forked from macbleser/wp-permissions-script
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # <-- wordpress owner
WP_GROUP=changeme # <-- wordpress group
WP_ROOT=/home/changeme # <-- wordpress root directory

Keybase proof

I hereby claim:

  • I am tomitoivio on github.
  • I am tomi (https://keybase.io/tomi) on keybase.
  • I have a public key ASBqguDRmCCyHcVHLe3HStKzVodCGvZHNNF1sauwa8iPEAo

To claim this, I am signing this object:

@TomiToivio
TomiToivio / gist:009c22781d260bd392aefbd8a2169ef0
Created March 6, 2018 23:22 — forked from corsonr/gist:9152652
WooCommerce : add custom fields to product variations
<?php
//Display Fields
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 3 );
//JS to add fields for new variations
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' );
//Save variation fields
add_action( 'woocommerce_process_product_meta_variable', 'save_variable_fields', 10, 1 );
/**

Keybase proof

I hereby claim:

  • I am TomiToivio on github.
  • I am tomi (https://keybase.io/tomi) on keybase.
  • I have a public key whose fingerprint is 4857 DF2D B5F1 22E9 D77D 2A26 C49F 94FA 5C95 6101

To claim this, I am signing this object:

Verifying that +tomitoivio is my blockchain ID. https://onename.com/tomitoivio
@TomiToivio
TomiToivio / dabblet.css
Created June 16, 2016 10:31
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@TomiToivio
TomiToivio / tulostinkartta.php
Last active May 23, 2016 15:36
Tulostinkartta
<?php
/*
Plugin Name: 3D-Tarvike Tulostinkartta
Plugin URI: http://tulostimet.3d-tarvike.fi/
Description: 3D-Tarvike Tulostinkartta
Version: 1.0
Author: Tomi Toivio
Author URI: http://sange.fi/
License: GPL2
*/
@TomiToivio
TomiToivio / tulostinkartta.php
Last active May 23, 2016 15:31
Tulostinkartta
<?php
/*
Plugin Name: 3D-Tarvike Tulostinkartta
Plugin URI: http://tulostimet.3d-tarvike.fi/
Description: 3D-Tarvike Tulostinkartta
Version: 1.0
Author: Tomi Toivio
Author URI: http://sange.fi/
License: GPL2
*/