Skip to content

Instantly share code, notes, and snippets.

David Condrey dcondrey

Block or report user

Report or block dcondrey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dcondrey / savetoDoc.js
Created Aug 5, 2017
Export an HTML element to Microsoft Word with CSS styles to set page orientation and paper size.
View savetoDoc.js
/* 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.');
# Random UUID for this config
# Address of VPN server
# The group of usernames that is allowed in
# The name of connection type displayed in GUI
# The Shared Secret
View .gitconfig
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
View Javascript OO Cheat Sheet
* Native Object
* Object Literal
* Basic Object
* Psuedo-Class
* Self Executing/Invoking Structure
* Lazy Function
* Module Pattern
dcondrey / defaultPluginName.js
Last active Apr 20, 2016
jQuery boilerplate plugin
View defaultPluginName.js
* jQuery plugin boilerplate
;(function ( $, window, document, undefined ) {
* @defaults
* @property pluginName {string} Plugin name
* @property defaults {object} Default values for plugin
dcondrey /
Created Apr 20, 2016
Use ffmpeg to split file by chapters. Python version and bash version
# Author:
# m4bronto
# Chapter #0:0: start 0.000000, end 1290.013333
# first _ _ start _ end
while [ $# -gt 0 ]; do
ffmpeg -i "$1" 2> tmp.txt
dcondrey /
Last active Jan 18, 2020 — forked from LeCoupa/imacros-cheatsheet.js
iMacros Command, Variable, and function reference
View contrast-color.js
* Calculate the contrast of a color to determine the appropriate opposing text color.
* @author D. Condrey
* @param {string|object} - element background-color or element
* @return {string}
* white - if background is a dark shade color
* black - if background is a light shade color
define(function() {
View handlebars-demodata.xml
<?xml version="1.0" encoding="UTF-8"?>
<string id="SITE_TITLE"><![CDATA[Title]]></string>
<question><![CDATA[Question 1]]></question>
You can’t perform that action at this time.