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 morgan = require('morgan') | |
var compression = require('compression') | |
var express = require('express'); | |
var methodOverride = require('method-override') | |
var bodyParser = require('body-parser') | |
var app = express(); | |
app.set('port', 1337); | |
app.use(compression()); |
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
PS C:\Users\username\devel\rubix> npm install | |
npm WARN deprecated gulp-uglifyjs@0.5.0: Since gulp-sourcemaps now works, use gulp-uglify instead | |
npm WARN deprecated gulp-webpack@1.5.0: Renamed to https://www.npmjs.com/package/webpack-stream | |
npm WARN deprecated react-hot-loader@0.5.0: React Hot Loader 1.1 has been released with support for next versions of React and ES6 classes. See https://github.com/gaearon/react-hot-loader/blob/master/docs/README.md#migrating-to-10 | |
npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select' | |
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what' | |
npm WARN install Couldn't install optional dependency: Unsupported | |
npm WARN prefer global marked@0.3.5 should be installed with -g | |
npm WARN prefer global js-beautify@1.5.10 should be installed with -g |
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
root@ip-10-0-0-249:/home/ubuntu# fdisk /dev/xvdf | |
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel | |
Building a new DOS disklabel with disk identifier 0x548c70c6. | |
Changes will remain in memory only, until you decide to write them. | |
After that, of course, the previous content won't be recoverable. | |
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) | |
Command (m for help): m | |
Command action |
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
sudo apt-get install software-properties-common | |
sudo add-apt-repository -y ppa:hvr/ghc | |
sudo apt-get update | |
# if EC2 ubuntu instance, add swap | |
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
sudo /sbin/mkswap /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 | |
sudo apt-get install -y libncurses5-dev libtool libxen-dev software-properties-common cabal-install-1.20 ghc-7.8.4 zlib1g-dev autoconf git build-essential curl |
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
pdfinfo http://linux.about.com/library/cmd/blcmdl1_pdfinfo.htm | |
pdfjoin | |
pdfcrop | |
pdfcrop2 http://code.google.com/p/pdfcrop2/wiki/Usage | |
Crop with PyPDF | |
http://code.activestate.com/recipes/576837-crop-pdf-file-with-pypdf/ | |
Cropping | |
To crop a PDF with PDFCrop: |
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
#!python3.4 | |
import io | |
import os | |
import sys | |
import mimetypes | |
import uuid | |
# Import the email modules we'll need | |
from email import policy | |
from email.parser import BytesParser |