Skip to content

Instantly share code, notes, and snippets.

View kennethlove's full-sized avatar
🦀
Python

Kenneth Love kennethlove

🦀
Python
View GitHub Profile
{
"bright_folder_labels": true,
"caret_style": "wide",
"close_windows_when_empty": false,
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme",
"create_window_at_startup": false,
"drag_text": false,
"draw_minimap_border": true,
"draw_white_space": true,
"ensure_newline_at_eof_on_save": true,
# ~/.tmuxinator/apts247.yml
# you can make as many tabs as you wish...
project_name: Apts247
project_root: /Sites/apts247/247
tabs:
# - editor: workon 247 && vim
- shell: workon apts247
# - docs: cd /Sites/apts247docs/ && workon 247
- servers:
@kennethlove
kennethlove / gist:3702669
Created September 11, 2012 22:36
Sublime Settings
{
"bright_folder_labels": true,
"caret_style": "wide",
"close_windows_when_empty": false,
"create_window_at_startup": false,
"drag_text": false,
"draw_minimap_border": true,
"draw_white_space": true,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": true,
from django.contrib.auth.models import User
from django.db import models
class UserGroup(models.Model):
name = models.CharField()
slug = models.SlugField()
owner = models.ForeignKey(User, related_name="groups")
members = models.ManyToManyField(User, through="Membership", related_name="groups")
class Membership(models.Model):
@kennethlove
kennethlove / Description.md
Created October 12, 2012 23:47
GSWD Chef needs
  • Install build-essentials, git-core, vim, mercurial
  • Install postgresql-server
  • Edit /etc/postgresql/9.1/main/postegresql.conf
    • Change listen_address to = '*'
  • Edit /etc/postgresql/9.1/main/pg_hba.conf
    • Add new line host all all 10.0.0.0/16 md5
  • Add new postgresql superuser named "vagrant" with password "vagrant"
    • sudo su postgres
    • createuser -s -W vagrant
  • Add postgresql to defaults so it runs at boot
class Book(models.Model):
title = models.CharField(max_length=255)
author = models.CharField(max_length=255) # you probably want this to be an FK to another model
class BookList(models.Model):
title = models.CharField(max_length=255)
user = models.ForeignKey(User, related_name="booklists") # imported from django.contrib.auth.models
books = models.ManyToMany(Book, related_name="lists")
DJANGO_APPS = (
"django.contrib.auth",
...
)
THIRD_PARTY_APPS = (
"south",
...
)
LOCAL_APPS = (
"bookapp",
/usr/local/Cellar/ruby/1.9.3-p125/bin/ruby extconf.rb
extconf.rb:6: Use RbConfig instead of obsolete and deprecated Config.
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... yes
creating extconf.h
creating Makefile
make
Configuring libffi
cd /usr/local/lib/ruby/gems/1.9.1/gems/ffi-0.6.3/ext/ffi_c/libffi && make
[default] Attempting graceful shutdown of VM...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
/ project_dir/
|
+- django/
|
+- assets/
+-- js /
+-- css /