Skip to content

Instantly share code, notes, and snippets.

@jayrgee
jayrgee / NoCacheJS.js
Created August 1, 2012 03:15
JS implmentation of RavenDB NoCache
// JS implmentation of Raven.Client.Silverlight.Connection.RavenUrlExtensions.NoCache
//public static string NoCache(this string url)
//{
// return (url.Contains("?"))
// ? url + "&noCache=" + Guid.NewGuid().GetHashCode()
// : url + "?noCache=" + Guid.NewGuid().GetHashCode();
//}
// http://note19.com/2007/05/27/javascript-guid-generator/
import sublime, sublime_plugin
BLOCKLEN = 4
class TypeFileOutCommand(sublime_plugin.TextCommand):
def nextchar(self):
if self.body:
totype = []
while 1:
try:
(function(){
var log = console.log;
console.log = function(str) {
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;';
var args = Array.prototype.slice.call(arguments);
args[0] = '%c' + args[0];
args.splice(1,0,css);
var speech = new SpeechSynthesisUtterance();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
svg {
border: 1px black solid;
}
</style>
/**
* Blueprint background SVG
*/
min-height: 100%;
background: #004890 url('data:image/svg+xml;,<svg xmlns="http://www.w3.org/2000/svg" fill="%23fff"><pattern id="a" width="20" height="20" patternUnits="userSpaceOnUse" patternTransform="rotate(65)"><path d="M10 0v9h9v1h-9v9h-1v-9h-9v-1h9v-9" opacity=".08"/><path d="M0 19h19v-19h1v20h-20" opacity=".15"/></pattern><rect width="100%" height="100%" fill="%23004890"/><rect width="100%" height="100%" fill="url(%23a)"/></svg>');
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
svg {
background: #4169E1 url('data:image/svg+xml;,<svg xmlns="http://www.w3.org/2000/svg" fill="%23fff"><pattern id="a" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M10 0v9h9v1h-9v9h-1v-9h-9v-1h9v-9" opacity=".15"/><path d="M0 19h19v-19h1v20h-20" opacity=".25"/></pattern><rect width="100%" height="100%" fill="%234169E1"/><rect width="100%" height="100%" fill="url(%23a)"/></svg>');
}
</style>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
svg {
background: #4169E1 url('data:image/svg+xml;,<svg xmlns="http://www.w3.org/2000/svg" fill="%23fff"><pattern id="a" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M10 0v9h9v1h-9v9h-1v-9h-9v-1h9v-9" opacity=".15"/><path d="M0 19h19v-19h1v20h-20" opacity=".25"/></pattern><rect width="100%" height="100%" fill="%234169E1"/><rect width="100%" height="100%" fill="url(%23a)"/></svg>');
}
</style>
@jayrgee
jayrgee / SVG-Circles-01.markdown
Created August 15, 2014 05:47
A Pen by John Gantner.
@jayrgee
jayrgee / SVG-Circles-02.markdown
Created August 16, 2014 00:50
A Pen by John Gantner.
@jayrgee
jayrgee / ActiveXObject.html
Created December 5, 2014 02:07
Includes IE-specific ActiveXObject
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ActiveXObject</title>
</head>