Python:
import <module>
from <module> import defaultMember
from <module> import *
import <module> as <name>
Vagrant::Config.run do |config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "debian_squeeze_32" | |
# The url from where the 'config.vm.box' box will be fetched if it | |
# doesn't already exist on the user's system. | |
config.vm.box_url = "http://mathie-vagrant-boxes.s3.amazonaws.com/debian_squeeze_32.box" | |
# Assign this VM to a host only network IP, allowing you to access it via the IP. | |
config.vm.network "33.33.33.10" |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require "./fabric_provisioner.rb" | |
Vagrant::Config.run do |config| | |
# snip | |
config.vm.provision Vagrant::Provisioners::Fabric do |fab| |
// Mutative | |
company.users.push({ name: 'New User' }); | |
return company; | |
// Immutable | |
return { ...company, users: [ ...company.users, { name: 'New User' } ] }; | |
// Implicit identifier |
# -*- coding: utf-8 -*- | |
import os | |
if os.environ.get('READ_ENV', False): | |
from honcho.command import Honcho | |
h = Honcho() | |
entries = h.read_env(type('obj', (object,), {'env': '.env', 'app_root': os.path.abspath(os.path.dirname(os.path.dirname(__file__)))})()) | |
h.set_env(entries) |
module Vagrant | |
module Provisioners | |
class Fabric < Base | |
class Config < Vagrant::Config::Base | |
attr_accessor :fabfile_path | |
attr_accessor :fabric_path | |
attr_accessor :python_path | |
attr_writer :tasks | |
def _default_fabfile_path |
import soaplib | |
from soaplib.core.service import rpc, soap, DefinitionBase | |
from soaplib.core.model.primitive import String, Integer | |
from soaplib.core.server import wsgi | |
from soaplib.core.model.clazz import Array | |
from flask import Flask | |
flask_app = Flask(__name__) |
""" | |
Configuration Parser | |
Configurable parser that will parse config files, environment variables, | |
keyring, and command-line arguments. | |
Example test.ini file: |
########### | |
# Checks if the given cask needs to be upgraded. | |
# | |
#!/bin/bash | |
set -o pipefail | |
source /etc/profile | |
if [ $# -eq 0 ]; then | |
ARGS=($(brew cask list)) | |
else |
#!/bin/sh | |
# Check if the individual developer has his own hook | |
CMD_NAME=`basename $0` | |
if [ -f $GIT_DIR/hooks/personal/$CMD_NAME ] | |
then | |
# If so, run it. $@ passes all the command line arguments passed to this function | |
# If the personal hook fails, fail this one as well | |
if ! $GIT_DIR/hooks/personal/$CMD_NAME $@ | |
then |