Skip to content

Instantly share code, notes, and snippets.

@matijagrcic
matijagrcic / Google chart to png.js
Created January 20, 2015 11:42
Google chart to png using canvg
<a href="#" target="_blank" class="btn btn-info print-chart" data-chart-container="my-chart" data-chart-name="my-chart-name">Save chart</a>
MyApp.saveChart = function saveChart($button) {
var printButton = $button;
var container = printButton.data('chart-container');
var name = printButton.data('chart-name');
var chartContainer = $("#" + container);
var chartArea = chartContainer.find('svg').parent();
var generatedCode = generator.TransformText();
var comparer = DesktopAssemblyIdentityComparer.Default;
var options = new CSharpCompilationOptions(
OutputKind.DynamicallyLinkedLibrary,
assemblyIdentityComparer:comparer);
var tree = SyntaxFactory.ParseSyntaxTree(generatedCode);
var compilation = CSharpCompilation
.Create("measures.dll")
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<style>
#piechart {
top: 0;
left: 0;
width:100%;
height:100%;
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "propertyEditors",
"description": "An array of Umbraco Property Editors",
"type": "object",
"properties": {
"name": {
"description": "The friendly name of the property editor, shown in the Umbraco backoffice",
"type": "string"
},
public string GetVirtualPath(VirtualPathContext context)
{
foreach (var matcherParameter in _matcher.Template.Parameters)
{
context.Values.Remove(matcherParameter.Name); // make sure none of the domain-placeholders are appended as query string parameters
}
return _innerRoute.GetVirtualPath(context);
}
npm install -g gulp
Path %APPDATA%\npm
NODE_PATH %AppData%\npm\node_modules
npm install --save-dev gulp
https://github.com/Microsoft/TypeScript/issues/281
https://typescript.codeplex.com/discussions/547036
https://typescript.codeplex.com/discussions/507413
http://blogs.msdn.com/b/typescript/archive/2014/07/21/new-compiler-and-moving-to-github.aspx
http://sdtimes.com/microsofts-roadmap-typescript-2-0/
http://blogs.msdn.com/b/typescript/archive/2014/10/22/typescript-and-the-road-to-2-0.aspx
http://stackoverflow.com/questions/26968228/gulpfile-that-efficiently-compiles-only-changed-typescript-files
USB drive as FAT32 on a Win7/Win8/Win10
diskpart.exe
list disk (Find USB device)
select disk 1 (select USB drive)
clean
create partition primary
select partition 1
active
format quick fs=fat32 (UEFI can only USB boot to FAT32, not NTFS)
http://debugging.io/weblog/post/SOSEX-5-useful-tricks-of-debugging-managed-programs
https://netmatze.wordpress.com/2012/08/24/using-windbg-exe-and-sos-dll-to-debug-a-net-4-0-application/
http://theartofdev.com/windbg-cheat-sheet/
http://blogs.msdn.com/b/tess/archive/2008/02/27/net-debugging-demos-lab-4-high-cpu-hang-review.aspx
https://msdn.microsoft.com/en-us/library/windows/hardware/ff558913(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/hardware/dn745911(v=vs.85).aspx
http://www.stevestechspot.com/SOSEXV2NowAvailable.aspx
https://blogs.msdn.microsoft.com/jankrivanek/2012/11/15/setting-up-managed-code-debugging-with-sos-and-sosex/
https://blogs.msdn.microsoft.com/vijaysk/2009/04/02/getting-better-stack-traces-in-process-monitor-process-explorer/
http://blogs.microsoft.co.il/sasha/2013/08/12/obscure-windbg-commands-part-1/
/* For responsive YouTube videos */
.embed-container {
position: relative;
padding-bottom: 56.25%; /* 16/9 ratio */
padding-top: 30px; /* IE6 workaround*/
height: 0;
overflow: hidden;
}
.embed-container iframe,