Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Grebs EnTeQuAk

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am entequak on github.
  • I am entequak (https://keybase.io/entequak) on keybase.
  • I have a public key whose fingerprint is 714B 8C41 618A 79CD 8020 AB3A C710 0D1C C06B CF6C

To claim this, I am signing this object:

View gist:820186
diff --git a/djcelery/schedulers.py b/djcelery/schedulers.py
index cf17f3b..eaa5525 100644
--- a/djcelery/schedulers.py
+++ b/djcelery/schedulers.py
@@ -51,6 +51,13 @@ class ModelEntry(ScheduleEntry):
self.model.no_changes = True
return self.__class__(self.model)
+ def is_due(self):
+ """See :meth:`celery.task.base.PeriodicTask.is_due`."""
View gist:1145266
curl -XPOST 'http://127.0.0.1:9200/forum/post/_search' -d '{"query": {"filtered": {"filter": {"script": {"params": {"forums": [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]}, "script": "forums contains doc[\"forum_pk\"].value"}}, "query": {"query_string": {"query": "forum_pk:2", "default_operator": "AND"}}}}, "explain": true}'
@EnTeQuAk
EnTeQuAk / gist:1162553
Created Aug 22, 2011
Redesign Checklist
View gist:1162553
[ ] Convert Twitter-Bootstrap to SCSS
[ ] Activate HTML5 Doctype
[ ] Remove Custom DTD-File, check that everything works
[ ] Create a preview page to give an overview about what is done and what must be done (http://twitter.github.com/bootstrap/ as an example)
[ ] Create new SCSS-Namespace, move old files and start hacking till the preview page looks fine
[ ] Check all other pages (Create automatic Link)
@EnTeQuAk
EnTeQuAk / gist:1164566
Created Aug 23, 2011 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
View gist:1164566
Day job: Python Data Processing Developer
Favorite Python project: Flask
Favorite Conference: DjangoCon for now...
Python Experience Level: About 6 years
View gist:1224989
{
"query": {
"filtered": {
"filter": {
"or": [
{
"and": [
{
"type": {
"value": "article"
View feed.sql
select * from (
select distinct on (id) * from (
select core_feeditem.id, COALESCE(recipes_recipe_translation.republished_at, recipes_recipe_translation.published_at) as "ordering"
from core_feeditem
join recipes_recipe on core_feeditem.id = recipes_recipe.feeditem_ptr_id
join recipes_recipe_translation
on recipes_recipe.feeditem_ptr_id = recipes_recipe_translation.master_id
join unnest(array['de','en']) with ordinality as u(lang,priority) on recipes_recipe_translation.language_code=u.lang
union all
View foo.py
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
@EnTeQuAk
EnTeQuAk / 0_reuse_code.js
Created Nov 28, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console