Skip to content

Instantly share code, notes, and snippets.

View ekandreas's full-sized avatar

Andreas Ek ekandreas

View GitHub Profile
@ekandreas
ekandreas / no-updates.php
Last active July 8, 2017 02:15
WordPress stop remote update check
<?php
namespace EkAndreas;
class NoWPUpdates {
private $pluginsFiles;
private $themeFiles;
function __construct() {
add_action( 'admin_init', array(&$this, 'admin_init') );
@ekandreas
ekandreas / no-updates.php
Created March 20, 2015 09:21
Prevent WordPress from checking remote sources for updates. You are using Composer for that :-)
<?php
namespace EkAndreas;
class NoWPUpdates {
private $pluginsFiles;
private $themeFiles;
function __construct() {
add_action( 'admin_init', array(&$this, 'admin_init') );
@ekandreas
ekandreas / pull.php
Last active March 10, 2018 11:54
PHP Deployer, Pull script example from production to my local Bedrock/Vagrant environment
<?php
/**
* Pull script example from production to my local Bedrock/Vagrant environment
* Requires PHP Deployer 3
*
* Andreas Ek, 2015-04-23
*/
date_default_timezone_set( 'Europe/Stockholm' );
@ekandreas
ekandreas / pull.php
Created April 22, 2015 14:22
PHP Deployer - Pull script example from production to my local Bedrock/Vagrant environment
<?php
/**
* Pull script example from production to my local Bedrock/Vagrant environment
* Requires PHP Deployer 3
*
* Andreas Ek, 2015-04-23
*/
date_default_timezone_set( 'Europe/Stockholm' );
@ekandreas
ekandreas / epostservice-test.php
Created April 23, 2015 10:25
Enkelt anrop Epostservice för att skapa nyhetsbrev via API i PHP
$sender = new \EpostserviceAddress();
$sender->email = "andreas.ek@skolporten.com";
$sender->name = "Andreas Ek";
$sender->userId = 67018485;
$sender->created = date("c", time());
$document = new \EpostserviceDocument();
$document->changed = date("c", time());
$document->created = date("c", time());
$document->isemail = true;
@ekandreas
ekandreas / error-output.txt
Created April 23, 2015 10:27
Error log Epostservice API via PHP
This file has been truncated, but you can view the full file.
Request
POST /aspnet/api3/api.asmx HTTP/1.0
Host: www.epostservice.se
User-Agent: NuSOAP/0.9.5 (1.123)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: "http://epostservice.se/aspnet/api3/DocumentCreate"
Content-Length: 1182
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3686="http://epostservice.se/aspnet/api3/DocumentCreate"><SOAP-ENV:Body><DocumentCreate xmlns="http://epostservice.se/aspnet/api3"><apiKey>FE0AA375-5BA9-4D96-AF95-BEA89EA79846</apiKey><document><subject>Test via API</subject><name>TEST via API</name><senderAddress><userID>67018485</userID><email>andreas.ek@skolporten.com</email><name>Andreas Ek</name><created>2015-04-23T10:20:56+00:00</created><fields></fields><state>Active</state></senderAddress><state>Draft</state><schedule>1970-01-01T00:00:00.000
@ekandreas
ekandreas / um-messaging-sv_SE.mo
Last active August 29, 2015 14:21
um-messaging-sv_SE
@ekandreas
ekandreas / um-followers-sv_SE.mo
Last active August 29, 2015 14:21
um-followers-sv_SE
@ekandreas
ekandreas / um-activity-page.php
Created August 25, 2015 14:50
Plugin example of UM Activity wall for a post. Place this file in the plugin folder and activate the plugin. Then place the shortcode [ultimatemember_activity_page] inside a post or page. Requires UM and UM Activity.
<?php
/*
Plugin Name: UM - Social Activity Page
Description: Page example of UM Social Activity
Version: 0.1
Author: EkAndreas
Author URI: http://www.andreasek.se/
*/
class UM_Activity_Page {
@ekandreas
ekandreas / composer.json
Last active September 7, 2015 13:43
Whoops
{
"name": "ekandreas/woops",
"type": "project",
"require": {
"php": ">=5.4",
"filp/whoops": "^1.1"
}
}