Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View zstumgoren's full-sized avatar

Serdar Tumgoren zstumgoren

View GitHub Profile
~/code/ruby/ap/apme-power-grid/data/source/ferc> ps aux | grep postgres
stumgoren 384 0.0 0.0 2441432 1356 ?? Ss 8:36AM 0:06.43 postgres: stats collector process
stumgoren 383 0.0 0.0 2585880 2004 ?? Ss 8:36AM 0:02.38 postgres: autovacuum launcher process
stumgoren 382 0.0 0.0 2585748 640 ?? Ss 8:36AM 0:00.16 postgres: wal writer process
stumgoren 381 0.0 0.0 2585748 1484 ?? Ss 8:36AM 0:00.18 postgres: writer process
stumgoren 380 0.0 0.0 2585748 704 ?? Ss 8:36AM 0:00.01 postgres: checkpointer process
stumgoren 332 0.0 0.1 2585748 13412 ?? S 8:36AM 0:01.64 /usr/local/opt/postgresql/bin/postgres -D /usr/local/var/postgres -r /usr/local/var/postgres/server.log
stumgoren 9151 0.0 0.0 2432768 624 s003 S+ 2:22PM 0:00.00 grep postgres
dcloud_analytics_production | documentcloud | SQL_ASCII | C | C |
dcloud_crowd_production | documentcloud | SQL_ASCII | C | C |
dcloud_production | documentcloud | SQL_ASCII | C | C |
fantasy_football | fantasy_football | UTF8 | en_US.utf8 | en_US.utf8 |
overview-prod | overview | SQL_ASCII | C | C |
overview-test3 | overview | SQL_ASCII | C | C |
panda | panda | SQL_ASCII | C | C | =T/panda +
| | | | | panda=CTc/panda
postgres | postgres | SQL_ASCII | C | C |
template0 | postgres | SQL_ASCII | C | C | =c/postgres +

Keybase proof

I hereby claim:

  • I am zstumgoren on github.
  • I am zstumgoren (https://keybase.io/zstumgoren) on keybase.
  • I have a public key whose fingerprint is 3F12 C03F DD5F A97C 6558 6D9D B714 2960 143C 8E41

To claim this, I am signing this object:

@zstumgoren
zstumgoren / scraper.py
Created May 5, 2015 23:10
Tweaks to scraper code for Fish
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import urllib2
import csv
import re
# NOTE: using live URL sted of locally cached file
URL = "http://cpms.dfa.state.nm.us/doShowAppropriations.aspx?pid=10-1100"
page = urllib2.urlopen(URL)
html = page.read()
2015-04-06.16:18:04 12304 ssh ARGV=git SOC=info FROM=127.0.0.1
2015-04-06.16:18:04 12304 die unknown git/gitolite command: 'info'
2015-04-06.16:18:04 12334 ssh ARGV=git SOC=info FROM=127.0.0.1
2015-04-06.16:18:04 12334 die unknown git/gitolite command: 'info'
2015-04-06.16:18:04 12407 ssh ARGV=git SOC=info FROM=127.0.0.1
2015-04-06.16:18:04 12407 die unknown git/gitolite command: 'info'
2015-04-06.16:18:04 12432 ssh ARGV=git SOC=info FROM=127.0.0.1
2015-04-06.16:18:04 12432 die unknown git/gitolite command: 'info'
2015-04-06.16:18:04 12457 ssh ARGV=git SOC=info FROM=127.0.0.1
2015-04-06.16:18:04 12457 die unknown git/gitolite command: 'info'
# gitolite start
command="/home/git/bin/gitolite-shell git",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzySpK/jKX7gNSaa9BrXPXkQixDTOexHR6rpzTRjG2aeP2MB0haowKNEEqG0OzxCTPF4pET6fSqH6H502GnGn7/xUh5FgwQnZXe0CmExKbAlZRa3N1T2rKwHfjBmmBn6nr1izBLjMa8n5JGKZgiXx+n7fitQZejtq6UOkIbWg/kLh/YiIDYRXfAvbLmb5XjBkSc2+zLF+zlN4wgkixX9efz7NhFS+sncsWKxD9ph5I5Hk6RL83ohy/CYwg5sUUWoxDim5vr5+o8zAwg+KezL6gk5ktJiuuBzXZWE7kbXCuVSVcyWPjzo7YMsWMfsscfGZ6AY9NFZqRTsZAA8zbRmfqQ== interact@ctcinteract-admin01.ap.org# gitolite end
# ADDING BELOW MANUALLY TO GITOLITE SECTION ABOVE FIXES GIT CLONE/PUSH/PULL ACCESS
#command="/home/git/bin/gitolite-shell git",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArY17Lgg+4ik9me4V/cpOfn+//yXWUMneiS1TOvXEXYL2tiMDNtGO68sG6sbcmzD36O32Gtfk6mwAM2LSk971ZBBIMIpO1J9pNXJiBUmgSVwCiaU8ulQBQDVq0otDE8WkLBlsHbW73m1AXCvwW1fFFk2QTZ1AHjB747Iv94f0qB4ZK7c1mF08ZnWHs6ggsZIKy7FAUjqRGC2hDIKj0K82cipenKpr+fyRkzenTipoBOthXC6Cin
```bash
/home/git/.gitolite/keydir/
|-- git.pub
`-- redmine_git_hosting
`-- redmine_stumgoren_25
`-- redmine_stumgoren
`-- redmine_stumgoren_25.pub
```
redmine/current$ grep -r redcarpet *
Gemfile: # TODO: upgrade to redcarpet 3.x when ruby1.8 support is dropped
Gemfile: gem "redcarpet", "~> 2.3.0"
Gemfile.lock: redcarpet (2.3.0)
Gemfile.lock: redcarpet (~> 2.3.0)
lib/redmine.rb: require 'redcarpet' unless Object.const_defined?(:Redcarpet)
plugins/redmine_git_hosting/Gemfile:gem 'redcarpet', '~> 3.1.2'
plugins/redmine_git_hosting/Gemfile:# gem 'redcarpet', '~> 2.3.0'
plugins/redmine_git_hosting/gemfiles/rails3.gemfile:gem 'redcarpet', '~> 2.3.0'
plugins/redmine_git_hosting/gemfiles/rails4.gemfile:gem 'redcarpet', '~> 3.1.2'
# Made a series of db updates to repositories table so that values would match those of newly created repos
UPDATE `redmine_production`.`repositories` SET `root_url`='repositories/ap-deploy.git', `type`='Repository::Xitolite' WHERE `id`='92';
UPDATE `redmine_production`.`repositories` SET `url`='repositories/ap-deploy.git' WHERE `id`='92';
UPDATE `redmine_production`.`repositories` SET `identifier`='' WHERE `id`='92';
UPDATE `redmine_production`.`repositories` SET `path_encoding`='' WHERE `id`='92';
@zstumgoren
zstumgoren / setup_python_intermediate.sh
Last active February 8, 2017 17:51
Setup script for Python Intermediate class at NICAR 2015 conference
cd ~/Desktop
virtualenv python_intermediate
cd python_intermediate
source bin/activate
mkdir src
cd src
git clone https://github.com/PythonJournos/refactoring101.git
cd refactoring101
# Below flag may be needed depending on the Mac setup (I needed it on mine, due to gcc compilation errors)
# If this fails you can try it with the ARCHFLAGS env setting