This file contains 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 fabric file makes setting up and deploying a django application much | |
easier, but it does make a few assumptions. Namely that you're using Git, | |
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have | |
Django installed on your local machine and SSH installed on both the local | |
machine and any servers you want to deploy to. | |
_note that I've used the name project_name throughout this example. Replace | |
this with whatever your project is called._ |
This file contains 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
# %(mysite)s - run %(mysite)s instances (default is the main production instance) | |
# | |
# This runs gunicorn-django for %(mysite)s; to install: | |
# * sudo ln -s <this file> /etc/init/%(mysite)s | |
# * sudo initctl reload-configuration | |
# | |
# it expects the following directory layout: | |
# | |
# /home/%(mysite)s/public_html | |
# \-env -> virtualenv |
This file contains 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
Hi Jeff, | |
The lead security engineer who raised this issue is keynoting a conference in Europe this week, so we can not accommodate your ask for a video conference. Furthermore, we feel that this issue has already been very extensively and unambiguously documented; with central points being directly refuted. | |
Chris |
This file contains 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
var application_root = __dirname, | |
express = require("express"), | |
path = require("path"), | |
mongoose = require('mongoose'); | |
var app = express.createServer(); | |
// database | |
mongoose.connect('mongodb://localhost/ecomm_database'); |
This file contains 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
using NUnit.Framework; | |
using ServiceStack.ServiceClient.Web; | |
using example_proj.Services; | |
namespace Tests | |
{ | |
[TestFixture] | |
public class ServiceTests | |
{ | |
private TestAppHost _appHost; |
This file contains 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
~ $ strace -e write python test.py | |
write(3, "0 seconds\n1 seconds\n2 seconds\n3 "..., 144) = 144 | |
+++ exited with 0 +++ |
This file contains 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
#! /bin/sh | |
# Start from the repository root. | |
cd ./$(git rev-parse --show-cdup) | |
# Delete .pyc files and empty directories. | |
echo "Deleting pyc files." | |
find . -name "*.pyc" -delete | |
find . -type d -empty -delete |
This file contains 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
using Nancy; | |
using Nancy.Testing; | |
using Xunit; | |
using df_nancy.Modules.api; | |
namespace df_tests.ApiTests | |
{ | |
public class PositionApiTests | |
{ | |
[Fact] |
This file contains 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
{ | |
"checks": { | |
"ping_check": { | |
"handlers": ["default"], | |
"command": "/etc/sensu/plugins/check-http.rb -p http://www.rmienergy.com", | |
"interval": 5, | |
"standalone": true, | |
} | |
} | |
} |
This file contains 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
angular.module('App', ['restangular']) | |
.config(function(RestangularProvider) { | |
RestangularProvider.setBaseUrl('/api'); | |
RestangularProvider.setDefaultHeaders({ | |
"headers": { "common": { "Accept": "application/json" } } | |
}); | |
}) | |
.service('StaticsService', ['$scope', 'Restangular', | |
function($scope, Restangular) { | |
$scope.commodities = Restangular.all('commodities').getList(); |