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
# This is an implementation using python-oembed with api.embed.ly | |
# python-oembed http://code.google.com/p/python-oembed/ | |
import oembed | |
# Embed.ly Multi Provider API Endpoint | |
OEMBED_ENDPOINT = 'http://api.embed.ly/oembed/api/v1' | |
# URL Schemes Supported --- complete list maintained | |
# http://api.embed.ly/static/data/embedly_regex.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
# -*- encoding:utf-8 -*- | |
# notify.py | |
# a simple wrapper to notify a user | |
import subprocess, os | |
user = 'guest' | |
# I named the computers after south park characters :D | |
clients = ['cartman', 'kyle', 'stan', 'kenny'] | |
title = raw_input("title?\n") | |
text = raw_input("text?\n") | |
# Image comes with default ubuntu 10.10 installs. |
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
/* | |
* This work is licensed under the Creative Commons Attribution-NonCommercial | |
* 3.0 Unported License. To view a copy of this license, visit | |
* http://creativecommons.org/licenses/by-nc/3.0/ or send a letter to Creative | |
* Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
*/ | |
var interval = 10; | |
var layer1Sloppiness = [1, 2]; | |
var layer2Sloppiness = [1, 2]; |
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
# the admin views | |
from django.contrib import admin | |
from django.contrib.auth.admin import UserAdmin | |
from verbena.models import Student, Faculty, NewsRelease, Location, Project,\ | |
VolunteerOpportunity, Organization, Workshop, ActionGroup, Grant | |
class StudentAdmin(UserAdmin): | |
list_display = ('studying','comp_year',) |
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
faris@cortex:~/workspace/src$ git clone https://github.com/joyent/node.git | |
Initialized empty Git repository in /home/faris/workspace/src/node/.git/ | |
remote: Counting objects: 36420, done. | |
remote: Compressing objects: 100% (9171/9171), done. | |
remote: Total 36420 (delta 29036), reused 33711 (delta 26768) | |
Receiving objects: 100% (36420/36420), 21.35 MiB | 2.00 MiB/s, done. | |
Resolving deltas: 100% (29036/29036), done. | |
faris@cortex:~/workspace/src$ cd node | |
faris@cortex:~/workspace/src/node$ ./configure --prefix=~/.node | |
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory |
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
from satchless.forms.widgets import DecimalInput | |
from satchless.product.forms import BaseVariantForm | |
from . import models | |
class ProductPriceForm(forms.ModelForm): | |
class Meta: | |
widgets = { | |
'price': DecimalInput(min_decimal_places=2), | |
} |
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
from django import forms | |
from satchless.forms.widgets import DecimalInput | |
from satchless.product.forms import BaseVariantForm | |
from . import models | |
class ProductPriceForm(forms.ModelForm): | |
class Meta: | |
widgets = { | |
'price': DecimalInput(min_decimal_places=2), |
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
# models.py | |
from django.db import models | |
from django.db.utils import IntegrityError | |
from tinymce.models import HTMLField | |
import datetime | |
from django.contrib.auth.models import User, UserManager, Permission | |
import re | |
from django.utils.translation import ugettext as _ |
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
from memdir.models import Member | |
import datetime | |
from pprint import pprint | |
class Command(BaseCommand): | |
args = '<None>' | |
help = """Finds all the Members in the database with an expired entry and | |
tags them as expired. This command should be run right before the | |
send_notices command. | |
""" |
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
ls -l /sys/block/md0/holders /sys/block/md0/*/holders | |
/sys/block/md0/holders: | |
total 0 | |
/sys/block/md0/md0p1/holders: | |
total 0 | |
lrwxrwxrwx 1 root root 0 2011-10-21 15:51 dm-1 -> ../../../dm-1 | |
/dev/mapper/vhost-hostvol on / type ext4 (rw,errors=remount-ro) |
OlderNewer