## About Me
- 09年底至今,主要工作内容:基于Django的Web开发,从0.96版本到1.7,向Django及相关社区贡献了50+ commits
- 期间涉猎了javascript, golang, clojure等开发语言,对nginx, tornado, nodejs等工具的异步模型有一定了解
- 熟悉Linux下开发,了解部署,但之前未接触过Django的服务部署调优
jQuery.extend({ | |
parseQuerystring: function(){ | |
var nvpair = {}; | |
var qs = window.location.search.replace('?', ''); | |
var pairs = decodeURI(qs).split('&'); | |
$.each(pairs, function(i, v){ | |
var pair = v.split('='); | |
var key = pair[0], value = pair[1]; | |
if(key in nvpair){ | |
if(!$.isArray(nvpair[key])){ nvpair[key] = $.makeArray(nvpair[key]);} |
Goroutine By Example | |
==================== | |
尹吉峰 2013/11/05 | |
Python Thread | |
------------- | |
```python | |
import time | |
import threading |
import collections | |
from django.utils import six | |
from django.core.paginator import PageNotAnInteger, EmptyPage | |
class Paginator(object): | |
def __init__(self, object_list, per_page, orphans=0, | |
allow_empty_first_page=True): |
mysqldump --single-transaction --no-create-info \ | |
--ignore-table zabbix.history \ | |
--ignore-table zabbix.history_str \ | |
--ignore-table zabbix.history_log \ | |
--ignore-table zabbix.history_uint \ | |
--ignore-table zabbix.history_text \ | |
--ignore-table zabbix.trends \ | |
--ignore-table zabbix.trends_uint \ | |
--ignore-table zabbix.auditlog \ | |
--ignore-table zabbix.auditlog_details \ |
KEY=XXXXXXXXXXXX | |
HOST="https://metrics.crisidev.org" | |
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search | jq -r '.[].uri|ltrimstr("db/")'); do | |
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash | jq '.dashboard' > dashboards/$dash.json | |
done |