Skip to content

Instantly share code, notes, and snippets.

Matthias Kadenbach mattes

Block or report user

Report or block mattes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View date_ranges.py
from datetime import datetime, timedelta
def parse_date_ranges(dates):
if(not dates or not len(dates) > 0):
return False
# make sure to order dates
dates.sort()
# init values
View piecemaker_postgres_setup.sh
brew install postgres
postgres -D /usr/local/var/postgres
createdb piecemaker2_prod
createdb piecemaker2_dev
createdb piecemaker2_test
@mattes
mattes / docker_inspect_result
Last active Aug 29, 2015
docker inspect result example
View docker_inspect_result
docker run -t -i -d ubuntu echo "test"
d0f637bfc0350729b07d6a6cd4f03140f6a0951924be86eda28f0fa9954dea23
docker inspect d0f637bfc0350729b07d6a6cd4f03140f6a0951924be86eda28f0fa9954dea23
[{
"ID": "d0f637bfc0350729b07d6a6cd4f03140f6a0951924be86eda28f0fa9954dea23",
"Created": "2014-03-05T21:11:35.763549293Z",
"Path": "echo",
"Args": [
"test"
View example_spider.py
from scrapy.spider import Spider
from scrapy.selector import Selector
from scrapy.http import Request
from datetime import datetime
from scrapy import log
from project1.items import PageItem
# from scrapy.stats import stats
class ExampleSpider(Spider):
View gist:10493590
sudo vim /etc/environment
LANG="en_US.UTF-8"
LC_MESSAGES="C"
LC_ALL="en_US.UTF-8"
View torproject.repo
[tor]
name=Tor experimental repo
enabled=1
baseurl=http://deb.torproject.org/torproject.org/rpm/el/6/$basearch/
gpgcheck=1
gpgkey=http://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc
[tor-source]
name=Tor experimental source repo
enabled=1
You can’t perform that action at this time.