This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
raspistill -o photo%04d.jpg -w 800 -h 600 -q 10 -t 99999999 -tl 600000 & | |
raspistill -o photo%04d.jpg -q 100 -t 99999999 -tl 600000 & | |
# 照片见微云 | |
total 6.7M | |
drwxr-xr-x 2 pi pi 4.0K Dec 3 19:50 . | |
drwxr-xr-x 7 pi pi 4.0K Dec 3 19:56 .. | |
-rw-r--r-- 1 pi pi 44K Dec 2 21:39 photo0001.jpg | |
-rw-r--r-- 1 pi pi 44K Dec 2 21:49 photo0002.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://www.9lessons.info/2009/03/generate-xml-rss-feed-with-php.html | |
$items = array( | |
array('title' => 'aaa', 'link' => 'www.google.com', 'description' => 'aaaaaaaaaaa'), | |
array('title' => 'bbb', 'link' => 'www.yahoo.com', 'description' => 'bbbbbbbbbbb'), | |
); | |
header("Content-type: text/xml"); | |
echo "<?xml version='1.0' encoding='UTF-8'?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 最新HOSTS法去除优酷、爱奇艺等视频网站广告 http://www.oschina.net/code/snippet_1262919_27114 | |
#优酷 | |
127.0.0.1 atm.youku.com | |
127.0.0.1 Fvid.atm.youku.com | |
127.0.0.1 html.atm.youku.com | |
127.0.0.1 valb.atm.youku.com | |
127.0.0.1 valf.atm.youku.com | |
127.0.0.1 valo.atm.youku.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: asplashscreen | |
# Required-Start: | |
# Required-Stop: | |
# Should-Start: | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Show custom splashscreen | |
# Description: Show custom splashscreen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#----------------------------------- | |
# Send SMS Text Message | |
# | |
# Author : Matt Hawkins | |
# Site : http://www.raspberrypi-spy.co.uk/ | |
# Date : 30/08/2012 | |
# | |
# Requires account with TxtLocal | |
# http://www.txtlocal.co.uk/?tlrx=114032 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 引用自:http://www.oschina.net/code/snippet_616067_22723?p=2#comments | |
// 调用方法http://../flv.php?url=http://v.youku.com/v_show/id_XMzg2OTQ3MjQw.html | |
// 似乎只支持低清晰度的视频地址 | |
echo fetch_youku_flv($_GET['url']); | |
function fetch_youku_flv($url){ | |
preg_match("#id_(.*?)\.html#",$url,$out); | |
$id=$out[1]; | |
$content=get_curl_contents('http://v.youku.com/player/getPlayList/VideoIDS/'.$id); | |
$data=json_decode($content); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# /etc/init.d/noip | |
### BEGIN INIT INFO | |
# Provides: noip | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Simple script to start a program at boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run in firebug console | |
// Get youtube video list from URL eg. https://www.youtube.com/user/WekaMOOC/videos?shelf_id=1&view=0&sort=dd | |
// refer to: http://stackoverflow.com/questions/7474354/include-jquery-in-the-javascript-console | |
var jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// result eg. https://www.youtube.com/watch?v=OcgW_Z_5Vac | |
for (var i=0; i<$('.channels-content-item').length; i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN sudo echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN sudo apt-get update | |
RUN sudo apt-get install -y Dialog | |
RUN sudo apt-get install -y wget | |
RUN sudo apt-get install -y vim | |
RUN sudo apt-get install -y git | |
RUN sudo apt-get install -y gcc | |
RUN sudo apt-get install -y make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# tested successfully on digitalocean Ubuntu 12.40 with docker version | |
# after run this script, then wget youtube-dl.support1080p.sh gist, then 1080p download is working | |
sudo apt-get -y install vim | |
sudo apt-get -y install git | |
sudo apt-get -y install gcc | |
sudo apt-get -y install make | |
sudo apt-get -y install yasm | |
wget http://kakola.googlecode.com/files/lame-3.98.4.tar.gz | |
tar zvxf lame-3.98.4.tar.gz |