This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[IPFilter("192.168.0.0/24")] | |
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
return View(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
/* | |
copy header-template.html which will have placeholders for injecting css,js | |
*/ | |
copy: { | |
main: { | |
files: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Sagas | |
{ | |
using System; | |
using System.Collections.Generic; | |
class Program | |
{ | |
static ActivityHost[] processes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
modified from original source: https://bitbucket.org/mattkotsenas/c-promises/overview | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Promises |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExpressionBuilder | |
{ | |
// Define some of our default filtering options | |
private static MethodInfo containsMethod = typeof(string).GetMethod("Contains", new[] { typeof(string) }); | |
private static MethodInfo startsWithMethod = typeof(string).GetMethod("StartsWith", new[] { typeof(string) }); | |
private static MethodInfo endsWithMethod = typeof(string).GetMethod("EndsWith", new[] { typeof(string) }); | |
public static Expression<Func<T, bool>> GetExpression<T>(List<GridHelper.Filter> filters) | |
{ | |
// No filters passed in #KickIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
applicationsService.getApplications().then(function (response) { | |
$scope.applications = response.data; | |
}).catch(function (data) { | |
$scope.applications = null; | |
})['finally'](function () { | |
$scope.isBusy = false; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
(function (app) { | |
var selectApplicationController = function ($scope,applicationsService) { | |
$scope.name = "Step 1 - Specify application"; | |
$scope.application={}; | |
applicationsService.getApplications() | |
.then(function (response) { | |
$scope.applications = response.data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git_version() { | |
git --version | sed -e 's/.*\([0-9].[0-9].[0-9]\)/\1/' | |
} | |
if [ -f "/usr/local/Cellar/git/$(git_version)/etc/bash_completion.d/git-completion.bash" ]; then | |
. "/usr/local/Cellar/git/$(git_version)/etc/bash_completion.d/git-completion.bash" | |
fi | |
if [ -f "/usr/local/Cellar/git/$(git_version)/etc/bash_completion.d/git-prompt.sh" ]; then | |
. "/usr/local/Cellar/git/$(git_version)/etc/bash_completion.d/git-prompt.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
OlderNewer