Skip to content

Instantly share code, notes, and snippets.

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):
[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
sudo vim /etc/environment
LANG="en_US.UTF-8"
LC_MESSAGES="C"
LC_ALL="en_US.UTF-8"
@mattes
mattes / shebang.sublime-snippet
Created April 12, 2014 02:13
/Users/mattes/Library/Application Support/Sublime Text 3/Packages/User/shebang.sublime-snippet
<snippet>
<content><![CDATA[
#!/usr/bin/env ${1:bash}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>#!</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.bash</scope> -->
</snippet>
http://git.io/dYYyLA
http://git.io/qEHakA
http://git.io/Qo-d2g
http://git.io/0dDD2Q
@mattes
mattes / inject_dotfiles.sh
Last active March 26, 2017 20:59
inject minimal set of dotfiles into running docker container (https://github.com/mattes/dotfiles)
current_dir=$(pwd) && \
cd /tmp && \
( curl -L -s -o dotfiles.tar.gz https://github.com/mattes/dotfiles/archive/master.tar.gz > /dev/null 2>&1 || \
wget -O dotfiles.tar.gz https://github.com/mattes/dotfiles/archive/master.tar.gz > /dev/null 2>&1) && \
tar xfz dotfiles.tar.gz && \
cd ./dotfiles-master && \
source docker_dotfiles.sh > /dev/null && \
cd $current_dir && \
unset current_dir && \
rm -rf /tmp/dotfiles-master && \
@mattes
mattes / cloud-config.yaml
Last active November 2, 2016 16:37
CoreOS on Google Compute Engine: push systemd journal logs to logentries.com https://medium.com/coreos-linux-for-massive-server-deployments/defb984185c5
#cloud-config
write_files:
- path: /home/core/journal2logentries.sh
permissions: '0744'
owner: root:root
content: |
#!/usr/bin/env bash
# CoreOS on Google Compute Engine: push systemd journal logs to logentries.com
# get your private token from logentries.com, see https://logentries.com/doc/input-token