Skip to content

Instantly share code, notes, and snippets.

@dcondrey
dcondrey / savetoDoc.js
Created August 5, 2017 22:29
Export an HTML element to Microsoft Word with CSS styles to set page orientation and paper size.
/* HTML to Microsoft Word Export
* This code demonstrates how to export an html element to Microsoft Word
* with CSS styles to set page orientation and paper size.
* Tested with Word 2010, 2013 and FireFox, Chrome, Opera, IE10-11
* Fails in legacy browsers (IE<10) that lack window.Blob object
*/
function saveDoc() {
if (!window.Blob) {
alert('Your legacy browser does not support this action.');
@valryon
valryon / .gitignore
Last active January 10, 2017 14:24
Unity .gitignore
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
/Library/
# ===================================== #
# Visual Studio / MonoDevelop generated #
@stratawing
stratawing / ES Beginner's PHP Script
Created March 4, 2012 16:17
ES Beginner's PHP Script
<?php
$ch = curl_init();
$method = "GET";
$url = "localhost/cerberus/resraw/_search?pretty=true";
$qry = '{
"size" : 10,
"fields" : "usr",
"query" : {
@darktable
darktable / DebugConsole.cs
Created December 1, 2011 00:25
Unity3D: Heavily modified version of Jeremy Hollingsworth's DebugConsole script.
#define DEBUG_CONSOLE
#define DEBUG_LEVEL_LOG
#define DEBUG_LEVEL_WARN
#define DEBUG_LEVEL_ERROR
#if (UNITY_EDITOR || DEVELOPMENT_BUILD)
#define DEBUG
#endif
#if (UNITY_IOS || UNITY_ANDROID)