#Mac OS X
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
| Copyright (c) 2011 ZURB, http://www.zurb.com/ |
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 django.core.management.base import BaseCommand, CommandError | |
| from django.core import serializers | |
| from optparse import make_option | |
| class Command(BaseCommand): | |
| """ | |
| Generate a fixture file for a specific model. | |
| Useage: ./manage.py generate_fixtures app.models.MyModel --file=MyModelsOutputFile.json | |
| """ |
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
| [unix_http_server] | |
| file=/tmp/supervisor.sock ; (the path to the socket file) | |
| [supervisord] | |
| logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log) | |
| logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) | |
| logfile_backups=10 ; (num of main logfile rotation backups;default 10) | |
| loglevel=info ; (log level;default info; others: debug,warn,trace) | |
| pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | |
| nodaemon=false ; (start in foreground if true;default false) | |
| minfds=1024 ; (min. avail startup file descriptors;default 1024) |
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 redis | |
| import threading | |
| class Listener(threading.Thread): | |
| def __init__(self, r, channels): | |
| threading.Thread.__init__(self) | |
| self.redis = r | |
| self.pubsub = self.redis.pubsub() | |
| self.pubsub.subscribe(channels) | |
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
| #!/usr/bin/env python | |
| # | |
| # Script to poll Ethernet interface counters from a SNMP host | |
| # requires pysnmp and the handy snmpclient library from | |
| # https://github.com/seveas/python-snmpclient | |
| # | |
| # licensed under creative commons CC0 (public domain) | |
| # |
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 sys | |
| from fabric.colors import green, yellow | |
| from fabric.contrib.console import confirm | |
| from fabric.context_managers import cd, prefix | |
| from fabric.operations import prompt | |
| from fabric.api import run, local, env, sudo | |
| env.user = 'ubuntu' | |
| env.hosts = ['0.0.0.0'] #ip do ec2 | |
| env.app_path = '/home/seu-usuario-do-ec2/bomgusto' |
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
| #!/bin/bash | |
| # | |
| # Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit) | |
| # updated to PostGIS 2.0.1 | |
| # basics | |
| apt-get install python-software-properties | |
| apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3 | |
| # install the following pacakages |
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
Show hidden characters
| // It's saved under path_to_Packages/User/ | |
| { | |
| "cmd": ["bibtex", "$file_base_name"], | |
| "path": "$PATH:/usr/texbin:/usr/local/bin", | |
| "file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)", | |
| "selector": "text.tex.latex" | |
| } |
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
| #!/bin/bash -ex | |
| # Paste this into ssh | |
| # curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex | |
| # When forking, you can get the URL from the raw (<>) button. | |
| ### Set some command variables depending on whether we are root or not ### | |
| # This assumes you use a debian derivate, replace with yum, pacman etc. | |
| aptget='sudo apt-get' | |
| chsh='sudo chsh' |