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 | |
for f; do | |
[ -f $f ] || continue | |
gs -sOutputFile=$f.new \ | |
-sDEVICE=pdfwrite \ | |
-dCompatibilityLevel=1.4 $f </dev/null && mv $f.new $f | |
done |
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
inoticoming --logfile t.log --pid-file t.pid /tmp/t --suffix .txt --stderr-to-log /tmp/t.sh {} \; |
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 -e | |
# pdf içeriğinin ghostscript yorumlayıcı tarafından yeniden üretilmesi | |
# (derlenmesi) yoluyla pdf dosya boyutunu ufaltmaya çalış | |
# XXX kabuk matematiğinden dolayı bash gerekiyor | |
# XXX isimlerde boşluk kullanılabilir, tırnaklamaya dikkat | |
# yüzde olarak minimum sıkıştırma oranı | |
RATIO="20.0" |
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 | |
# PDF dosyayı ghostscript yorumlayıcı ile yeniden üret. | |
# XXX isimlerde boşluk kullanılabilir, tırnaklamaya dikkat | |
PROGNAME="${0##*/}" | |
declare -A DICT=( | |
["producer"]="$PROGNAME" |
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
wget --no-check-certificate -O- https://github.com/ecylmz/ecylmz.github.com/raw/HEAD/9/_posts/2010-11-14-kramdown.md | | |
sed -e '1,/^---/d' | | |
kramdown -o latex --template document >/tmp/kramdown.tex && pdflatex /tmp/kramdown.tex && evince /tmp/kramdown.pdf |
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 | |
# Jekyll girdilerinden pdf üret. | |
# Örnek: <betik> 9/_posts/2010-11-14-kramdown.md | |
PATH=/var/lib/gems/1.8/bin:$PATH | |
[ $# -gt 0 ] || { | |
echo >&2 "Kullanım: $0 <jekyll markdown dosyası>" | |
echo >&2 "Örnek: $0 9/_posts/2010-11-14-kramdown.md" |
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
# İzin verilen resim boyutları | |
SIZES = [640, 480] | |
# Slaytları resim gömerek üret. | |
rule '.html' => ['.md'] do |f| | |
sh "landslide -t themes/default #{f.source} -i -d #{f.name}" | |
end | |
desc "Resimleri boyutlandır ve optimize et" | |
task :optim 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
def prep_rules_for_noext(sources, &process) | |
sources.each do |f| | |
rule f.pathmap("%X") => f do |t| | |
process.call(t) | |
end | |
end | |
end | |
# örnek bir kural: tüm .t uzantıları için bir şey yap | |
prep_rules_for_noext(FileList["**/*.t"]) do |t| |
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
def prep_rules_for_noext(sources, &process) | |
sources.each do |f| | |
rule f.pathmap("%X") => f do |t| | |
process.call(t) | |
end | |
end | |
end | |
prep_rules_for_noext(FileList["**/*.t"]) do |t| | |
touch(t.name) |
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
# A unicode character → | |
def prep_rules_for_noext(sources, &process) | |
sources.each do |f| | |
rule f.pathmap("%X") => f do |t| | |
process.call(t) | |
end | |
end | |
end | |
prep_rules_for_noext(FileList["**/*.t"]) do |t| |