This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Configuring Postfix to Work With Gmail on Mac OS X | |
#### Based on: http://blog.y3xz.com/blog/2012/01/11/configuring-postfix-to-work-with-gmail-on-mac-os-x/ | |
# add gmail auth details to relay_password file | |
sudo echo "smtp.gmail.com:587 [email protected]:your_password" >> /etc/postfix/relay_password | |
# generate lookup db | |
sudo postmap /etc/postfix/relay_password | |
# add relay config |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"": { | |
"status": "ZERO_RESULTS", | |
"results": [] | |
}, | |
"גילת": { | |
"status": "OK", | |
"results": [ | |
{ | |
"geometry": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### User Settings (things you must set) | |
## Location of the dnscurl.pl script | |
DNSCurl="/path/to/route53DynDNS/dnscurl.pl" | |
## The host name you wish to update/create | |
myHostName="*" | |
## Zone/domain in which host (will) reside(s) | |
myDomainName="example.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ConnectionHandler(SockJSConnection): | |
def __init__(self, *args, **kwargs): | |
super(ConnectionHandler, self).__init__(*args, **kwargs) | |
self.client = brukva.Client() | |
self.client.connect() | |
self.client.subscribe('some_channel') | |
def on_open(self, info): | |
self.client.listen(self.on_chan_message) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################## | |
# Sample client-side OpenVPN 2.0 config file # | |
# for connecting to multi-client server. # | |
# # | |
# This configuration can be used by multiple # | |
# clients, however each client should have # | |
# its own cert and key files. # | |
# # | |
# On Windows, you might want to rename this # | |
# file so it has a .ovpn extension # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bottle import app, route | |
@route('/') | |
def index(): | |
return 'Oh Hai!' | |
application = app() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title></title> | |
<style> | |
body { | |
background: white; | |
text-align: center; | |
padding: 20px; | |
font-family: Georgia, serif; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
from functools import update_wrapper, wraps | |
except ImportError: | |
from django.utils.functional import update_wrapper, wraps # Python 2.4 fallback. | |
from django.http import HttpResponseForbidden | |
from django.utils.decorators import available_attrs | |
def user_passes_test(test_func): | |
def decorator(view_func): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matrix = [(0,1,2), (0,1,2), (0,1,2)] | |
transposed = zip(*matrix) # pythonic transpose! | |
print transposed | |
# >>> [(0, 0, 0), (1, 1, 1), (2, 2, 2)] |