Skip to content

Instantly share code, notes, and snippets.

View yoihito's full-sized avatar

Vadim Gribanov yoihito

View GitHub Profile
#!/bin/bash
PHANTOM_JS="phantomjs-2.0.0-linux-x86_64"
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1
else
apt-get update
apt-get install -y build-essential chrpath libssl-dev libxft-dev
apt-get install -y libfreetype6 libfreetype6-dev
apt-get install -y libfontconfig1 libfontconfig1-dev
@yoihito
yoihito / fb2transformer.py
Last active August 29, 2015 14:18
Fb2 driver
import xml.sax
import xml.sax.handler
import re
class BodyNotFound(Exception):
pass
class BookHandler(xml.sax.handler.ContentHandler):
def __init__(self):
self.inBody = False
(function(window){
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
var canvas = document.getElementById('board');
var ctx = canvas.getContext("2d");
var renderer;
var width = 1024;
var height = 768;
var timeFrame = width;
var bower_dir = __dirname + '/bower_components';
var path = require('path');
var webpack = require('webpack');
var SaveHashes = require('assets-webpack-plugin');
var config = {
context: __dirname,
cache: true,
debug: true,