# generate pdf with lorem ipsum text for testing
#
lorem-ipsum --units paragraphs --count 100 > 100.txt
enscript 100.txt -o - | ps2pdf - 100.pdf
# values:
# 100: 18kb 8pg
# 1000: 161kb 76pg
# 10000: 1.6mb 761pg
# 100000: 16mb 7508pg
# 500000: 80mb 37526pg
-
-
Save rvanider/244514f7f9af982f0969 to your computer and use it in GitHub Desktop.
Notes
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
Collection of notes |
add /etc/sudoers.d/vagrant
vagrant ALL=(ALL) NOPASSWD: ALL
Defaults:vagrant !requiretty
Defaults:vagrant visiblepw
/etc/sysconfig/network-scripts/ifcfg-eth0
remove HWADDR line (mac)
add ONBOOT=yes
/etc/udev/rules.d/70-persistent-net.rules
remove HWADDR attribute
yum update
yum install zip unzip telnet wget xz git scl-utils
yum clean all
gcc update
http://docs.oracle.com/cd/E37670_01/E59096/E59096.pdf
wget -O /etc/yum.repos.d/public-yum-ol6.repo http://public-yum.oracle.com/public-yum-ol6.repo
set enabled=1 for the software collection package in the repo file
yum install devtoolset-3-gcc devtoolset-3-gcc-c++
# parallels
yum install kernel-uek-devel
wget http://linux.dell.com/dkms/permalink/dkms-2.2.0.3-1.noarch.rpm
rpm -i dkms-2.2.0.3-1.noarch.rpm
enable ol6_UEKR3_latest repo in /etc/yum.repo.d/
add /etc/profile.d/node.sh
export PATH=/opt/node/bin:$PATH
su node
npm -g update
npm -g install forever nodemon nan node-gyp
# installing a node module requiring the 4.8+ gcc
scl enable devtoolset-3 bash
export CXX=gcc
npm install bignum
# java - lack of entropy in VM causes slow startup
edit /.../jre-version/lib/security/java.security
change securerandom.source to securerandom.source=/tmp/random.bin
generate file as dd if=/dev/urandom of=/tmp/random.bin bs=1MB count=10
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
given a line like this | |
email: something@somewhere.com | |
change it to: | |
email: 'something@somewhere.com' | |
(\w+)@(\w+)\.(\w+) | |
'$1@$2.$3' |
# OCR with good results
convert -density 160 -antialias -monochrome -background white -alpha off sample.pdf sample.png
tesseract sample.png out hocr
cat out.txt
enscript test.txt -o - | ps2pdf - test.pdf
# extract pages as images
# rebundle to pdf
rm *.png; convert -density 160 -antialias -monochrome -background white -alpha off ../100.pdf out-%05d.png
rm *.pdf; convert *.png output.pdf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment