Skip to content

Instantly share code, notes, and snippets.

View brainwipe's full-sized avatar

Rob Lang brainwipe

View GitHub Profile
@brainwipe
brainwipe / ef6-sql-providerhack.cs
Created November 26, 2013 16:59
Entity Framework 6 is unable to locate the SqlProvider when running integration tests on a server. This is because it is not copied across to the bin/ folder (no matter what you do). This is the hack to ensure the DLL is moved over. Placed in your base domain context that wraps System.Data.Entity.DbContext.
public abstract class BaseDomainContext : DbContext
{
static BaseDomainContext()
{
// ROLA - This is a hack to ensure that Entity Framework SQL Provider is copied across to the output folder.
// As it is installed in the GAC, Copy Local does not work. It is required for probing.
// Fixed "Provider not loaded" error
var ensureDLLIsCopied = System.Data.Entity.SqlServer.SqlProviderServices.Instance;
}
}
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(document).ready(function() {
var iframe = $('#frame');
$("#frame").ready(function(){
$("#frame").load(function () {
data = iframe[0].contentWindow.document.body.innerHTML;
if(data == "success"){
@brainwipe
brainwipe / snap-svg-animate-rectangle.html
Created November 21, 2013 16:29
Using Snap.svg to animate a rectangle
<svg id="svg" version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>
<script>
var s = Snap("#svg");
var rect = s.rect(10, 10, 100, 100);
rect.animate({
x: 50,
y: 50
}, 1000);
@brainwipe
brainwipe / raphaeljs-animate-rect.html
Created November 21, 2013 15:34
A simple Raphael.js SVG animation (fragment) where a rectangle moves 100 pixels horizontally and 50 pixels vertically.
<div id="container"></div>
<script>
var paper = new Raphael(document.getElementById('container'), 500, 400);
var rect = paper.rect(10, 20, 300, 200);
rect.animate({
x: 100,
y: 50
@brainwipe
brainwipe / jquery-svg-animate-rectangle.html
Last active December 28, 2015 23:59
jQuery SVG 1.4.5 (jQuery 1.7) animating a simple rectangle as found on the jQuery SVG site.
<svg class="svg" version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>
<script>
$(".svg").svg();
var svg = $(".svg").svg('get');
var myrect = svg.rect(25, 25, 150, '25%', 10, 10,
{fill: 'none', stroke: 'blue', strokeWidth: 3,
transform: 'rotate(0, 100, 75)'});