This file contains hidden or 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
| select address from mailer_email into outfile '/home/gileno/emails3.txt'; |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import os | |
| import time | |
| import settings | |
| from fabric.contrib.console import confirm | |
| from fabric.api import local, settings as fabric_settings, env, cd, run, sudo | |
| env.hosts = ['domain_or_ip'] |
This file contains hidden or 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
| def _shard_array(inlist, shard_size): | |
| # inlist = 150-element list | |
| # shard_size = 40 | |
| num_shards = len(inlist) / shard_size | |
| # num_shards == 3 | |
| shards = [] | |
| for i in range(num_shards): | |
| # i == 0 | |
| start = shard_size * i # start == 0, then 40, then 80... |
This file contains hidden or 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 os | |
| from os import path | |
| from fabric.api import local, settings, abort, run, cd, env, sudo | |
| from fabric.contrib.project import rsync_project | |
| env.hosts = [host,] | |
| env.user = 'user' | |
| exclude = [] | |
| def prepare_deploy(): |
This file contains hidden or 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
| from __future__ import with_statement | |
| from fabric.api import * | |
| from fabric.contrib.files import exists | |
| env.use_ssh_config = True | |
| env.hosts = ['locum'] | |
| REPO = '[email protected]:sapegin/grunt-talk.git' | |
| DEST = 'projects/sapegin/htdocs/subprojects/pres/grunt' |
This file contains hidden or 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
| from fabutils import needsDeployLocation, runAsAdmin | |
| import os.path | |
| @needsDeployLocation | |
| @roles('www') | |
| def deploy(): | |
| """ | |
| Deploys code to production servers | |
| """ |
This file contains hidden or 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
| from fabric.api import * | |
| import os | |
| import fabric.contrib.project as project | |
| # Local path configuration (can be absolute or relative to fabfile) | |
| env.theme = 'themes/your-theme' | |
| env.deploy_path = '/absolute/path/for/generated/output' | |
| # Remote server configuration | |
| prod = '[email protected]:22' |
This file contains hidden or 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
| from fabric.api import settings, roles, env, run, sudo, cd | |
| from fabric.decorators import task | |
| from fabric import tasks | |
| from fabric.contrib.project import rsync_project | |
| env.roledefs = { | |
| 'dev': [ | |
| '[email protected]:2222' |
This file contains hidden or 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
| from fabric.api import env, task | |
| from fabric.decorators import runs_once | |
| env.hosts = ['host1','host2','host3'] | |
| @runs_once | |
| def _pull(): | |
| print "pull artifacts" | |
| @task |
This file contains hidden or 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
| from fabric.context_managers import cd | |
| from fabric.operations import sudo,run,local | |
| from fabric.state import env | |
| env.hosts = ['127.0.0.1',] | |
| env.user = 'username' | |
| env.deploy_user = 'django' | |
| env.key_filename = ['/Users/soyrex/Keys/keyfile.pem',] | |
| def stage(): | |
| local('git push origin staging') |