Ordered set.
[1, 2] != [2, 1]| """ | |
| Originaly code was taken from http://djangosnippets.org/snippets/290/ | |
| But I was made some improvements like: | |
| - print URL from what queries was | |
| - don't show queries from static URLs (MEDIA_URL and STATIC_URL, also for /favicon.ico). | |
| - If DEBUG is False tell to django to not use this middleware | |
| - Remove guessing of terminal width (This breaks the rendered SQL) | |
| """ | |
| from django.core.exceptions import MiddlewareNotUsed | |
| from django.conf import settings |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| *.pyc |
| #!/usr/bin/env node | |
| // Reads JSON from stdin and writes equivalent | |
| // nicely-formatted JSON to stdout. | |
| var input = ''; | |
| process.stdin.resume(); | |
| process.stdin.setEncoding('utf8'); |
| server { | |
| root /var/www/example.com/static; | |
| server_name example.com; | |
| access_log /var/log/nginx/example.com.access.log; | |
| error_log /var/log/nginx/example.com.error.log; | |
| try_files /maintenance.html @proxy; | |
| location @proxy { | |
| proxy_pass http://127.0.0.1:10001; |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Linq.Expressions; | |
| using System.Collections.ObjectModel; | |
| using System.Reflection; | |
| namespace Destrier | |
| { |
| // You need to have the following installed: | |
| // https://github.com/admc/wd | |
| // https://github.com/kriskowal/q | |
| // https://github.com/holidayextras/node-saucelabs | |
| var wd = require('wd') | |
| , Q = require('q') | |
| , assert = require('assert') | |
| , sauce = require('saucelabs') | |
| , host = "ondemand.saucelabs.com" |
| // You need to have the following installed: | |
| // https://github.com/admc/wd | |
| // https://github.com/kriskowal/q | |
| // https://github.com/holidayextras/node-saucelabs | |
| var wd = require('wd') | |
| , Q = require('q') | |
| , assert = require('assert') | |
| , sauce = require('saucelabs') | |
| , host = "ondemand.saucelabs.com" |
| import mmap | |
| import sys | |
| import struct | |
| def main(in_file, out_file): | |
| with open(in_file, "r+b") as f: | |
| map = mmap.mmap(f.fileno(), 0) | |
| data = map.readline() | |
| # Assuming first char is \x00 and | |
| # data is in blocks of 3. |