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 gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
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
import argparse | |
import re | |
from multiprocessing.pool import ThreadPool as Pool | |
import requests | |
import bs4 | |
root_url = 'http://pyvideo.org' | |
index_url = root_url + '/category/50/pycon-us-2014' | |
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
# list_detail.object_list replacement with all the things I need | |
def object_list(request, queryset, extra_context=None, | |
template_name='', paginate_by=None): | |
class ObjectList(ListView): | |
def post(self, request, *args, **kwargs): | |
return self.get(request, *args, **kwargs) | |
def get_context_data(self, **kwargs): | |
c = super(ObjectList, self).get_context_data(**kwargs) |
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
# Download Sublime Text 2 from http://www.sublimetext.com/2 | |
# If you aren't root, sudo su | |
tar -xvjf Sublime\ Text\ 2*.tar.bz2 | |
mv Sublime\ Text\ 2/ /opt/sublime-text-2/ | |
ln -s /opt/sublime-text-2 /usr/local/sublime-text-2 | |
ln -s /usr/local/sublime-text-2/sublime_text /usr/local/bin/sublime_text | |
rm Sublime\ Text\ 2*.tar.bz2 | |
# Sublime Text 2 can now be run as normal user with command "sublime_text" |
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.forms.util import ErrorList | |
from django import forms | |
class ContractUpdateView(UpdateView): | |
model = Contract | |
template_name = 'contract/contract_form.html' | |
form_class = ContractForm | |
def form_valid(self, form): | |
if self.request.POST.get('finish'): |
- Quieres un trabajo con el que te puedas divertir mientras aprendes lo suficiente para irte de Venezuela con buenas oportunidades en el exterior.
- Te encanta programar
- En serio, es indispensable que te apasione programar.
- Programas hasta en tu tiempo libre como un pasatiempo.
- Te sientes cómodo en whatever shell de Linux.
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
# coding: utf-8 | |
from datetime import datetime | |
from datetime import timedelta | |
def calc_diff(delta): | |
delta = abs( delta ) | |
return { | |
'year' : int(delta.days / 365), | |
'month' : int(delta.days % 365) / 30, | |
'day' : int(delta.days % 365) % 30, |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder