Skip to content

Instantly share code, notes, and snippets.

@AndySze
AndySze / gist:5434903
Last active January 26, 2024 14:03
编译树莓派raspberry pi交叉编译工具

树莓派是基于arm内核的小电脑,性能较低,默认cpu频率为700Mhz,所以很多工作并不适合在它上面完成,比如编译软件。所以在它上面的软件需要交叉编译工具来完成。全球范围内,需要交叉编译的芯片非常多,估计超过几万种,每种芯片的编译工具又不仅相同,所以今天我来介绍交叉编译工具的编译工具(是的,很嗷口):crosstool-ng(http://crosstool-ng.org/)。它是为创建交叉编译工具而生。可以为树莓派生成可用的交叉编译工具。当然你可以去raspberry pi 官方提供的工具(http://github.com/raspberrypi/tools.git)。

1、下载ct-ng源码

到ct-ng官网(http://crosstool-ng.org/),下载源码到相应目录。

2、解压源码

tar -xjvf crosstool-ng-1.18.0.tar.bz2 

版本可能不同,请注意

@cheekybastard
cheekybastard / scrapy_plus_selenium_renderedpage
Created February 13, 2013 14:17
Using Scrapy with Selenium to scape a rendered page
#Using Scrapy with Selenium to scape a rendered page [Updated]
from scrapy.contrib.spiders.init import InitSpider
from scrapy.http import Request, FormRequest
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from selenium import selenium
@amoblin
amoblin / huaban.py
Created March 2, 2012 08:21
花瓣网图片抓取脚本
#!/usr/bin/env python
# -*- coding: utf8 -*-
# author: amoblin <[email protected]>
import sys, re, urllib2, os, urllib
beauty_url = "http://huaban.com/favorite/beauty/"
#beauty_url = "http://huaban.com/"
pin_re = '<a href="/pins/(.+?)/"'