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
#!/usr/bin/env python | |
import argparse | |
import gitlab3 | |
import io | |
import os | |
import sys | |
def parse_command_line_arguments(args): | |
parser = argparse.ArgumentParser(description='Manage GitLab deploy keys') |
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
import boto.vpc | |
import time | |
REGION_NAME = 'us-west-2' | |
AMI_ID = 'ami-8e27adbe' # Amazon Linux AMI | |
conn = boto.vpc.connect_to_region(REGION_NAME) | |
# Create a VPC | |
vpc = conn.create_vpc('10.0.0.0/16') |
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
In [1]: policy = """{ | |
...: "Statement":[{ | |
...: "Effect":"Allow", | |
...: "Action":["s3:*"], | |
...: "Resource":["arn:aws:s3:::mybucket"]}]}""" | |
In [2]: import boto | |
In [4]: c = boto.connect_iam() | |
In [5]: instance_profile = c.create_instance_profile('myinstanceprofile') | |
In [6]: role = c.create_role('myrole') | |
In [7]: c.add_role_to_instance_profile('myinstanceprofile', 'myrole') |
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 | |
# Adium theme AdiumMessageStyle installer for Empathy | |
# Originally © 2009 Antono Vasiljev | |
# Licensed under the same terms as Empathy | |
# http://antono.info/en/165-install-adium-themes-to-empathy | |
# Changed by Vertlo Oraerk (did not work with directories containing spaces in the names) | |
if [ -z $1 ] | |
then | |
echo |
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
#!/usr/bin/ruby | |
# | |
# I deliberately didn't DRY /usr/local references into a variable as this | |
# script will not "just work" if you change the destination directory. However | |
# please feel free to fork it and make that possible. | |
# | |
# If you do fork, please ensure you add a comment here that explains what the | |
# changes are intended to do and how well you tested them. | |
# | |
# 14th March 2010: |
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
Feature: Twitter login | |
As a registred user | |
I want use my twitter account | |
So that I can get personal data | |
Scenario: Authenticate | |
Given my username pytwitt2 | |
And my secret password 123456 | |
When I request for access | |
Then my user pytwitt2 object should be returned |
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
import logging | |
import os | |
# Add appengine stuff to path | |
import dev_appserver as script | |
script.fix_sys_path() | |
from google.appengine.api import yaml_errors | |
from google.appengine.tools import dev_appserver | |
from google.appengine.tools import dev_appserver_main as main |
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
#!/usr/bin/env python | |
from twisted.internet import reactor | |
from twisted.web import proxy, server | |
from twisted.web.resource import Resource | |
class ProxyResource(Resource): | |
def getChild(self, path, request): | |
request.received_headers['x-forwarded-host'] = request.received_headers['host'] |
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
*.pyc |
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
# basic pfctl control | |
# == | |
# Related: http://www.OpenBSD.org | |
# Last update: Tue Dec 28, 2004 | |
# == | |
# Note: | |
# this document is only provided as a basic overview | |
# for some common pfctl commands and is by no means | |
# a replacement for the pfctl and pf manual pages. |
OlderNewer