Skip to content

Instantly share code, notes, and snippets.

@kitelife
kitelife / segmentfault-1010000000174213.py
Created March 5, 2013 09:06
Python验证用户输入IP的合法性,有什么好方法吗? 如:<input type="text" name="ip" id="ip" /> 在text里表单输入的字符串
#!/usr/bin/python
#-*- coding: utf-8 -*-
'''
http://segmentfault.com/q/1010000000174213
Python验证用户输入IP的合法性,有什么好方法吗?
如:<input type="text" name="ip" id="ip" /> 在text里表单输入的字符串
'''
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@tomtung
tomtung / Week1 - Ruby.rb
Created June 13, 2012 08:45
Seven Languages in Seven Weeks
#!/usr/bin/ruby
############# Day 1 #############
# Print the string “Hello, world.”
puts 'Hello, world'
# For the string “Hello, Ruby”, find the index of the word“Ruby”.
puts 'Hello, Ruby'.index('Ruby')