Skip to content

Instantly share code, notes, and snippets.

View KevinTCoughlin's full-sized avatar

Kevin Coughlin KevinTCoughlin

View GitHub Profile
@KevinTCoughlin
KevinTCoughlin / gist:2997921
Created June 26, 2012 18:49 — forked from msluyter/gist:1925069
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@KevinTCoughlin
KevinTCoughlin / windows8listviewtutorial.js
Last active December 14, 2015 22:19
Found what I believe to be a mistake on the MSDN Windows 8 JavaScript ListView tutorial http://msdn.microsoft.com/en-us/library/windows/apps/br211837.aspx DataArray item property should be "description" instead of "text" so that the template correctly uses the description property of each object. Otherwise the template returns undefined.
// Windows 8 MSDN ListView Tutorial ListItem Template
<div id="mediumListIconTextTemplate" data-win-control="WinJS.Binding.Template">
<div>
<!-- Displays the "picture" field. -->
<img data-win-bind="alt: title; src: picture" />
<div>
<!-- Displays the "title" field. -->
<h4 data-win-bind="innerText: title"></h4>
@KevinTCoughlin
KevinTCoughlin / index.html
Created May 14, 2013 03:49
Qunit and Backbone.js Testing Tutorial index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>QUnit and Backbone Example</title>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.11.0.css">
<script src="http://underscorejs.org/underscore.js"></script>
<script src="http://backbonejs.org/backbone.js"></script>
</head>
<body>
/**
* Process an array of data synchronously.
*
* @param data An array of data.
* @param processData A function that processes an item of data.
* Signature: function(item, i, callback), where {@code item} is the i'th item,
* {@code i} is the loop index value and {@code calback} is the
* parameterless function to call on completion of processing an item.
*/
function doSynchronousLoop(data, processData, done) {
@KevinTCoughlin
KevinTCoughlin / kevin-coughlin-goals-2014
Last active January 2, 2016 03:59
Kevin Coughlin's Goals for 2014
# Goals for 2014
* Lose 30 lbs
* Participate in a 5k
* Publish at least one blog post per week
* Publish an Android app to Google Play
* Publish an iOS app to the iTunes App Store
* [Done 1/30/14 - Publish a Windows 8/8.1 app to the Windows Store](http://apps.microsoft.com/windows/en-us/app/smodr/ba5f0a9b-a2e3-470d-97da-d441dbb1e01c)
* Read at least one book per month
* Write a solution for every Easy Reddit /r/dailyprogrammer challenge posted in 2014
@KevinTCoughlin
KevinTCoughlin / firebase_and_ts
Created February 10, 2014 13:06
TypeScript + Firebase
# Getting Started with TypeScript and Firebase
## What is TypeScript
## Creating a new TypeScript Project
* Open Visual Studio 2013
* Navigate to NuGet plugins for this solution
Nuget plugins for this solution -> Firebase definitely typed
@KevinTCoughlin
KevinTCoughlin / server.js
Last active August 29, 2015 13:57
iTunes Top 100 Collage
var request = require('request')
, sys = require('sys')
, fs = require('fs')
, mkdirp = require('mkdirp')
, gm = require('gm').subClass({ imageMagick: true });
var n = 100;
var l = Math.sqrt(n);
var w = Math.sqrt(n);
var width = 170;
@KevinTCoughlin
KevinTCoughlin / weight
Created March 8, 2014 17:04
Graphing my weight
<!doctype html>
<html ng-app="app">
<head>
<title>Tracking My Weight</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.1/angular.min.js"></script>
<script type="text/javascript">
angular.module('app', []).
controller('WeightCtrl', function($http) {
var key = '0AjNYHy2ejpSKdDVxWDZMMTVpeXF6MGE3MkVsOWhwc2c';
@KevinTCoughlin
KevinTCoughlin / sir.html
Created March 13, 2014 00:18
Smodcast Internet Radio Stream URL
<!DOCTYPE html>
<html>
<head>
<title>S.I.R</title>
</head>
<body>
<audio controls="controls" src="http://68.168.101.146:8518/;stream.nsv&type=mp3"></audio>
</body>
</html>
@KevinTCoughlin
KevinTCoughlin / winjs-systemmediacontrols.js
Created March 17, 2014 02:06
Windows 8.1 JavaScript SystemMediaControls.displayUpdater Example
// Set & Update SystemMediaControls Display
var updater = systemMediaControls.displayUpdater;
updater.type = Windows.Media.MediaPlaybackType.music;
try {
if (updater !== undefined) {
updater.musicProperties.artist = "Kevin Smith & Scott Mosier";
updater.musicProperties.albumArtist = "SModcast";
updater.musicProperties.title = newEpisode.data.title;
updater.thumbnail = Windows.Storage.Streams.RandomAccessStreamReference.createFromUri(new Windows.Foundation.Uri('http://smodcast.com/wp-content/blogs.dir/1/files_mf/smodcast1400.jpg'));
updater.update();