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
$('.fs-about').click(function(event) { | |
var aboutRect, eleRect; | |
event.preventDefault(); | |
eleRect = this.getBoundingClientRect(); | |
aboutRect = { | |
top: eleRect.bottom, | |
left: eleRect.right - $('#about').outerWidth() | |
}; | |
$(this).addClass('selected'); | |
$('#about').show().offset({ |
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 MyClassWrapper(object): | |
def __init__(self, f, myarg): | |
self.myarg = myarg | |
self.args = '' | |
self.kwargs = '' | |
self.func = f | |
def __call__(self, *args, **kwargs): | |
self.args = args |
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
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
(if you aren't using version 9.1.5, change line 6 with the correct version) | |
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
3. brew update | |
4. brew upgrade postgresql | |
5. initdb /usr/local/var/postgres -E utf8 | |
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
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
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |
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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
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 django.forms import ModelForm | |
from django.forms.models import inlineformset_factory | |
from models import Sponsor, Sponsorship | |
class SponsorForm(ModelForm): | |
class Meta: | |
model = Sponsor |
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 django.shortcuts import get_object_or_404 | |
from django.contrib.syndication.views import Feed | |
from django.utils.feedgenerator import Rss201rev2Feed | |
from myproject.myapp.models import Model, Broadcast, \ | |
BroadcastSocialAccountStatus | |
OFFICIAL_URL = "http://mainwebsite.com/" | |
OFFICIAL_LOGO_URL = 'https://s3.amazonaws.com/bucketname/logo.png' |
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
{ | |
"id": "340838642686446_353798958057081", | |
"from": { | |
"id": "340838642686446", | |
"category": "Community", | |
"name": "Test Page" | |
}, | |
"message": "test share", | |
"story": "Test Page shared a photo.", | |
"picture": "https://fbcdn-photos-b-a.akamaihd.net/hphotos-ak-ash3/1016045_352899518147025_1275698688_s.jpg", |
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
{ | |
"data": [ | |
{ | |
"id": "340838642686446_353835951386715", | |
"from": { | |
"id": "340838642686446", | |
"category": "Community", | |
"name": "Test Page" | |
}, | |
"story": "Test Page shared a status update.", |
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
diff --git a/twython/twython.py b/twython/twython.py | |
index 49c2f65..ce6931f 100644 | |
--- a/twython/twython.py | |
+++ b/twython/twython.py | |
@@ -14,7 +14,7 @@ import re | |
import warnings | |
import requests | |
-from requests.auth import OAuth1 | |
+from requests_oauthlib import OAuth1 |