Skip to content

Instantly share code, notes, and snippets.

View gregelin's full-sized avatar

Greg Elin gregelin

  • RegScale, Inc.
  • Knoxville, TN
  • 20:20 (UTC -04:00)
View GitHub Profile
#!/usr/bin/env python
import httplib
import urllib, urllib2
import os
import re
HTTP_HOST = 'disclosures.house.gov'
HTTP_PATH = '/ld/LDDownload.aspx'
def get_context():
import re
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone
from metaphone import dm as double_metaphone
# get the Redis connection
from jellybean.core import redis
import models
# Words which should not be indexed
@gregelin
gregelin / csv2xml.py
Created May 30, 2011 01:25 — forked from justinvw/csv2xml.py
Simple script to convert a CSV file to XML
#!/usr/bin/python
# encoding: utf-8
"""
csv2xml.py
Created by Justin van Wees on 2011-04-18.
"""
import sys
import os
import string
@gregelin
gregelin / wp-db.tutorial.php
Created January 14, 2012 10:11 — forked from benbalter/wp-db.tutorial.php
WordPress DB Tutorial
<?php
//absolute path to wp-load.php, or relative to this script
//e.g., ../wp-core/wp-load.php
include( 'trunk/wp-load.php' );
//grab the WPDB database object, using WP's database
//more info: http://codex.wordpress.org/Class_Reference/wpdb
global $wpdb;

Server Setup

Unsere Setup-Routine für eine Rails-App mit Nginx, Passenger, rvm auf einen Host Europe-VPS mit Ubuntu 10.4.

Installation der benötigten Pakete

apt-get update

apt-get install -y build-essential bison openssl libreadline5 libreadline5-dev curl \

PDF Liberation Hackathon - Federal Communications Commission Challenge

Note: this was originally an Federal Communications Commission challenge at the PDF Liberation Hackathon. The original information can be found here: https://github.com/pdfliberation/pdf-hackathon/blob/master/challenges/fcc-daily-releases.md

PDF Liberation Hackathon - Federal Communications Commission Challenge

"As part of regular business process, the Federal Communications Commission writes and releases many documents. These documents are public notices, rule-makings, proposed rules and many other prose based discussions of technical issues relating to spectrum, broadcasting, broadband, media and other communications issues. In general the legal industry has a need for these documents to not only contain the proper history, content and technical discussions, but also contain standard formatting that the legal industry has developed. This combination of content and formatting fundamentally requires the FCC to release PDF documen

Variables
==========
predefined variables :
- inventory_hostname (fqdn) (normally the same as ansible.fqdn)
- inventory_hostname_short
To know the return codes returned by ansible modules, just use plain ansible -vvv to see them :
ansible -i ~/ansible/arrfab.net/hosts/hosts.cfg -vvv -m copy -a 'src=files/sysinfo dest=/etc/sysinfo' tungstene.arrfab.net
tungstene.arrfab.net | success >> {
"changed": true,
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@gregelin
gregelin / README.md
Created February 20, 2014 15:14 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management