Skip to content

Instantly share code, notes, and snippets.

View mikeywaites's full-sized avatar

Mike Waites mikeywaites

View GitHub Profile
def get_archives(self):
""" get all post objects grouped by year/month """
archives = {}
posts = self.active(Post.ACTIVE).published().order_by('-publish_date')
for p in posts:
year = p.publish_date.year
month = p.publish_date.month
try:
#api_tests.py
def test_can_add_multiple_new_projects(self):
""" tests that a user can add multiple new objects at once using the
patch method
"""
data = {'objects':[
{'name': 'this is a test patch project 1'},
{'name': 'this is a test pacth project 2'}
]}
class ProjectResource(BaseResource):
class Meta:
model = Project
serializer = DjangoJSONEncoder
limit = 10
fields = ['id', 'name', 'created', 'updated']
class mike_vim {
exec { "git-vim":
path => "/usr/bin:/bin:/usr/local/bin:$PATH",
cwd => "/home/vagrant",
command => "git clone git@github.com:mikeywaites/Vim-Setup.git .vim",
creates => "/home/vagrant/.vim"
}
}
err: /Stage[main]/Mike_vim/Exec[git-vim]/returns: change from notrun to 0 failed: git clone git@github.com:mikeywaites/Vim-Setup.git returned 128 instead of one of [0] at /home/vagrant/modules/dev/mike_vim/manifests/init.pp:6
#set TERM to screen-256color for tmux 256 color support in vim
if [ I AM SCREEN ]; then
export TERM=screen-256color
alias tmux="tmux -2"
else
export TERM=xterm-256color
fi
var Form = function(){
var post_items = {};
is_valid = function(){
};
};
var MyForm = Form.create({
username: {type: String, length: 35};
});
var matchField = Class.create({
defaultMessage: '',
validate: function(val){
return true;
}
[ 2.646]
X.Org X Server 1.11.3
Release Date: 2011-12-16
[ 2.646] X Protocol Version 11, Revision 0
[ 2.646] Build Operating System: Linux 2.6.42-26-generic x86_64 Ubuntu
[ 2.646] Current Operating System: Linux mikewaites 3.2.0-27-generic #43-Ubuntu SMP Fri Jul 6 14:25:57 UTC 2012 x86_64
[ 2.646] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-27-generic root=UUID=a37b3a98-a6c4-44da-a26b-74d8c95e3c9c ro quiet splash vt.handoff=7
[ 2.646] Build Date: 16 July 2012 08:06:31PM
[ 2.646] xorg-server 2:1.11.4-0ubuntu10.6 (For technical support please see http://www.ubuntu.com/support)
[ 2.646] Current version of pixman: 0.24.4
[ 2.562]
X.Org X Server 1.11.3
Release Date: 2011-12-16
[ 2.562] X Protocol Version 11, Revision 0
[ 2.562] Build Operating System: Linux 2.6.42-26-generic x86_64 Ubuntu
[ 2.562] Current Operating System: Linux mikewaites 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64
[ 2.562] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.2.0-29-generic root=UUID=a37b3a98-a6c4-44da-a26b-74d8c95e3c9c ro quiet splash vt.handoff=7
[ 2.562] Build Date: 16 July 2012 08:06:31PM
[ 2.562] xorg-server 2:1.11.4-0ubuntu10.6 (For technical support please see http://www.ubuntu.com/support)
[ 2.562] Current version of pixman: 0.24.4
<script id="metamorph-0-end" type="text/x-placeholder"></script>