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
internal class RawSerializer<T> | |
{ | |
public T RawDeserialize( byte[] rawData ) | |
{ | |
return RawDeserialize( rawData , 0 ); | |
} | |
public T RawDeserialize( byte[] rawData , int position ) | |
{ |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; pretty print xml in region | |
;; http://stackoverflow.com/a/5198243/48082 | |
(defun dino-xml-pretty-print-region (begin end) | |
"Pretty format XML markup in region. You need to have nxml-mode | |
http://www.emacswiki.org/cgi-bin/wiki/NxmlMode installed to do | |
this. The function inserts linebreaks to separate tags that have | |
nothing but whitespace between them. It then indents the markup | |
by using nxml's indentation rules." | |
(interactive "r") |
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
<%@ language="Javascript" %> | |
<script language="javascript" runat="server" src='json2.js'></script> | |
<script language="javascript" runat="server" src='stringExtensions.js'></script> | |
<script language="javascript" runat="server" src='contentNego.js'></script> | |
<script language="javascript" runat="server"> | |
(function() { | |
// In an ASP scenario, this fn gets "exported" |
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
<link href="http://yandex.st/highlightjs/7.0/styles/default.min.css" rel="stylesheet"> | |
<script src="http://yandex.st/highlightjs/7.0/highlight.min.js"></script> | |
<script type='text/javascript'> $(document).ready(function() { | |
function fixup(s) { | |
var re1 = new RegExp('<','g'), re2 = new RegExp('>','g'); | |
return s.replace(re1,'<').replace(re2,'>'); | |
} | |
$.ajax({type: "GET", | |
url: "https://api.github.com/gists/5617520", |
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
angular | |
// edit-in-place attribute | |
.directive( 'editInPlace', function() { | |
return { | |
restrict: 'A', | |
scope: { value: '=editInPlace', onSaveFn: '&onSave', onCancelFn: '&onCancel' }, | |
template: '<span ng-click="handleClick()" ng-bind="value"></span><input ng-model="modelCopy" style="width:100%;"></input>', | |
link: function ( $scope, element /* , attrs */ ) { | |
// Let's get a reference to the input element, as we'll want to reference it. |
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
// stringExtensions.js | |
// | |
// a few extensions on the string object. | |
// | |
// Fri, 10 Feb 2012 16:48 | |
// | |
(function(globalScope) { | |
if (typeof String.prototype.trim != 'function') { |
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
// contentNego.js | |
// | |
// Simple content negotiation logic for ASP-classic modules. | |
// | |
// This module exposes one public function - figureDesiredContentType(). | |
// It checks the HTTP_ACCEPT server variable (whose value is set to the | |
// value of the Accept request header), and sets a content-type | |
// mime-string accordingly. | |
// | |
// When there are multiple mime-types in the Accept header, or when the |
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
<wsdl:definitions | |
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | |
xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/" | |
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" | |
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" | |
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" | |
xmlns:wsp="http://www.w3.org/ns/ws-policy" | |
xmlns:wsp200409="http://schemas.xmlsoap.org/ws/2004/09/policy" | |
xmlns:wsp200607="http://www.w3.org/2006/07/ws-policy" | |
xmlns:ns0="http://default_package/" targetNamespace="http://default_package/"> |
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
#!/bin/bash | |
# -*- mode:shell-script; coding:utf-8; -*- | |
# | |
# Rename screenshot files to cleaner names, names for which a | |
# lexicographic sort is equivalent to a time-based sort. | |
# | |
# | |
# Created: <Wed Dec 4 10:24:15 2013> | |
# Last Updated: <2013-December-04 13:57:46> | |
# |
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
// exampleBase64.js | |
// | |
// for use within an Apigee JavaScript callout. | |
// | |
// Dino Chiesa, [email protected] | |
// | |
// Tuesday, 14 January 2014, 22:03 | |
// ------------------------------------------------------------------ | |
OlderNewer