Skip to content

Instantly share code, notes, and snippets.

View akoumjian's full-sized avatar

Alec Koumjian akoumjian

View GitHub Profile
@akoumjian
akoumjian / test_dateparser_tzstring_conversions.py
Created February 9, 2016 04:52 — forked from ranchodeluxe/test_dateparser_tzstring_conversions.py
An interesting note about how dateparser parses date strings with tzinfo in them; then some expected interpretations of date strings with tzinfo
import re
import pytz
from datetime import datetime
import dateparser
import pytest
def expected_tz_conversion(datetime_obj, pytz_tzinfo_offset):
# keep the day and time, just give it tzinfo
return pytz_tzinfo_offset.localize(datetime_obj)
#!/bin/bash
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
# Install git to get statsd
sudo apt-get install git
@akoumjian
akoumjian / example.gemspec
Created November 29, 2012 01:32 — forked from msievers/example.gemspec
Gemspec which includes files from git submodules into resulting gem
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/example/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["John Doe"]
gem.email = ["john_doe@example.org"]
gem.description = %q{Write a gem description}
gem.summary = %q{Write a gem summary}
gem.homepage = ""
@akoumjian
akoumjian / state
Created September 3, 2012 22:01 — forked from blturner/state
----------
State: - rvm
Name: sassgemset
Function: gemset_present
Result: False
Comment: An exception occured in this state: Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/salt/state.py", line 823, in call
ret = self.states[cdata['full']](*cdata['args'])
File "/usr/lib/pymodules/python2.7/salt/states/rvm.py", line 221, in gemset_present
if name in __salt__['rvm.gemset_list'](ruby, runas=runas):
@akoumjian
akoumjian / gist:3156940
Created July 21, 2012 19:45 — forked from baijum/gist:3025019
Salt Development Environment
## Get OS/build dependancies
$ sudo apt-get install python2.7-dev build-essential libtool autoconf automake swig uuid-dev python-m2crypto python-setuptools
## Download 0MQ
$ wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
## Unpack
$ tar -xvzf zeromq-2.2.0.tar.gz
## CD into dir
@akoumjian
akoumjian / gist:3024723
Created June 30, 2012 17:25
Salt Development Environment
## Get OS/build dependancies
$ sudo apt-get install python2.7-dev build-essential libtool autoconf automake swig uuid-dev python-m2crypto python-setuptools
## Download 0MQ
$ wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
## Unpack
$ tar -xvzf zeromq-2.2.0.tar.gz
## CD into dir
@akoumjian
akoumjian / Install_nginx_from_src_with_module.sh
Created February 23, 2012 16:51 — forked from zefer/Install_nginx_from_src_with_module.sh
Compile nginx from source, include the Headers More module - Ubuntu
sudo su -
# stuff we need to build from source
apt-get install libpcre3-dev build-essential libssl-dev
# get the nginx source
cd /opt/
wget http://nginx.org/download/nginx-0.8.54.tar.gz
tar -zxvf nginx*
# we'll put the source for nginx modules in here