Skip to content

Instantly share code, notes, and snippets.

View ntotten's full-sized avatar

Nathan Totten ntotten

View GitHub Profile
var lsr = require('lsr');
var path = require('path');
var fs = require('fs');
var matter = require('gray-matter');
var moment = require('moment');
var files = [];
function loadPath(loadPath) {
var resolvedPath = path.resolve(__dirname, loadPath);
function(ticket, event, callback) {
if (event.entity === 'ticket' && event.name === 'created' && !ticket.status) {
if (ticket.tags.indexOf('priority-support') ||
ticket.tags.indexOf('standard-support') ||
ticket.tags.indexOf('enterprise-support') ||
ticket.tags.indexOf('priority-sales') {
ticket.status = 'normal';
}
}
}
@ntotten
ntotten / Checklist.md
Last active August 29, 2015 14:13
Auth0 Github Project Checklist

Github Checklist

The standard requirements for any github project on github.com/auth0.

  • Must have README.md
  • Must have LICENSE file - generally MIT
  • Must have .gitignore file: https://github.com/github/gitignore
  • Must have a metadata.json file if it is a Sample, SDK, Tutorial, or Demo
  • Must have a /examples folder with at least one example showing how to use the project (except samples)
  • Must have description field of github project set with meaningful description of project
  • Should have url field of github project set
@ntotten
ntotten / HomeController.cs
Last active October 27, 2019 16:13
IP Address Filter for Windows Azure Web Sites
[IPFilter("192.168.0.0/24")]
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}
bundles.UseCdn = true;
BundleTable.EnableOptimizations = true;
var jquery = new ScriptBundle("~/bundles/jquery", "//ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js")
.Include("~/Scripts/jquery-{version}.js");
jquery.CdnFallbackExpression = "window.jQuery";
bundles.Add(jquery);
@ntotten
ntotten / app.js
Last active December 15, 2015 20:49
Scaling Out Socket.IO with Windows Azure Service Bus
// Setup the Service Bus store for Socket.IO
var sbstore = require('socket.io-servicebus');
io.configure(function () {
io.set("transports", ["xhr-polling"]);
io.set("polling duration", 30);
io.set('store', new sbstore({
topic: nconf.get("SERVICE_BUS_TOPIC"),
connectionString: nconf.get("CUSTOMCONNSTR_SERVICEBUS"),
logger: io.get('logger')
}));
public FacebookClient(string appSecret, string appId)
{
SendAnalytics();
}
private static bool AnaltyicsSent = false;
private static object AnalyticsLock = new object();
private void SendAnalytics()
{
@ntotten
ntotten / RebuildOpenWith.bash
Last active December 15, 2015 05:39
Rebuilds the open with menu on OS X
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;
@ntotten
ntotten / App.xaml.cs
Last active December 14, 2015 22:19
Using Windows Azure Mobile Services with the Facebook SDK for Windows Phone
public static FacebookSessionClient FacebookSessionClient =
new FacebookSessionClient("[facebookAppId]");
public static MobileServiceClient MobileService = new MobileServiceClient(
"https://[namespace].azure-mobile.net/",
"[applicationKey]"
);
@ntotten
ntotten / AA.com Error
Last active December 14, 2015 12:28
Error from AA.com Award travel search
Failed to load resource https://aa.com/reservation/award/js/awardDogTag.jsp
Failed to load resource https://aa.com/reservation/award/js/dogtag.js
Uncaught ReferenceError: AwardDogTag is not defined awardFlightSearchSubmit.do:3374
Uncaught ReferenceError: awardDogTag is not defined prototype.js:3972