根据启动Bash Shell的方式不同,对Shell有两种分类方式
根据Shell的启动方式不同,可以将Shell分为
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <errno.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <arpa/inet.h> | |
| #include <netinet/in.h> | |
| #include <signal.h> |
| #!/bin/bash | |
| ##################################### | |
| #Author: Leon Lee # | |
| #email: lendylongli@gmail.com # | |
| #QQ: 730395591 # | |
| #Version: 1.0 # | |
| #Note: If you have some good ideas # | |
| # or advice, please mail me^^ # | |
| ##################################### |
| # To install the Python client library: | |
| # pip install -U selenium | |
| # Import the Selenium 2 namespace (aka "webdriver") | |
| from selenium import webdriver | |
| # iPhone | |
| driver = webdriver.Remote(browser_name="iphone", command_executor='http://172.24.101.36:3001/hub') | |
| # Android |
| ctrl-z | |
| bg | |
| touch /tmp/stdout | |
| touch /tmp/stderr | |
| gdb -p $! | |
| # In GDB | |
| p dup2(open("/tmp/stdout", 1), 1) | |
| p dup2(open("/tmp/stderr", 1), 2) |
| #!/usr/bin/env python | |
| # Usage: | |
| # This script will generate two files(vpnup and vpndown) after executing. | |
| # Do chmod a+x on the two newly created files, and then move them to the | |
| # openvpn config folder. then add the following two lines to the vpn config file: | |
| # up vpnup | |
| # down vpndown | |
| # you might also need 'redirect-gateway' in the config file, if you don't use vpn | |
| # as the default gateway. |
| #!/bin/sh | |
| ### get news from your friends at renren.com | |
| # Copyright: (c) 2009,2010 Jakukyo Friel <weakish@gmail.com> | |
| # License: GPL v2 | |
| # Config area | |
| # We put everything in an hg repo. You should set it up already. | |
| renrepo=$HOME/repo/renren |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # author: Rolando Espinoza La fuente | |
| from scrapy.conf import settings | |
| from scrapy.core import signals | |
| from scrapy.core.manager import scrapymanager | |
| from scrapy.item import Item, Field | |
| from scrapy.selector import HtmlXPathSelector | |
| from scrapy.spider import BaseSpider |