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 |
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
/* | |
* by moli | |
*/ | |
$(document).ready(function(){ | |
if(document.cookie.indexOf("lu=") == -1 ){ | |
// 延时2秒 | |
setTimeout("jQuery.mxblur.interID = setInterval('jQuery.mxblur.begin()', 5)", 1500); | |
} | |
}); |
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 | |
class Classify { | |
public $idKey = ''; | |
public $parentIdKey = ''; | |
/** | |
* | |
* @param string $formatStr | |
*/ | |
public function __construct() { |
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.paulund.co.uk/encode-email-with-php | |
/** | |
* Encode an email address to display on your website | |
*/ | |
function encode_email_address( $email ) { | |
$output = ''; | |
for ($i = 0; $i < strlen($email); $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
<?php | |
// 用PHP迭代器来实现一个斐波纳契数列 | |
// 转载自: http://www.nowamagic.net/librarys/veda/detail/2164 | |
class Fibonacci implements Iterator { | |
private $previous = 1; | |
private $current = 0; | |
private $key = 0; | |
public function current() { | |
return $this->current; |
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 | |
if [ $(id -u) != "0" ]; then | |
printf "Error: You must be root to run this tool!\n" | |
exit 1 | |
fi | |
clear | |
printf " | |
#################################################### | |
# # |
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
([]+[])[ ([][(![ ] | |
+[])[+[ ]]+([![ ]]+[][ []])[+ | |
!+[]+[+ []]]+(! []+[]) [!+[]+!+[ | |
]]+(!![ ]+[])[+ []]+(! ![]+[])[ | |
!+[]+!+ []+!+[] ]+(!![ ]+[])[+! | |
+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+ |
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 |
OlderNewer