Skip to content

Instantly share code, notes, and snippets.

View swade1987's full-sized avatar

Steve Wade swade1987

View GitHub Profile
@swade1987
swade1987 / gist:f34a268395a71f76fce1
Created April 27, 2015 09:35
BackupBuddy error message
An error occurred with BackupBuddy v5.2.0.0 on Tue, 17 Mar 15 18:12:23 +0000 for the site http://www.testing.co.uk. Error details:
Scheduled BackupBuddy backup started `4 days` ago likely timed out. The zip archive creation step appears to have timed out. Try turning off zip compression to significantly speed up the process or exclude large files. Check the error log for further details and/or manually create a backup to test for problems.
@swade1987
swade1987 / gist:b3f9922cb2c58784cbc3
Last active August 29, 2015 14:20
updated build script ...
Param(
[string]$version
[string]$environment
)
properties{
## General properties
## DevCI properties.
$environment_name = "DEV"
@swade1987
swade1987 / gist:05db366b29ab2c625946
Created April 27, 2015 12:43
Web.config transformations (Powershell)
function XmlDocTransform($xml, $xdt)
{
if (!$xml -or !(Test-Path -path $xml -PathType Leaf)) {
throw "File not found. $xml";
}
if (!$xdt -or !(Test-Path -path $xdt -PathType Leaf)) {
throw "File not found. $xdt";
}
$scriptPath = (Get-Variable MyInvocation -Scope 1).Value.InvocationName | split-path -parent
@swade1987
swade1987 / gist:ecdd4a9a57ee869e59b2
Created April 27, 2015 12:50
Sample psake script with entity framework migrations
Properties {
$build_dir = Split-Path $psake.build_script_file
$build_artifacts_dir = "$build_dir\..\BuildArtifacts\"
$code_dir = "$build_dir\..\"
$soln = "$build_dir\..\AgentHoney.Azure.sln"
$nuget_package_dir = "$build_dir\..\..\Packages"
$database_server = ".\SqlExpress"
$database_instance = "AgentHoney_AutoTestDb"
$ef_tools_ouput = "$build_artifacts_dir\Tools\EF\"
}
@swade1987
swade1987 / gist:671107ac7e59a46c21e9
Created April 28, 2015 10:24
Remove unwanted HTML tags from string
/// <summary>
/// Reference: http://stackoverflow.com/questions/307013/how-do-i-filter-all-html-tags-except-a-certain-whitelist
/// </summary>
/// <param name="source"></param>
/// <returns></returns>
public string RemoveUnwantedTags(string source)
{
const string acceptable = "b|i|p";
const string stringPattern = @"</?(?(?=" + acceptable + @")notag|[a-zA-Z0-9]+)(?:\s[a-zA-Z0-9\-]+=?(?:(["",']?).*?\1?)?)*\s*/?>";
return Regex.Replace(source, stringPattern, "");
@swade1987
swade1987 / gist:c55ca8d24db0cbd3b052
Created April 29, 2015 17:59
Backup Buddy log file
[Apr 28, 2015 18:21:17 0-message] [] Starting cleanup procedure for BackupBuddy v5.2.0.0.
[Apr 28, 2015 18:21:17 0-details] [] Cleaning up old logs.
[Apr 28, 2015 18:21:17 0-details] [] Cleaning up any temporary local destinations.
[Apr 28, 2015 18:21:17 0-details] [] Cleaning up remote send stats.
[Apr 28, 2015 18:21:17 0-details] [] Cleaning up old backup fileoptions option files.
[Apr 28, 2015 18:21:17 0-details] [] Fileoptions instance #43.
[Apr 28, 2015 18:21:17 0-details] [] Created fileoptions lock file `/var/www/wp-content/uploads/pb_backupbuddy/fileoptions/0t35d5naht.txt.lock` with ID: 553fcf9d1cfda4.62084195.
[Apr 28, 2015 18:21:17 0-details] [] Fileoptions instance #43.
[Apr 28, 2015 18:21:17 0-details] [] Created fileoptions lock file `/var/www/wp-content/uploads/pb_backupbuddy/fileoptions/0uenwbj72m.txt.lock` with ID: 553fcf9d1d6709.84902178.
[Apr 28, 2015 18:21:17 0-details] [] Fileoptions instance #43.
@swade1987
swade1987 / gist:bbb16cf559267b733473
Created April 30, 2015 08:47
Backupbuddy error messages
[Mar 14, 2015 19:22:28 0-error] Warning #2389373: A missing schedule was identified and re-created. This should have corrected any problem with this schedule. Error Code:
[Mar 16, 2015 09:19:21 0-error] [ezo7v0khz4] Error #4001: Unable to successfully generate ZIP archive. Backup FAILED. See logs above for more information.
[Mar 16, 2015 09:19:21 0-error] [ezo7v0khz4] Failed function `backup_zip_files`. Backup terminated.
[Mar 17, 2015 14:41:36 0-error] [3h1mgywb8u] Error #4001: Unable to successfully generate ZIP archive. Backup FAILED. See logs above for more information.
[Mar 17, 2015 14:41:36 0-error] [3h1mgywb8u] Failed function `backup_zip_files`. Backup terminated.
[Mar 18, 2015 20:39:22 0-error] [3h1mgywb8u] Error retrieving fileoptions file `/var/www/wp-content/uploads/pb_backupbuddy/fileoptions/9vgfz4of39.txt`. Err 335353266.
[Mar 19, 2015 03:10:14 0-error] [s0h4jg07ed] Error #4001: Unable to successfully generate ZIP archive. Backup FAILED. See logs above for more information.
[Mar 19, 2015 03:10:
<?xml version="1.0" encoding="UTF-8"?><directory name="assets" size="0" lastModified="1431964029182" date="20150518T164709" absolutePath="D:\files\assets" sort="name" reverse="false">
<directory name="css" size="0" lastModified="1431964029167" date="20150518T164709" absolutePath="D:\files\assets\css">
<file name="grid.css" size="4499" lastModified="1273159738000" date="20100506T162858" absolutePath="D:\files\assets\css\grid.css"/>
<directory name="ie" size="0" lastModified="1431964029151" date="20150518T164709" absolutePath="D:\files\assets\css\ie">
<directory name="header-and-footer-standalone" size="0" lastModified="1431964029151" date="20150518T164709" absolutePath="D:\files\assets\css\ie\header-and-footer-standalone">
<file name="ie6.css" size="675" lastModified="1272293235000" date="20100426T154715" absolutePath="D:\files\assets\css\ie\header-and-footer-standalone\ie6.css"/>
</directory>
</directory>
<file name="main.css" size="51703" lastModified="1272293235000" date="20100426T154715" absolutePath="D:\f
@swade1987
swade1987 / gist:46b3a5e2ba42e0f2b908
Created August 8, 2015 12:24
upgrade phpmyadmin version
root@poseidon:~/scripts# ./upgrade_phpmyadmin
please enter the phpMyAdmin version name you would like to upgrade to (ex - '4.0.1'): 4.4.13
4.4.13
is this the version you would like to upgrade to? (y/n): y
upgrading to phpMyAdmin-4.4.13-english--2015-08-08 12:22:31-- http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.4.13/phpMyAdmin-4.4.13-english.zip/download
Resolving sourceforge.net (sourceforge.net)... 216.34.181.60
Connecting to sourceforge.net (sourceforge.net)|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
total 28
-rw-r--r-- 1 root root 1277 Feb 3 23:01 chef.crt
-rw-r--r-- 1 root root 1675 Feb 3 23:01 chef.key
-rw-r--r-- 1 root root 343 Feb 3 16:02 chef-ssl.conf
-rw-r--r-- 1 root root 424 Feb 3 16:02 dhparams.pem
-rw-r--r-- 1 root root 1399 Feb 3 23:09 ec2-52-25-123-105.us-west-2.compute.amazonaws.com.crt
-rw-r--r-- 1 root root 1679 Feb 3 23:09 ec2-52-25-123-105.us-west-2.compute.amazonaws.com.key
-rw-r--r-- 1 root root 388 Feb 3 23:09 ec2-52-25-123-105.us-west-2.compute.amazonaws.com-ssl.conf
root@chef:/var/opt/opscode/nginx/ca#