Giter Site home page Giter Site logo

insight2png's Introduction

Requirements:

Run:

xvfb-run slimerjs server.coffee

Point browser to:

http://localhost:8080/insight.png?url=<full_url_of_insight>

And get an image.

Fun:

That's right, there's fun, too! There's a bookmarklet to generate the image from an insight permalink. Unfortunately you can't embed javascript links in GitHub, but you can get it here.

Develop

I had to move insight2png.coffee to a src dir and compile it to js b/c slimer's coffeescript compiler wasn't handling the new object-ified version of insight2png. If you're developing, just run ./watch while and edits to insight2png.coffee in the src dir will compile to insight2png.js.

Troubleshooting

For newer versions of slimerjs and phantomjs, need to run with flag --ssl-protocol=any

phantomjs|slimerjs --ssl-protocol=any server.js

I'm not sure why this is, but it seems to be specific to ThinkUp's SSL setup, because it's not necessary for all SSL, e.g., https://google.com.

Installation

This is the current configuration of the server:

  • m1.small
  • ami-08389d60
  • "shares" Security Group
  • Region Virginia
  • AZ C
  • "thinkup" PEM
$ sudo -s
# add-apt-repository ppa:vbernat/haproxy-1.5
# apt-get update
# apt-get -y dist-upgrade
# dpkg-reconfigure tzdata
	[America]
	[New_York]
# apt-get -y install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1 git firefox xvfb haproxy
# wget http://download.slimerjs.org/releases/0.9.2/slimerjs-0.9.2-linux-x86_64.tar.bz2
# bzip2 -d slimerjs-0.9.2-linux-x86_64.tar.bz2
# tar -xf slimerjs-0.9.2-linux-x86_64.tar
# git clone https://github.com/adampash/insight2png.git i2p (Calling it "insight2png" confuses slimer's module loading)
# export SLIMERJSLAUNCHER=/usr/bin/firefox
# cp i2p/config/prefs.js slimerjs-0.9.2/defaults/preferences/prefs.js
# cp i2p/sys/etc/init/insight2png.conf /etc/init
# ln -s i2p/sys/etc/haproxy/haproxy.cfg /etc/haproxy
# service haproxy restart
# start insight2png

This logs to /var/log/insight2png.log.i

insight2png's People

Contributors

adampash avatar ginatrapani avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.