Yet another framework syndrome
| Name | Date | URL | Stars |
|---|---|---|---|
| Jake | April 2010 | https://github.com/mde/jake | 866 |
| Brunch | January 2011 | http://brunch.io/ | 3359 |
| .clearfix:after { | |
| content: ""; | |
| display: block; | |
| height: 0; | |
| clear: both; | |
| } | |
| .clearfix { | |
| zoom: 1; | |
| } |
| html { | |
| -webkit-filter: grayscale(100%); | |
| -moz-filter: grayscale(100%); | |
| -ms-filter: grayscale(100%); | |
| -o-filter: grayscale(100%); | |
| filter: grayscale(100%); | |
| filter: gray; | |
| filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | |
| } |
| 单行文本方法, 通过CSS即可解决 | |
| <style> | |
| p{ | |
| width: 100px; | |
| display: block; | |
| text-overflow: ellipsis; | |
| -o-text-overflow: ellipsis; | |
| -icab-text-overflow: ellipsis; | |
| -khtml-text-overflow: ellipsis; |
| def upload_path(instance, old_filename): | |
| extension = os.path.splitext(old_filename)[1].lower() | |
| today = datetime.datetime.today() | |
| timestamp = str(time.time()) | |
| file_path = 'media/{year}{month}/{timestamp}{extension}'.format( | |
| year=today.year, | |
| month=today.month, | |
| timestamp=timestamp, | |
| extension=extension) | |
| return file_path |
| import time | |
| from datetime import datetime, date | |
| # 今天 | |
| datetime.datetime.today().date().isoformat() | |
| # 通过日期对象生成时间戳 | |
| int(time.mktime(datetime.now().timetuple())) | |
| # 通过时间戳生成日期对象,timestamp 的时间戳以秒为单位 |
| import codecs | |
| import os | |
| includes = ['*.php', '*.html', '*.htm'] | |
| for root, dirs, files in os.walk('pay.lvye.cn'): | |
| for filename in files: | |
| filename = os.path.join(root, filename) | |
| with open(filename) as f: | |
| content = f.read() |
| from __future__ import with_statement | |
| from ilogue.fexpect import expect, expecting, run as erun | |
| from fabric.api import settings, local, put, cd, run | |
| import time | |
| import datetime | |
| import random | |
| import logging | |
| GIT_HOST = 'git@localhost' |
| VBoxManage startvm "breadtrip" --type headless | |
| VBoxManage controlvm "breadtrip" poweroff |
| #!/bin/bash | |
| GEOGRAPHY=0 | |
| POSTGIS_SQL=postgis.sql | |
| # For Ubuntu 8.x and 9.x releases. | |
| if [ -d "/usr/share/postgresql-8.3-postgis" ] | |
| then | |
| POSTGIS_SQL_PATH=/usr/share/postgresql-8.3-postgis | |
| POSTGIS_SQL=lwpostgis.sql |
Yet another framework syndrome
| Name | Date | URL | Stars |
|---|---|---|---|
| Jake | April 2010 | https://github.com/mde/jake | 866 |
| Brunch | January 2011 | http://brunch.io/ | 3359 |