Skip to content

Instantly share code, notes, and snippets.

View lnickers2004's full-sized avatar

Larry Nickerson lnickers2004

View GitHub Profile
@lnickers2004
lnickers2004 / Ball.js
Created August 9, 2017 22:50 — forked from fmnxl/Ball.js
import React from 'react';
import {
Sphere
} from 'react-vr';
import * as CANNON from 'cannon/build/cannon.js'
export default class Particle extends React.Component {
constructor(props) {
this.body = new CANNON.Body({
mass: 1,
/*
* For a more in depth look at the guard statement check out
* http://ericcerney.com/swift-guard-statement/
* where I build off the sample shown here.
*/
var x: Int? = 0
// Lets me unwrap x and also check a condition on it
func fooGuard() {
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<meta charset=utf-8 />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.2/angular.min.js"></script>
<meta name="description" content="$scope.$apply example" />
</script>
<title></title>
</head>
We couldn’t find that file to show.
@lnickers2004
lnickers2004 / BaseApiController.cs
Last active January 3, 2016 15:59 — forked from anonymous/gist:8486727
WebApi2: DTO ModelFactory which has been refactored to include the creation of HATEOAS URIs-- HyperMedia Links NOTE: we were not able to use automapper to Map between Entities and DTO's because we wanted to create Hypertext URIs for the DTOs inside the Factory. So we opted to use the Factory Pattern for the creation of our DTO's
using CountingKs.Data;
using CountingKs.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace CountingKs.Controllers
@lnickers2004
lnickers2004 / ApiUser.cs
Last active January 3, 2016 13:08 — forked from nickarthur/CountingKsSeeder.cs
DATABASE: SEED SQL SERVER DATABASE FROM EXCEL SPREADSHEET.xls file example for entity framework codefirst and sqlserver. Also show repository pattern.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CountingKs.Data.Entities
{
public class ApiUser
{
@lnickers2004
lnickers2004 / abc.txt
Created January 4, 2014 22:40 — forked from markrendle/abc.txt
Angular.JS: Visual Studio 2012 Intellisense setup
1. Back up C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html\commonHTML5Types.xsd
2. Delete C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html\commonHTML5Types.bin if it exists
3. Replace it with the file below.
4. Restart Visual Studio 2012.
@lnickers2004
lnickers2004 / Global.asax.cs
Created December 10, 2013 00:46 — forked from rdingwall/Global.asax.cs
CamelCase JSON: ASP.Net JSON camel case formatter for both WebApi and ASP.Net MVC
...
var config = GlobalConfiguration.Configuration;
// Replace the default JsonFormatter with our custom one
var index = config.Formatters.IndexOf(config.Formatters.JsonFormatter);
config.Formatters[index] = new JsonCamelCaseFormatter();
...
@lnickers2004
lnickers2004 / DelegatingActionDescriptor.cs
Created December 10, 2013 00:23 — forked from MikeJansen/DelegatingActionDescriptor.cs
CORS and JSONP for Web Api The Old complicated WebApi 1.0 way of doing CORS and JSONP. Have a look at the awesome support for it in WebApi2.0 NOTE: webapi 2 is better so you don't have to jump through as many hoops as this. Hats off to the original developer that figured this out.
namespace Radar.Common.WebServer.Api.Controllers
{
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
@lnickers2004
lnickers2004 / Auction.cshtml
Created September 25, 2013 18:43 — forked from Maarten88/Auction.cshtml
SignalR: example with Bootstap 2, knockout.js javascript and jQuery
@{
ViewBag.Title = "SignalR Auction";
}
<div class="row-fluid"">
<div class="page-header">
<h1>
<strong data-bind="text: Title"></strong>
<small data-bind="text: Info"></small>
</h1>