Creates an association between the policy and the endpoint. If another association already existed for the specified endpoint, this will replace that association.
Request:
localbox:~% ssh my-linode-account "git init --bare /tmp/myrepo.git" | |
dstanek@my-linode-account's password: | |
Initialized empty Git repository in /tmp/myrepo.git/ | |
localbox:Projects/my_awesome_project% git push ssh://my-linode-account/tmp/myrepo.git master | |
dstanek@my-linode-account's password: | |
Counting objects: 162, done. | |
Compressing objects: 100% (161/161), done. | |
Writing objects: 100% (162/162), 39.62 KiB, done. | |
Total 162 (delta 78), reused 0 (delta 0) | |
To ssh://my-linode-account/tmp/myrepo.git |
# -*- coding: utf-8 -*- | |
""" | |
This test module will run setUp and tearDown only *once* for all test cases in this module. | |
This is very convenient for users who want to just test multiple urls whether they are reachable and respond with the correct http response code. | |
""" | |
import logging | |
log = logging.getLogger(__name__) | |
from os import path |
from myapp.forms import MyForm | |
def my_view(request): | |
form = MyForm(request.POST or None) | |
if form.is_valid(): | |
name = form.cleaned_data['name'] | |
email = form.cleaned_data['email'] | |
# do something great with that data | |
#!/bin/bash | |
host=$1 | |
pub_key=$2 | |
function help { | |
echo 'usage: ./bootstrap-devstack.sh host public_key' | |
echo ' example: ./bootstrap-devstack.sh 1.1.1.1 ~/.ssh/id_dsa.pub' | |
exit 1 | |
} |
{ | |
"rules": [ | |
{ | |
"local": { | |
"user": "name" | |
}, | |
"remote": [ | |
{ | |
"type": "UserName" | |
} |
{ | |
"rules": [ | |
{ | |
"local": { | |
"user": { | |
"name": "@@UserName@@" | |
} | |
}, | |
"remote": [ | |
{ |
import abc | |
class Logger(object): | |
__metaclass__ abc.ABCMeta | |
@abstractmethod | |
def log_it(self, message, *args, **kwargs): | |
raise NotImplemented | |
import abc | |
class Logger(object): | |
__metaclass__ abc.ABCMeta | |
@abstractmethod | |
def log_it(self, message, *args, **kwargs): | |
raise NotImplemented | |
Python Koans - An Introduction To Python
Python is a fun, dynamic, flexible language for solving all kinds of problems. It's used everywhere from modest scripts to large systems, powering things like websites, games, film production tools, scientific analysis, and even space programs. Best of all, it's a language that "fits your brain".
This session is a mostly self guided introduction to Python through koans. What’s a koan you ask? It’s a small puzzle or exercise expressed as a test, designed to build your knowledge of the Python syntax and idioms incrementially.