Skip to content

Instantly share code, notes, and snippets.

View kalisjoshua's full-sized avatar

Joshua T Kalis kalisjoshua

View GitHub Profile
@kalisjoshua
kalisjoshua / Article-BrowserSlides.md
Last active December 24, 2015 18:19
BrowserSlides Article [DRAFT]

I wrote a simple slides parser / formatter and presenter library in JavaScript, jQuery, and Markdown; OK, and some CSS and HTML.

History

I was asked by a former colleague to give a presentation on jQuery plugins to a few people he worked with at my former place of work. I thought it might be cute and a good exercise to write a plugin that converted a block of markdown text into HTML with the goal of using that HTML as the slide deck for the presentation.

As it turned out I rather liked the idea of having presentation slides as a markdown file rather than in a standard presentation software specific file format. I am a programmer through and through so I guess it should be no surprise to myself, or others, that I like, nay prefer, the markdown file format and don't mind working in it at length.

// This F# dojo is directly inspired by the
// Digit Recognizer competition from Kaggle.com:
// http://www.kaggle.com/c/digit-recognizer
// The datasets below are simply shorter versions of
// the training dataset from Kaggle.
// The goal of the dojo will be to
// create a classifier that uses training data
// to recognize hand-written digits, and
// evaluate the quality of our classifier
/*jshint laxcomma:true*/
var APICraft = (function APICraft_API_closure (baseURL) {
return function (endpoint) {
return baseURL + endpoint;
};
}('http://api.api-craft.org/conferences/detroit2013/'));
$.fn.ready(function ($) {
var DAYNAMES
, DAYNAMESLONG
@kalisjoshua
kalisjoshua / euler6.js
Created July 8, 2013 20:40
Project Euler #6 Code Golf
/*
The sum of the squares of the first ten natural numbers is,
12 + 22 + ... + 102 = 385
The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)2 = 552 = 3025
Hence the difference between the sum of the squares of the first
@kalisjoshua
kalisjoshua / gist:5774480
Created June 13, 2013 15:10
git config global
user]
name = Joshua T Kalis
email = [email protected]
[alias]
lg = log --graph --pretty=format:'%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' --abbrev-commit --date=relative
oldest-ancestor = !zsh -c 'diff -u <(git rev-list --first-parent \"${1:-master}\") <(git rev-list --first-parent \"${2:-HEAD}\") | sed -ne \"s/^ //p\" | head -1' -
webstart = instaweb --httpd=webrick
webstop = instaweb --httpd=webrick --stop
[core]
excludesfile = /Users/jkalis/.gitignore_global
@kalisjoshua
kalisjoshua / .gitconfig
Last active December 16, 2015 18:59
My current .gitconfig.
[user]
name = Joshua T Kalis
email = [email protected]
[alias]
lg = log --graph --pretty=format:'%C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' --abbrev-commit --date=relative
oldest-ancestor = !zsh -c 'diff -u <(git rev-list --first-parent \"${1:-master}\") <(git rev-list --first-parent \"${2:-HEAD}\") | sed -ne \"s/^ //p\" | head -1' -
[core]
excludesfile = /Users/jkalis/.gitignore_global
[color]
branch = auto
@kalisjoshua
kalisjoshua / para_soft.md
Created November 26, 2012 21:54
Markdown soft break paragraph example

The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers. And you will know My name is the Lord, when I lay My vengeance upon thee. <--- end of first paragraph - soft break --> Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the

@kalisjoshua
kalisjoshua / usercam.js
Created November 21, 2012 20:14
Usercam Bookmarklet (getUserMedia Video PIP)
(function (nav, win, doc) {
"use strict";
var lib = "usercam"
, anchor = [true, true] // === top, left
, pending
, pip;
nav.getUserMedia =
(nav.getUserMedia || nav.webkitGetUserMedia || nav.mozGetUserMedia || nav.msGetUserMedia);
@kalisjoshua
kalisjoshua / dirToJSON.js
Created September 14, 2012 00:05
Directory as JSON object
var fs = require("fs");
var tree = function(dir, done) {
var results = {
"path": dir
,"children": []
};
fs.readdir(dir, function(err, list) {
if (err) { return done(err); }
var pending = list.length;
@kalisjoshua
kalisjoshua / grunt.js
Created August 3, 2012 17:53
Working w/ Grunt
/*jshint strict:false*/
/*global module*/
module.exports = function(grunt) {
grunt.registerHelper("wrapp", function (src, argList, args) {
return ";(function (%1) {\n%2\n}(%3));"
.replace("%1", argList || "")
.replace("%3", args || "")
.replace("%2", src);
});