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 | |
photo_dir='.' | |
if test $# -gt 0; then | |
photo_dir=$1 | |
fi | |
thumbnail_dir='_thumbnail' | |
# Create thumbnail for Images by epeg | |
for file in `find $photo_dir -type f -name "*.jpg"` | |
do |
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 | |
photo_dir='.' | |
if test $# -gt 0; then | |
photo_dir=$1 | |
fi | |
thumbnail_dir='_thumbnail' | |
find $photo_dir -type d -name $thumbnail_dir |xargs rm -rf |
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 | |
full_path="/var/www/public/ch1.sec1.index.html" | |
dir=${full_path%/*} | |
filename=$(basename $full_path) | |
filename_with_ext=${full_path##*/} | |
filename_without_ext=${filename_with_ext%.*} | |
ext=${full_path##*.} | |
echo "Full path: $full_path" # /var/www/public/ch1.sec1.index.html |
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 | |
smart_uncompress() | |
{ | |
if [ $# -lt 1 ]; then | |
echo "At least one paramater required" | |
exit 1 | |
fi | |
ftype="$(file $1)" |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var util = require('util'); | |
var baseUrl = 'http://forgifs.com'; | |
function formatSrc(src) { | |
if (src.charAt(0) === '/') { | |
return util.format('%s%s', baseUrl, src); | |
} else if (src.indexOf('http://') === -1) { |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
//var Iconv = require('iconv').Iconv; | |
//var iconv = new Iconv('GBK', 'UTF-8//TRANSLIT//IGNORE'); | |
var iconv = require('iconv-lite'); | |
var util = require('util'); | |
var baseUrl = 'http://www.gaoxiaogif.com'; | |
var navItems = [ | |
{ |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
//var Iconv = require('iconv').Iconv; | |
//var iconv = new Iconv('GBK', 'UTF-8//TRANSLIT//IGNORE'); | |
var iconv = require('iconv-lite'); | |
var util = require('util'); | |
var baseUrl = 'http://www.gifcool.com'; | |
var options = { | |
'url': '', |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
//var Iconv = require('iconv').Iconv; | |
//var iconv = new Iconv('GBK', 'UTF-8//TRANSLIT//IGNORE'); | |
var iconv = require('iconv-lite'); | |
var util = require('util'); | |
var baseUrl = 'http://www.youqu5.com'; | |
var navItems = [ | |
{ |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var util = require('util'); | |
var baseUrl = 'http://www.gifbin.com'; | |
var options = { | |
'url': '', | |
'method': 'GET', | |
'headers': { | |
'User-Agent': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36', |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var util = require('util'); | |
var baseUrl = 'http://www.tehcute.com'; | |
var options = { | |
'url': '', | |
'method': 'GET', | |
'headers': { | |
'User-Agent': 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36', |
OlderNewer