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 one_session_per_user.models import User, Visitor | |
from django.contrib.sessions.models import Session | |
class OneSessionPerUserMiddleware(object): | |
"""http://stackoverflow.com/a/1814797""" | |
def process_request(self, request): | |
if isinstance(request.user, User): | |
current_key = request.session.session_key |
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 os | |
from django.db import models | |
class SimpleSerializer(object): | |
Model = None | |
exclude = () | |
ingored_fields = ( | |
models.AutoField, | |
models.ForeignKey, |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} }, | |
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} }, | |
{ "keys": ["ctrl+q"], "command": "close" }, | |
{ "keys": ["ctrl+w"], "command": "find_under_expand" }, | |
{ "keys": ["ctrl+r"], "command": "wrap" }, | |
{ "keys": ["ctrl+alt+n"], "command": "prompt_insert_nums" } | |
] |
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
$('button span.unfollow-text').parent().each(function(i, a) {a.click();}) |
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
#!/usr/bin/python | |
#-*- coding: utf-8 -*- | |
import os | |
import re | |
import sys | |
import shutil | |
import subprocess | |
re_ticket = re.compile(ur'(?u)^([0-9]+)-.+') |
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
#!/bin/bash | |
# Replace this with actual server address | |
serverUrl="10.1.136.242:80" | |
if [ -e "/etc/init.d/teamcity" ] | |
then | |
echo "TeamCity allready installed" | |
exit 0 | |
fi |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
int create_huge_linked_list(void **last_item) { | |
int i; | |
void *prev_item = NULL; | |
for(i = sizeof(void *); i < 1000000; i++) { |
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
[merge] | |
tool = meld | |
[mergetool "meld"] | |
prompt = false | |
keepBackup = false | |
keepTemporaries = false | |
path = C:/Meld/meld/meld.exe | |
cmd = "/c/Meld/meld/meld.exe $PWD/$LOCAL $PWD/$BASE $PWD/$REMOTE --output=$PWD/$MERGED" |
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
#!/usr/bin/env python | |
# regression test for https://bitbucket.org/zzzeek/sqlalchemy/issue/2682/is_-and-isnot-in-conjunction-with-boolean | |
from sqlalchemy import create_engine, Column, Integer, Boolean | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
engine = create_engine('mysql://user:password@localhost/mre') |
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
Steps to reproduce: | |
1. apply async chain of groups of tasks; | |
2. raise retry inside task(s) of first group; | |
3. watch, how tasks of second group are finished before those in first group. | |
Particularly in attached logs all 'add' tasks should finish before starting of 'mul' tasks. | |
But as retry occurs, order does not hold anymore. | |
The actual order was: |
OlderNewer