chflags hidden ~/path
This file contains hidden or 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 pyramid_chameleon_genshi import renderer_factory | |
config.add_renderer(".html", renderer_factory) |
This file contains hidden or 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
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> | |
<script type="text/javascript"> | |
if (typeof jQuery == 'undefined') | |
{ | |
document.write(unescape("%3Cscript src='/path/to/your/jquery' type='text/javascript'%3E%3C/script%3E")); | |
} | |
</script> |
This file contains hidden or 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 random | |
>>> ''.join(random.sample('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 4)) | |
'eKq1' | |
>>> # 62!/(62-4)! = 13 388 280 | |
>>> # (62 !) / ((62 - 3) !) = 226 920 | |
>>> # (62 !) / ((62 - 4) !) = 13 388 280 | |
>>> def factorial(n): | |
... return reduce(lambda x,y: x*y, range(1,n+1)) | |
... | |
... |
This file contains hidden or 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
# coding: UTF-8 | |
# | |
# Yupoo 照片备份工具 | |
# 此工具不需要API,直接就能备份你的照片信息,下载后以图片 + 一个文本文件的方式存放 | |
# 备份包括内容: | |
# 原图,标题,说明,Tag,当然有 Exif 信息 | |
# | |
# Jason Lee <[email protected]> | |
# http://huacnlee.com | |
# 2011-01-28 |
This file contains hidden or 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 fabric.api import * | |
""" | |
Base configuration | |
""" | |
env.project_name = '$(project)' | |
env.database_password = '$(db_password)' | |
env.site_media_prefix = "site_media" | |
env.admin_media_prefix = "admin_media" | |
env.newsapps_media_prefix = "na_media" |
This file contains hidden or 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
deb http://mirrors.163.com/ubuntu/ natty main universe restricted multiverse | |
deb-src http://mirrors.163.com/ubuntu/ natty main universe restricted multiverse | |
deb http://mirrors.163.com/ubuntu/ natty-security universe main multiverse restricted | |
deb-src http://mirrors.163.com/ubuntu/ natty-security universe main multiverse restricted | |
deb http://mirrors.163.com/ubuntu/ natty-updates universe main multiverse restricted | |
deb http://mirrors.163.com/ubuntu/ natty-proposed universe main multiverse restricted | |
deb-src http://mirrors.163.com/ubuntu/ natty-proposed universe main multiverse restricted | |
deb http://mirrors.163.com/ubuntu/ natty-backports universe main multiverse restricted | |
deb-src http://mirrors.163.com/ubuntu/ natty-backports universe main multiverse restricted | |
deb-src http://mirrors.163.com/ubuntu/ natty-updates universe main multiverse restricted |
Probably the simplest way to achieve this is with git archive. If you really need just the expanded tree you can do something like this.
git archive master | tar -x -C /somewhere/else
Most of the time that I need to 'export' something from git, I want a compressed archive in any case so I do something like this.
This file contains hidden or 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
~/project $ git init | |
~/project $ git add . | |
~/project $ git commit -m "first commit" | |
~/project $ cd ~/Dropbox/git | |
~/Dropbox/git $ mkdir project.git | |
~/Dropbox/git $ cd project.git | |
~/Dropbox/git $ git init --bare | |
~/Dropbox/git $ cd ~/project |