##引言
鉴于使用Git有一点点门槛(比SVN稍微高一点),我写了个实用教程,如果想更进一步了解Git,或者觉得我写的太懶,推荐参考书 Progit,这本书是开源的,前四章就足够用了。
组内我和晓天、汤韬都会使用git,有问题可以线下直接问。
至于为什么要用Git,其实用SVN也是挺好的,但是SVN是集中式提交,同一时刻只能有一个人修改一个文件,这个在很多时候会比较蛋疼,另一方面SVN提交时要求联网,这样碰上断网什么的话SVN就废了。
| #!/usr/bin/python2 | |
| # -*- encoding:utf8 -*- | |
| import os | |
| import urllib | |
| import urllib2 | |
| import time | |
| import re | |
| import eyeD3 | |
| import argparse | |
| urlread = lambda url: urllib2.urlopen(url).read() |
| #!/bin/bash | |
| ############################## | |
| # dnspodsh | |
| # 基于dnspod api构架的bash ddns客户端 | |
| # 作者:zrong(zengrong.net) | |
| # 日期:2012-02-13 | |
| ############################## | |
| login_email=${1:?'必须提供登录名'} |
| #!/usr/bin/env python2 | |
| # -*- coding:utf8 -*- | |
| # ---------------- | |
| # forked from dnspod official client | |
| # modified by Justin Wong <bigeagle(at)xdlinux.info> | |
| # License: MIT | |
| # ---------------- | |
| import httplib, urllib | |
| import socket |
| #!/usr/bin/env python2 | |
| # -*- coding:utf8 -*- | |
| ''' | |
| * forked from dnspod's offical python script for dynamic dns record | |
| * modified by Justin Wong <bigeagle(at)xdlinux(dot)info> | |
| * LICENSE: MIT License | |
| ''' | |
| import httplib, urllib |
| #!/usr/bin/env python2 | |
| # -*- coding:utf8 -*- | |
| import requests | |
| import argparse | |
| USERNAME="" | |
| PASSWORD="" | |
| BASE_URL="http://net.tsinghua.edu.cn/" |
##引言
鉴于使用Git有一点点门槛(比SVN稍微高一点),我写了个实用教程,如果想更进一步了解Git,或者觉得我写的太懶,推荐参考书 Progit,这本书是开源的,前四章就足够用了。
组内我和晓天、汤韬都会使用git,有问题可以线下直接问。
至于为什么要用Git,其实用SVN也是挺好的,但是SVN是集中式提交,同一时刻只能有一个人修改一个文件,这个在很多时候会比较蛋疼,另一方面SVN提交时要求联网,这样碰上断网什么的话SVN就废了。
| #!/usr/bin/env python2 | |
| # -*- coding:utf-8 -*- | |
| import os | |
| import sys | |
| def ip62hex(ip): | |
| ip = map(lambda x: int(x, 16), ip.split(':')) | |
| hexed = reduce(list.__add__, | |
| [[(x >> 8), (x & 0x00FF)] for x in ip]) |
| object Main extends App{ | |
| def primes(nums: Stream[Int]): Stream[Int] = | |
| Stream.cons(nums.head, primes(nums.tail filter (_ % nums.head > 0))) | |
| val p = primes(Stream.from(2)) | |
| println(p apply 201314) | |
| } |
| #!/usr/bin/env python2 | |
| # -*- coding:utf-8 -*- | |
| import tornado.ioloop | |
| import tornado.web | |
| import tornado.gen | |
| import motor | |
| import json | |
| class PersistantHandler(tornado.web.RequestHandler): |
| ### Conky configuration file | |
| ## Output is printed to the console -> i3bar | |
| # Modified: 27.11.2011 - mseed : http://www.fastlinux.eu | |
| # Modified: 10.09.2012 - Sagar Behere | |
| ## No output to X <yes/no> | |
| out_to_x no | |
| ## Create own window to draw <yes/no> |