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
# | |
# Step One - Installing RVM | |
# | |
curl -L https://get.rvm.io | bash -s stable --ruby | |
# Then, install ruby 1.8.7 -- you need to basically match the same version of Ruby as Dreamhost | |
rvm install ruby-1.8.7-p334 | |
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
<IfModule mod_fastcgi.c> | |
AddHandler fastcgi-script .fcgi | |
</IfModule> | |
<IfModule mod_fcgid.c> | |
AddHandler fcgid-script .fcgi | |
</IfModule> | |
Options +FollowSymLinks +ExecCGI | |
RewriteEngine On |
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
PdfReader pdf = new PdfReader("in.pdf"); | |
PdfStamper stp = new PdfStamper(pdf, new FileOutputStream("c:\\out.pdf")); | |
PdfWriter writer = stp.getWriter(); | |
Image img = Image.getInstance("image.png"); | |
PdfDictionary pg = pdf.getPageN(1); | |
PdfDictionary res = | |
(PdfDictionary)PdfReader.getPdfObject(pg.get(PdfName.RESOURCES)); | |
PdfDictionary xobj = | |
(PdfDictionary)PdfReader.getPdfObject(res.get(PdfName.XOBJECT)); | |
if (xobj != null) { |
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
import java.awt.Graphics; | |
import java.awt.GraphicsConfiguration; | |
import java.awt.GraphicsDevice; | |
import java.awt.GraphicsEnvironment; | |
import java.awt.HeadlessException; | |
import java.awt.Image; | |
import java.awt.Transparency; | |
import java.awt.image.BufferedImage; | |
import java.awt.image.ColorModel; | |
import java.awt.image.PixelGrabber; |
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
public double doIt(BufferedImage image) { | |
final double skewRadians; | |
BufferedImage black = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_BYTE_BINARY); | |
final Graphics2D g = black.createGraphics(); | |
g.drawImage(image, 0, 0, null); | |
g.dispose(); | |
skewRadians = findSkew(black); | |
System.out.println(-57.295779513082320876798154814105 * skewRadians); | |
return skewRadians; |
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
' svg.vba released 11.08.2002 | |
Private Function get_export_scaling_factor() As Single | |
'' point to pixel conversion factor | |
get_export_scaling_factor = (4 / 3) | |
End Function |
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
#UPDATE:2013-07-07 21:01 | |
127.0.0.1 localhost | |
#SmartHosts START | |
#Google Services START | |
203.208.46.200 0.docs.google.com | |
203.208.46.200 0.drive.google.com | |
203.208.46.200 1.docs.google.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
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Comments begin with a '#' and extend through the end of the line. Keywords | |
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
## | |
## Below you will find examples of some frequently used statements. For | |
## information about the control file, a complete list of statements and | |
## options please have a look in the monit manual. |
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
//for detail, please visit | |
//http://blog.rubypdf.com/2014/07/08/convert-pdf-to-bitmap-with-pdfium | |
//do not forget #include "EasyBMP.h" first | |
static void WriteBmp(const char* pdf_name, int num, | |
const char* buffer, int stride | |
, int width, int height) { | |
BMP bmp; | |
bmp.SetSize(width,height); | |
// Set its color depth to 32-bits | |
bmp.SetBitDepth(32); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "../fpdfsdk/include/fpdfview.h" | |
#include "../fpdfsdk/include/fpdfsave.h" | |
/* | |
author:Steven Lee |
OlderNewer