This file contains 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Django", | |
"type": "python", | |
"request": "launch", | |
"stopOnEntry": false, | |
"pythonPath": "${workspaceRoot}/venv/bin/python3.4", | |
"program": "${workspaceRoot}/manage.py", |
This file contains 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 | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
This file contains 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
|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█|█ | |
|█|S|*|*|*|*|*|*|*|*|█|*|*|*|*|*|*|*|*|*|*|*|_|_|_|_|█|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|█|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|_|_|_|_|_|_|_|_|_|_|█|*|*|*|*|*|*|*|*|*|*|*|*|*|_|_|_|_|_|_|█ | |
|█|*|█|█|█|█|█|█|█|*|█|*|█|█|█|█|█|*|█|█|█|*|█|█|█|█|█|█|█|*|█|█|█|█|█|*|█|█|█|█|█|*|█|█|█|*|█|█|█|*|█|█|█|*|█|█|█|█|█|█|█|*|█|█|█|*|█|█|█|*|█|█|█|_|█|█|█|█|█|█|█|*|█|█|█|*|█|█|█|█|█|█|█|*|█|_|█|█|█|_|█ | |
|█|*|█|*|*|*|*|*|█|*|*|*|█|*|*|*|*|*|_|_|█|*|*|*|*|*|_|_|█|*|█|*|*|*|*|*|█|_|_|_|█|*|█|*|*|*|█|_|█|*|*|*|█|*|*|*|*|*|*|*|█|*|█|*|*|*|█|*|█|*|*|*|*|*|█|*|*|*|*|*|*|*|█|*|*|*|█|*|*|*|*|*|█|*|█|_|█|_|█|_|█ | |
|█|*|█|█|█|█|█|*|█|█|█|█|█|*|█|█|█|█|█|█|█|*|█|█|█|*|█|█|█|*|█|█|█|*|█|█|█|_|█|█|█|*|█|*|█|█|█|_|█|█|█|*|█|█|█|*|█|█|█|*|█|█|█|*|█|█|█|*|█|*|█|█|█|*|█|█|█|*|█|█|█|*|█|*|█|█|█|*|█|█|█|█|█|*|█|_|█|_|█|_|█ | |
|█|*|_|_| |
This file contains 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
# https://devcenter.heroku.com/articles/heroku-postgres-import-export | |
# dump local | |
pg_dump -Fc --no-acl --no-owner -h localhost <db_name> > ~/Desktop/db.dump | |
# Restore: | |
heroku pg:backups restore 'https://www.dropbox.com/<db_url>?dl=1' DATABASE_URL -a appname |
This file contains 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
heroku pg:reset SHARED_DATABASE --confirm appname | |
heroku run appname/manage.py migrate | |
heroku run appname/manage.py createsuperuser | |
This file contains 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
<?php | |
/* | |
Plugin Name: PinThis | |
Plugin URI: http://scienceofweb.com | |
Description: This plugin will add a "Pin" button link to each | |
post on your WordPress site. | |
Author: Jim Munro | |
Version: 0.1 | |
Author URI: http://scienceofweb.com | |
*/ |
This file contains 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
# Orignal version taken from http://www.djangosnippets.org/snippets/186/ | |
# Original author: udfalkso | |
# Modified by: Shwagroo Team and Gun.io | |
import sys | |
import os | |
import re | |
import hotshot, hotshot.stats | |
import tempfile | |
import StringIO |
This file contains 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
# https://djangosnippets.org/snippets/154/ | |
# required for the django-google-contacts | |
# install as a site-package for use | |
# updated to use json module | |
from django.core.serializers import json, serialize | |
from django.db.models.query import QuerySet | |
from django.http import HttpResponse | |
import json |
This file contains 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
# https://github.com/un33k/django-tastypie/blob/master/tastypie/compat.py | |
# handles loading new user models avoid the Apps have not been registered error. | |
from __future__ import unicode_literals | |
from django.conf import settings | |
from django.core.exceptions import ImproperlyConfigured | |
import django | |
from django.utils.functional import lazy | |
__all__ = ['User', 'AUTH_USER_MODEL'] |
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
""" | |
fabfile for Django | |
------------------ | |
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/ | |
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle) | |
several additions, corrections and customizations, too |
NewerOlder