Skip to content

Instantly share code, notes, and snippets.

# install via MacPorts
sudo port install openssl
sudo env ARCHFLAGS="-arch x86_64" LDFLAGS="-L/opt/local/lib" CFLAGS="-I/opt/local/include" pip install cryptography
# install via Homebrew
brew install openssl
env ARCHFLAGS="-arch x86_64" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" pip install cryptography
Function Shortcut
previous tab ⌘ + left arrow
next tab ⌘ + right arrow
go to tab ⌘ + number
go to window ⌘ + Option + Number
go to split pane by direction ⌘ + Option + arrow
go to split pane by order of use ⌘ + ] , ⌘ + [
split window horizontally (same profile) ⌘ + D
split window vertically (same profile) ⌘ + d
#!/usr/bin/env python
# http://www.rabbitmq.com/tutorials/tutorial-two-python.html
import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
message = ' '.join(sys.argv[1:]) or "Hello World!"

Requirements

  • bootstrap with typeahead
  • jquery

Explanation

This will use bootstrap with typeahead to create an autocomplete search.

@amferraz
amferraz / gist:5143268
Last active December 14, 2015 20:19 — forked from anonymous/gist:5142892
from scrapy.utils.project import get_project_settings
def stop_reactor():
reactor.stop() #Stops reactor to prevent script from hanging
if __name__ == '__main__':
#Handles engine_stopped to stop twisted reactor
dispatcher.connect(stop_reactor, signal=signals.engine_stopped)