URL: http://www.v2ex.com/api/site/stats.json
获取社区统计信息。
#!/usr/bin/env python | |
import re | |
import sys | |
if sys.version_info[0] == 2: | |
import urllib2 | |
import urllib | |
import urlparse | |
input = raw_input |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
function newCounter() | |
local i = 0 | |
return function() -- anonymous function | |
i = i + 1 | |
return i | |
end | |
end | |
c1 = newCounter() | |
print(c1()) --> 1 |
#!/bin/sh | |
printf "\033[5;31;40m"; | |
echo " █████▒█ ██ ▄████▄ ██ ▄█▀"; | |
echo "▓██ ▒ ██ ▓██▒▒██▀ ▀█ ██▄█▒ "; | |
echo "▒████ ░▓██ ▒██░▒▓█ ▄ ▓███▄░ "; | |
echo "░▓█▒ ░▓▓█ ░██░▒▓▓▄ ▄██▒▓██ █▄ "; | |
echo "░▒█░ ▒▒█████▓ ▒ ▓███▀ ░▒██▒ █▄"; | |
echo " ▒ ░ ░▒▓▒ ▒ ▒ ░ ░▒ ▒ ░▒ ▒▒ ▓▒"; | |
echo " ░ ░░▒░ ░ ░ ░ ▒ ░ ░▒ ▒░"; |
#!/bin/sh | |
# use `printf "\033[{{STYLE}};{{FOREGROUND_COLOR}};{{BACKGROUND_COLOR}}m"` to set the color of all the output from the shell | |
# use `printf "\033[0m"` to reset | |
for attr in 0 1 4 5 7 ; do | |
echo "----------------------------------------------------------------" | |
printf "ESC[%s;Foreground;Background - \n" $attr | |
for fore in 30 31 32 33 34 35 36 37; do | |
for back in 40 41 42 43 44 45 46 47; do |
URL: http://www.v2ex.com/api/site/stats.json
获取社区统计信息。
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
{ "name": "Tumblr full size images" | |
, "version": "1.0" | |
, "description": "Never show image thumbnails on tumblr" | |
, "homepage_url": "https://gist.github.com/johan/6336414" | |
, "manifest_version": 2 | |
, "content_scripts": | |
[ { "js": | |
[ "tumblr-full-size-images.user.js" | |
] | |
, "matches": |
class test: | |
def __init__(self): | |
self.a = 1 | |
@classmethod | |
def foo(cls, p, flag): | |
pass | |
def foo(self, p): | |
print(self.a) |
//测试代码 | |
package test | |
import "fmt" | |
func main() | |
{ | |
fmt.Printf("test\n") | |
} |