This guide explains how to set up Kerberos authentication for:
- SSH access to a server,
- HTTP access to a service.
It assumes you're running Active Directory and Debian servers.
import pkg_resources, pprint | |
requires = {p.key: [r.key for r in p.requires()] for p in pkg_resources.working_set} | |
def graph(pkg): | |
if not requires[pkg]: | |
return {pkg: {}} | |
return {pkg: {k: v for p in requires[pkg] for k, v in graph(p).items() }} |
export PATH := node_modules/.bin:$(PATH) | |
source_files := $(wildcard lib/*.coffee) | |
build_files := $(source_files:%.coffee=build/%.js) | |
template_source := templates/*.handlebars | |
template_js := build/templates.js | |
app_bundle := build/app.js | |
spec_coffee := $(wildcard spec/*.coffee) | |
spec_js := $(spec_coffee:%.coffee=build/%.js) |
set -e | |
# Looks clever, is short, but removes your working directory on Mac OS X | |
# where `mktemp -d` fails. | |
cd "$(mktemp -d)" | |
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM | |
# ... |
First, you install ruby-build and chruby. ruby-build is a program that knows how to download and build different ruby versions. chruby manages $PATH
to control which ruby
gets invoked in your shell. They work completely independently.
sudo su
cd /usr/src
git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build
./install.sh
cd -
import os | |
import pytest | |
from alembic.command import upgrade | |
from alembic.config import Config | |
from project.factory import create_app | |
from project.database import db as _db | |
Setting it up can be a bit tricky if you aren't used to dealing with SSH keys and forced commands. Here's an example showing how to set it up on a server. First download the script- I keep it in /usr/local/sbin so it can be used system-wide.
# cd /usr/local/sbin
# wget http://www.jms1.net/log-session
...
==== SNIP ==== | |
class DistanceSerializer(serializers.Serializer): | |
km = serializers.FloatField() | |
m = serializers.FloatField() | |
mi = serializers.FloatField() | |
ft = serializers.FloatField() | |
class SearchResultSerializer(serializers.Serializer): |
Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py
:
import re
function AttachmentCtrl($scope, $location, $timeout, Docs) { | |
$(function() { | |
$('#detail-form-doc').fileupload({ | |
dataType: 'json', | |
url: '/angular-ib/app/fileupload?id=' + $location.search().id, | |
add: function(e, data) { | |
$scope.$apply(function(scope) { | |
// Turn the FileList object into an Array | |
for (var i = 0; i < data.files.length; i++) { | |
$scope.project.files.push(data.files[i]); |