// http://stackoverflow.com/a/23048315
// by Lee Kowalkowski
First run:
sudo mkdir /opt/lampp/mailtodisk
sudo mkdir /opt/lampp/mailoutput
// http://stackoverflow.com/a/23048315
// by Lee Kowalkowski
First run:
sudo mkdir /opt/lampp/mailtodisk
sudo mkdir /opt/lampp/mailoutput
<?php | |
// Get a list of all WRX export files | |
$files = glob( 'wrx-export/*.xml' ); | |
// Remove invalid XML attributes and values which prevent SimpleXML from parsing the file | |
// This shouldn't be necessary, if the exported creates a valid XML file. | |
$replace = array( | |
'ü' => '', | |
'…' => '', |
wp core language list --field=language | xargs -n 1 wp core language install |
I have been playing with using the https://Home-Assistant.io system at home to play with Home Automation.
One thing I've found is that the Raspberry Pi is perfect for quite a few of the monitoring things that I wanted it to do (see also https://github.com/JonTheNiceGuy/home-assistant-configs for more details of what I'm doing there!).
I'm using the http://OwnTracks.org application to talk to an MQTT server, but I could also do with it knowing where I am in the house, so I looked around for some details on iBeacons.
iBeacon is an Apple standard, but it's very easy to configure on Linux systems. I took some pointers from this article and wrote up this script. When I later went to deploy this on another system, I also needed a pointer from [this PDF](https://cdn-learn.adafruit.com/downloads/pdf/pibeacon-ib
When using yarn, it will create a yarn.lock
lockfile which holds data on your used dependencies. This file also includes hard-typed versions, so should you update your dependencies, the yarn.lock
file is basically outdated and needs to be regenerated. While yarn does this automatically, Greenkeeper pull requests that update dependencies as of right now do not do this regeneration, which means you would have to do it manually.
This gist shows you a way how to automatise this step using a Travis CI script.
yarn.lock
file in your repository for Travis CI to automatically install yarn (yarn will be added to their default images soon)#!/bin/bash | |
# Update Git and SVN repos checked out in the same directory. | |
# | |
# Pass a branch name like 4.6 as the sole argument to checkout that branch. Otherwise, master/trunk is checked out. | |
set -ex | |
cd "$(dirname $0)" | |
git fetch origin --tags |
<?php | |
function conditional_buddypress_styles_scripts() { | |
// First check that buddypress exists to prevent fatal errors | |
if ( function_exists( 'is_buddypress' ) ) { | |
//dequeue scripts and styles | |
if ( ! is_buddypress() ) { | |
wp_dequeue_style( 'bp-mentions-css' ); | |
wp_dequeue_style( 'bp-legacy-css' ); | |
wp_dequeue_script( 'bp-confirm' ); |
<?php | |
function conditional_bbpress_styles_scripts() { | |
// First check that bbpress exists to prevent fatal errors | |
if ( function_exists( 'is_bbpress' ) ) { | |
//dequeue scripts and styles | |
if ( ! is_bbpress() && ! is_buddypress() ) { | |
wp_dequeue_style('bbp-default'); | |
wp_dequeue_style( 'bbp_private_replies_style'); | |
wp_dequeue_script('bbpress-editor'); | |
} |
<?php | |
/* | |
Please read the bbPress 1 conversion article on foliovision.com before using | |
*/ | |
include('wp-load.php'); | |
global $wpdb; | |
$aPosts = $wpdb->get_results( "SELECT * FROM $wpdb->posts AS p JOIN $wpdb->postmeta AS m ON p.ID = m.post_id WHERE post_type IN ('forum','topic','reply') AND ( meta_key = '_bbp_old_topic_id' ) LIMIT 10000 " ); |
/** | |
* bbPress specific CSS | |
* | |
* @package bbPress | |
* @subpackage Theme | |
*/ | |
/* =bbPress Style | |
-------------------------------------------------------------- */ |