Skip to content

Instantly share code, notes, and snippets.

View Stray's full-sized avatar

Stray Stray

  • Innerleithen, Scotland
View GitHub Profile
@Stray
Stray / IE9_htpasswd_issue.md
Last active December 11, 2015 22:49
Train of what-has-been-tried for htpasswd issue in IE9

Some IE9 users unable to log in to a folder which is htpasswd protected

  • Of 7 IE9 users, 4 can't log in, 3 can
  • The username and password are both composed only of letters and numbers
  • The same version number for IE9 is present across the can/can't group
  • Caching is excluded as cause as 6 of the test group were first-time users
  • Directly accessing the file instead of the folder does not help
  • .htpasswd format has been tried as crypt and MD5, without difference
  • The page in question is set to no-cache with an expiry time in the past
  • The same user that cannot log in to folder A, can log in to folder B (with different credentials)
// in the context
injector.map(AssetRequestSignal).asSingleton();
// in the model/service
[Inject]
public var assetRequestSignal:AssetRequestSignal;
function setUp():void
@Stray
Stray / canvasinstall.sh
Created August 11, 2012 11:10
Node Canvas install procedure for Mac OS X 10.6.8
# This has been modified from https://github.com/LearnBoost/node-canvas/wiki/Installation---OSX
# I found that the official instructions caused errors relating to the non-existence of libpng
# Worked on MacbookPro5,1 and OS X 10.6.8
cd /usr
ls
# Check there is an entry called X11 - if not, X11 needs to be installed from disk before proceeding.
@Stray
Stray / Delay.as
Created July 19, 2012 13:51 — forked from tdavies/Delay.as
Fluent Timer class
/**
* User: tom
* Date: 14/05/12
* Time: 14:46
*/
package {
import org.osflash.signals.Signal;
import flash.events.TimerEvent;
import flash.utils.Timer;
@Stray
Stray / ResourcePromise.as
Created February 24, 2012 16:50
Example of promise
package modules.common.net
{
import flash.display.DisplayObject;
import org.osflash.signals.Signal;
public class ResourcePromise implements IPromise, IResourcePromise
{
protected var _result:DisplayObject;
protected var _errorMessage:String;
protected var _loaded:Signal = new Signal(DisplayObject);
@Stray
Stray / ExampleUsage.as
Created July 5, 2011 11:39
Fluent filter for a collection of users
requiredUsers = new UserDataVOFilter(allUsers)
.onlyManagers()
.withCompanyKey(3)
.withStatus(UserStatus.STAFF)
.data;
@Stray
Stray / Context.as
Created April 3, 2011 14:59
Robotlegs Context with injection unmapping when contextView property is set, to prevent warnings in SS 1.6
/*
* Copyright (c) 2009 the original author or authors
*
* Permission is hereby granted to use, modify, and distribute this file
* in accordance with the terms of the license agreement accompanying it.
*/
package org.robotlegs.mvcs
{
import flash.display.DisplayObjectContainer;
@Stray
Stray / MappingUnmappingInjector.as
Created March 15, 2011 17:00
The Mapping and Unmapping functions in the Injector aren't symmetrical
function mapValue(whenAskedFor:Class, useValue:Object, named:String = ""):*;
function unmap(clazz:Class, named:String = ""):void;
@Stray
Stray / ProblemFunctionsInSignalCommandMap.as
Created March 15, 2011 16:59
Problem functions in SignalCommandMap
protected function mapSignalValues(valueClasses:Array, valueObjects:Array):void {
for (var i:uint = 0; i < valueClasses.length; i++) {
injector.mapValue(valueClasses[i], valueObjects[i]);
}
}
protected function unmapSignalValues(valueClasses:Array, valueObjects:Array):void {
for (var i:uint = 0; i < valueClasses.length; i++) {
injector.unmap(valueClasses[i], valueObjects[i]);
}
@Stray
Stray / TestSignalCommandMapUnmapping.as
Created March 15, 2011 16:45
A test that should fail in the SignalCommandMap
[Test(expects="org.swiftsuspenders.InjectorError")]
public function signal_values_no_longer_persist_from_one_to_the_next():void
{
var propOne:TestCommandProperty = new TestCommandProperty();
var propTwo:TestCommandProperty2 = new TestCommandProperty2();
signalCommandMap.mapSignal(onePropSignal, TestOnePropertyCommand);
var secondPropSignal:TestCommandProperty2Signal = new TestCommandProperty2Signal();
// this command requires the values dispatched by both signals