ack apple-gcc42 autoconf automake boost casperjs chromedriver chruby cscope elasticsearch faac ffmpeg fontconfig fontforge freetype gdbm geoip gettext gistit glew glib glm gmp gnutls gource hub imagemagick jansson jpeg lame libffi libgcrypt libgpg-error libpng libtasn1 libtiff libtool libvpx libyaml macvim mongodb mysql nettle node openssl p11-kit pcre phantomjs pkg-config rbenv readline ruby ruby-build samba sdl sdl_image snownews stunnel texi2html the_silver_searcher tree wget wireshark x264 xvid xz yasm zsh-syntax-highlighting
This file contains hidden or 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
| Slimerjs cookies are weird, for BBC, setting them required creating a profile | |
| slimerjs -CreateProfile wraith | |
| Then set command line options in config.yaml | |
| phantomjs_options: -P wraith | |
| Existing cookies will be disabled, also, you cant set cookies probably, so weather wont work. |
-
Copy the new fonts into the /usr/share/fonts/local/ directory
-
Add fonts to font cache
fc-cache /path/to/
Install MS fonts from EC2
wget http://wraith.bbcnewshq.com/downloads/msttcore-fonts-2.0-3.noarch.rpm
rpm -Uvh msttcore-fonts-2.0-3.noarch.rpm
This file contains hidden or 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 system = require('system'); | |
| var page = require('webpage').create(); | |
| var fs = require('fs'); | |
| if (system.args.length === 3) { | |
| console.log('Usage: snap.js <some URL> <view port width> <target image name>'); | |
| phantom.exit(); | |
| } | |
| var url = system.args[1]; |
This file contains hidden or 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
| 413359 |
This file contains hidden or 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 page = require('webpage').create(); | |
| page.open('http://www.bbc.co.uk/news', function () { | |
| console.log(page.content); | |
| phantom.exit(); | |
| }); |
This file contains hidden or 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
| require 'wraith' | |
| require 'image_size' | |
| require 'anemone' | |
| require 'uri' | |
| require 'selenium-webdriver' | |
| class WraithManager | |
| attr_reader :wraith | |
| def initialize(config) |
This file contains hidden or 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
| require 'yaml' | |
| class Wraith | |
| attr_accessor :config | |
| def initialize(config_name) | |
| @config = YAML::load(File.open("configs/#{config_name}.yaml")) | |
| end | |
| def directory |
This file contains hidden or 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
| require 'wraith' | |
| require 'image_size' | |
| require 'anemone' | |
| require 'uri' | |
| require 'selenium-webdriver' | |
| class WraithManager | |
| attr_reader :wraith | |
| def initialize(config) |