-
Install rEFIt: http://refit.sourceforge.net/doc/c1s1_install.html
-
Create a new FAT/DOS partition for the linux install (dual boot setup)
-
Download the linux ISO, in this case: http://www.ubuntu.com/download/
-
Convert the iso to a bootable img format:
cd ~/Downloads hdiutil convert -format UDRW -o ubuntu-13.10-desktop-amd64.img ubuntu-13.10-desktop-amd64.iso
-
Partition your USB stick as 'Free space' using Disk Uility
-
Find the name of your USB 'disk' with diskutil:
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
<?php | |
//...snip... | |
/** | |
* Update MoneyBird Contact | |
* | |
* Update and existing contact using the MoneyBird API | |
* | |
* @access private | |
* @return contact |
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
manilla:Formula tijs$ brew install cmake | |
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.2.tar.gz | |
File already downloaded and cached to /Users/tijs/Library/Caches/Homebrew | |
==> Downloading patches | |
######################################################################## 100,0% | |
######################################################################## 100,0% | |
==> Patching | |
patching file Source/cmXCodeObject.cxx | |
patching file Source/cmGlobalXCodeGenerator.cxx | |
Hunk #1 succeeded at 2742 (offset 16 lines). |
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
Exception happened during processing of request from ('127.0.0.1', 49776) | |
Traceback (most recent call last): | |
File "/usr/local/Cellar/python/2.7.1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock | |
self.process_request(request, client_address) | |
File "/usr/local/Cellar/python/2.7.1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request | |
self.finish_request(request, client_address) | |
File "/usr/local/Cellar/python/2.7.1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request | |
self.RequestHandlerClass(request, client_address, self) | |
File "/usr/local/Cellar/python/2.7.1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 570, in __init__ | |
BaseHTTPRequestHandler.__init__(self, *args, **kwargs) |
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
# models.py | |
class Subscriber(models.Model): | |
country = CountryField() | |
first_name = models.CharField(max_length=100, blank=True, null=True) | |
surname = models.CharField(max_length=100, blank=True, null=True) | |
email = models.EmailField() | |
brands = models.ManyToManyField("Brand") | |
#forms.py | |
from django import forms |
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
# The key associated to your site. | |
key: <edited out> | |
# Version control system used locally for your project. | |
vcs: git | |
# Framework to use on Gondor. | |
framework: django | |
# This path is relative to your project root (the directory gondor.yml lives in.) |
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 __future__ import unicode_literals | |
from django.contrib.auth import get_user_model | |
from django.contrib.auth.backends import ModelBackend | |
class CustomModelBackend(ModelBackend): | |
""" | |
Subclass the default ModelBackend | |
""" |
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
; =========================================== | |
; celery beat supervisor example for Django | |
; =========================================== | |
[program:celerybeat] | |
# note: the -s command to set a scheduler is not here since we set it in the settings.py | |
command = /home/deploy/{ project }/{ app }/venv/bin/python /home/deploy/{ project }/{ app }/{ app root }/manage.py celery beat --loglevel=INFO --settings={ app settings } | |
# the directory to be in while running this (the directory containing manage.py) | |
directory = /home/deploy/{ project }/{ app }/{ app root } |
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
# the name of this service as far as supervisor is concerned | |
[program:celeryd] | |
# the command to start celery | |
command = /home/deploy/{ project }/{ app }/venv/bin/python /home/deploy/{ project }/{ app }/{ app root }/manage.py celery worker --autoscale=4,2 --loglevel=INFO --settings={ app settings } | |
# the directory to be in while running this | |
directory = /home/deploy/{ project }/{ app }/{ app root } | |
# the user to run this service as |
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 LoginForm(AuthenticationForm): | |
""" Subclass the default AuthenticationForm and overwrite the username widget attributes """ | |
def __init__(self, *args, **kwargs): | |
super(LoginForm, self).__init__(*args, **kwargs) | |
self.fields['username'].widget.attrs.update({'autocapitalize':'off', 'autocorrect': 'off'}) |
OlderNewer