Skip to content

Instantly share code, notes, and snippets.

View madewulf's full-sized avatar
🤷‍♂️
Multitasking.

Martin De Wulf madewulf

🤷‍♂️
Multitasking.
View GitHub Profile
@madewulf
madewulf / asshole.js
Created May 30, 2011 08:48 — forked from Kilian/annoying.js
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@madewulf
madewulf / ajaxifying my django
Created February 11, 2011 18:23
Simplest way to do Ajax in Django?
from django.utils import simplejson
....
def problems_of_delivery(request, delivery_id):
delivery = get_object_or_404(Delivery, pk=int(delivery_id))
problem_list =[]
for problem in delivery.problem_set.all():
problem_list.append([problem.type.id , problem.comment ])
res_dict = {"date":datetime.now().strftime("%H:%M")}
res_dict["problems"]=problem_list