Skip to content

Instantly share code, notes, and snippets.

View Blackmist's full-sized avatar

Larry Franks Blackmist

  • Microsoft
  • Belmont, NC
View GitHub Profile
@Blackmist
Blackmist / cachingconfigsnip.xml
Created July 2, 2012 14:14
Windows Azure Caching snippets
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.NamedCaches" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.Loglevel" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage" value="30" />
<Setting name="Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString" value="" />
@Blackmist
Blackmist / web.config
Created September 19, 2012 17:01
URLRewrite to rewrite requests to the /public folder
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="false" />
<rewrite>
<rules>
<clear />
<rule name="RewriteToPublic" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
<match url="(.*)"/>
<action type="Rewrite" url="public/{R:1}" />
@Blackmist
Blackmist / config.json
Created April 6, 2013 16:48
example of logging to table storage on socket.io messages. Reads storage account name and key, along with partition key and table name from either the config.json file, or environment variables STORAGE_NAME, STORAGE_KEY, PARTITION_KEY, TABLE_NAME. based on the example chat application from the Socket.io repository.
{
"STORAGE_NAME": "storage name",
"STORAGE_KEY": "storage key",
"PARTITION_KEY": "partition key",
"TABLE_NAME": "table name"
}
@Blackmist
Blackmist / index.html
Last active December 17, 2015 02:29
Ember application part 1, index file.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="styles/main.css">
@Blackmist
Blackmist / gist:5535974
Created May 7, 2013 20:47
Ember application part 1, styles
$iconSpritePath: "../images/glyphicons-halflings.png";
$iconWhiteSpritePath: "../images/glyphicons-halflings-white.png";
@import 'sass-bootstrap/lib/bootstrap';
@import 'sass-bootstrap/lib/responsive';
@Blackmist
Blackmist / application.hbs
Created May 9, 2013 16:59
Ember app application.hbs
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
{{#linkTo index class="brand"}}My Great Blog{{/linkTo}}
<div class="nav-collapse collapse">
@Blackmist
Blackmist / gist:5548877
Created May 9, 2013 17:04
snippet for ember.js example route
App.Router.map(function () {
// put your routes here
this.resource('posts');
this.resource('newpost');
});
@Blackmist
Blackmist / posts.hbs
Created May 9, 2013 17:06
static posts.hbs for example.
<div class="container-fluid">
<div class="row-fluid">
<div class="span3">
<ul class="nav nav-tabs nav-stacked">
<li><a href="#">Posts go here</a></li>
<li><a href="#">And here!</a></li>
</div>
</div>
</div>
@Blackmist
Blackmist / newpost.hbs
Last active December 17, 2015 04:09
new posts form
<div class="span6">
{{view Ember.TextField valueBinding="title" class="span6" placeholder="Title"}}
</div>
<div class="span4">
{{view Ember.TextField valueBinding="author" class="span2" placeholder="Author"}}
</div>
<div class="span8">
{{view Ember.TextArea valueBinding="body" class="span8" rows="6" placeholder="Your blog goes here"}}
</div>
<div class="span12">
@Blackmist
Blackmist / gist:5548924
Last active December 17, 2015 04:18
newpost action controller
App.NewpostController = Ember.ObjectController.extend({
title: '',
author: '',
body: '',
save: function() {
//create the post
console.log('title: '+this.get('title'));
//set fields back to empty so the form is cleared
//on next visit