It's very easy for remote working to fail if the company doesn't invest in it. It requires buy-in from the entire company, but the benefits are significant:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function plugin1(context, next) { | |
console.log('plugin1'); | |
console.log(context.event); | |
next(); | |
} | |
function plugin2(context, next) { | |
console.log('plugin2'); | |
someIO(next); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unexpected exception: Object reference not set to an instance of an object. | |
at Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.GetData_VsBufferEncoding() | |
at Microsoft.VisualStudio.Editor.Implementation.VsTextBufferAdapter.GetData(Guid& riidKey, Object& pvtData) | |
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) | |
at Microsoft.VisualStudio.VSIP.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure) | |
at VisualSVN.VS.AbstractLockedTextBuffer.GetEncoding() | |
at VisualSVN.Core.MarkerBuilder.BuildMarkers(ILockedTextBuffer lockedTextBuffer, IFileContentProvider fileContentProvider, IBufferContentProvider bufferContentProvider, IsPathVersionedDelegate isPathVersioned, Client client) | |
at VisualSVN.Core.QuickDiffUpdater.BuildMarkers(ILockedTextBuffer lockedTextBuffer) | |
at VisualSVN.Core.QuickDiffUpdater.Process() | |
StackTrace: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Override the default submission client | |
public class ProxySubmissionClient : SubmissionClient { | |
protected override HttpWebRequest CreateHttpWebRequest(ExceptionlessConfiguration config, string endPoint) { | |
var request = base.CreateHttpWebRequest(config, endPoint); | |
// Set the proxy info here. | |
try { | |
request.Proxy = new WebProxy("MyProxyAddress"); | |
} catch (Exception) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Untitled</title> | |
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.common.min.css"> | |
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.rtl.min.css"> | |
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.default.min.css"> | |
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.mobile.all.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using WebApi.Delta; | |
namespace Hst.Deals.API.Infrastructure | |
{ | |
internal class CompiledPropertyAccessor<TEntityType> : PropertyAccessor<TEntityType> where TEntityType : class | |
{ | |
private Action<TEntityType, object> _setter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Analogy | |
{ | |
/// <summary> | |
/// This example shows that a library that needs access to target .NET Standard 1.3 | |
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET | |
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library. | |
/// </summary>INetCoreApp10 | |
class Example1 | |
{ | |
public void Net45Application(INetFramework45 platform) |
Customers periodically ask "Why am I getting errors when talking to Redis". The answer is complicated - it could be a client or server side problem. In this article, I am going to talk about client side issues. For server side issues, see here
Clients can see connectivity issues or timeouts for several reason, here are some of the common ones I see:
###Memory pressure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sometimes post data cannot be converted (non form data) so we serialize it to a stirng. | |
// This plugin adds some overhead as you are checking post data (really large string) | |
[Priority(100)] | |
internal class RemoveSensitivePostDataPlugin : IEventPlugin { | |
public void Run(EventPluginContext context) { | |
var serializer = context.Client.Configuration.Resolver.GetJsonSerializer(); | |
var ri = context.Event.GetRequestInfo(serializer); | |
string data = ri != null ? ri.PostData as string : null; | |
if (data == null) |