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
" serkan haytac | |
call pathogen#infect() | |
call pathogen#helptags() | |
syntax on | |
set background=light | |
filetype plugin indent on | |
set number | |
set nowrap | |
set hlsearch | |
let g:go_disable_autoinstall = 0 |
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
# serkan haytac | |
#!/usr/bin/python | |
import boto.opsworks.layer1 as opsworks | |
########################################################################################## | |
# Simple class to manage opsworks provisioning # | |
# It can be useful to integrate CI servers and issue # | |
# lifecycle events such as deployment through aws boto library # | |
# Make sure to add your access credentials in .boto file in # | |
# home directory. # | |
# http://boto.readthedocs.org/en/latest/getting_started.html#configuring-boto-credentials# |
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
index index.html index.htm; | |
server { | |
root /usr/share/nginx/html; | |
listen 443; | |
server_name git.example.com; | |
access_log off; |
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
# mkdir -p /etc/nginx/ssl | |
# sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt | |
# redirect HTTP to HTTPS - /etc/nginx/sites-available/default | |
server { | |
listen 80; | |
server_name jira.example.com; | |
access_log off; |
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 ubuntu:12.10 | |
MAINTAINER Ken Cochrane "[email protected]" | |
RUN apt-get -qq update | |
RUN apt-get install -y python-dev python-setuptools supervisor git-core | |
RUN easy_install pip | |
RUN pip install virtualenv | |
RUN pip install uwsgi | |
RUN virtualenv --no-site-packages /opt/ve/djdocker | |
ADD . /opt/apps/djdocker | |
ADD .docker/supervisor.conf /opt/supervisor.conf |
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
echo cookbook_path ["/opt/aws/opsworks/current/site-cookbooks"] > solo.rb | |
opsworks-agent-cli get_json > attributes.json | |
sudo /opt/aws/opsworks/current/bin/chef-solo -c solo.rb -j ~ubuntu/attributes.json -o recipe[map-proxy::config] |
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 and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
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
""" | |
Modified from: https://gist.github.com/967274 | |
CHANGES: | |
* Serialize pk in feature.id and remove from feature.properties | |
* Added default date format and time format for encoder | |
* Allow geometryfield option, which doesn't have to be a field, e.g. a @property | |
USAGE: |
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
''' | |
Created on 2011-05-12 | |
@author: Daniel Sokolowski | |
Extends django's built in JSON serializer to support GEOJSON encoding | |
Requirements: | |
Install and setup geodjango (django.contrib.gis) |
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 import setup_environ | |
import settings, csv | |
setup_environ(settings) | |
from companies.models import Lead | |
file = csv.reader(open('florida.csv', 'rU'), delimiter = ',', quotechar='|') | |
for row in file: | |
#Name the Django field with corresponding row in your csv. | |
lead = Lead(cname=row[0], crep=row[1], cnumber=row[2], cemail=row[3], caddress=row[4], ccity=row[5],czip=row[6],submissiondate=row[7], businesstype = row[8], comment = row[9]) | |
lead.save() |
NewerOlder