Skip to content

Instantly share code, notes, and snippets.

View 13protons's full-sized avatar

Alan Languirand 13protons

View GitHub Profile
@13protons
13protons / XML Example
Created August 23, 2012 20:21
Very Simple XML example
<?xml version="1.0" encoding="UTF-8" ?>
<quiz>
<question>
<text>What does 'API' stand for?</text>
<answer>API stands for Application Programming Interface.</answer>
</question>
<question>
<text>What's so good about pragmatic REST?</text>
<answer>It's focused on the api consumer, so it makes it easier for developers to contribute to your app library!</answer>
</question>
@13protons
13protons / JSON Example
Created August 23, 2012 20:45
Very simple JSON example
{
questions: [{
text: "What does 'API' stand for?",
answer: "API stands for Application Programming Interface."
},{
text: "What's so good about pragmatic REST?",
answer: "It's focused on the api consumer, so it makes it easier for developers to contribute to your app library!"
}]
}
@13protons
13protons / PLIST Example
Created August 23, 2012 20:45
Very Simple PLIST example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>quiz</key>
<dict>
<key>question</key>
<array>
<dict>
<key>text</key>
@13protons
13protons / angular-masonry.js
Created March 25, 2014 19:21
Trying to get masonry working with angular
console.log("Masonry getting loade by browser. Angular?");
(function () {
'use strict';
angular.module('wu.masonry', []).controller('MasonryCtrl', [
'$scope',
'$element',
'$timeout',
function controller($scope, $element, $timeout) {
var bricks = {};
@13protons
13protons / gist:fdec1d4a3fdefa6ff17a
Last active August 29, 2015 14:06
Deckdown parsing

The deckdown regex parser should be able to break up a document by headers. For example this input html fragment:

<h1>Section</h1>
<p>Section Info</p>

<h2>Section</h2>
<p>Section Info</p>

<h1>Section<h1>
#testing
***
Just Testing using Gists for Deckdown
| Left-Aligned | Center Aligned | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is | some wordy text | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
@13protons
13protons / deckdown is
Last active August 29, 2015 14:06
Why use Deckdown?
#Welcome to Deckdown
##Deckdown is
a brand new way to create slide decks
***
It take a markdown file, and creates a _reveal.js_ powered slide deck
##How?

#Choose Your Own Adventure!

##1. My Brain Is Running In Circles (Loops)

###Exercise 1: Harmonic Sum

Write a program to compute the sum of a harmonic series, as shown below, where n=50000. Calculate the sum from left-to-right, and then from right-to-left.

Harmonic(n) = 1 + 1/2 + 1/3 + 1/4 + .... + 1/n
layout title author tags
recipe
IoT Security System
Matt Dobson
recipe
iot
home security
diy