Skip to content

Instantly share code, notes, and snippets.

View macbre's full-sized avatar
🏠
Working from home

Maciej Brencz macbre

🏠
Working from home
View GitHub Profile
@macbre
macbre / debian.md
Last active August 29, 2015 14:08
Debian @ Dell E7440
sudo apt-get -t wheezy-backports install xserver-xorg-video-intel
sudo apt-get install libva1 libva-intel-vaapi-driver vainfo
[     7.527] (II) Module intel: vendor="X.Org Foundation"
[     7.527]    compiled for 1.12.3.902, module version = 2.19.0
[     7.527]    Module class: X.Org Video Driver
[     7.527]    ABI class: X.Org Video Driver, version 12.1
require "rspec/core/formatters/base_text_formatter"
require 'headless'
require 'fileutils'
class AcceptanceVideoFormatter < RSpec::Core::Formatters::BaseTextFormatter
def initialize(output)
@headless = Headless.new(
video: {
nomouse: true,
@macbre
macbre / phantomjs2.md
Last active August 29, 2015 14:10
PhantomJS 2 build
@macbre
macbre / vcd2avi.sh
Last active August 29, 2015 14:11
VCD
mplayer vcd://2
mencoder vcd://2 -o file.avi -oac lavc -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2000
@macbre
macbre / product.html
Last active August 29, 2015 14:12
Microdata
<title>Product - Microdata demo</title>
<body>
<article itemscope itemtype="http://data-vocabulary.org/Product">
<div class="shop" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><meta itemprop="title" content="Kamami">Sklep: <a href="http://elecena.pl/shop/kamami" itemprop="url">Kamami</a></div>
<span itemprop="brand">ACME</span>
<span itemprop="name">Executive Anvil</span>
<img itemprop="image" src="anvil_executive.jpg" />
#!/bin/sh
resolution=1360x720
seconds_per_day=0.01
auto_skip_seconds=0.1
elasticity=0.05
fps=25
bitrate=4000K
extension=webm
input=8bit.gource
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import run
import gdata.sites.client
import gdata.sites.data
# How to use the OAuth 2.0 client is described here:
# https://developers.google.com/api-client-library/python/guide/aaa_oauth
SCOPE = 'https://sites.google.com/feeds/'
@macbre
macbre / Dockerfile
Last active November 4, 2015 19:39
Statically linked PhantomJS2 in Docker
FROM ubuntu:latest
RUN apt-get update && apt-get dist-upgrade -y
RUN apt-get install -y gcc g++ git make flex bison gperf ruby perl python
RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse" >> /etc/apt/sources.list
RUN echo "deb-src http://archive.ubuntu.com/ubuntu/ trusty multiverse" >> /etc/apt/sources.list
RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse" >> /etc/apt/sources.list
RUN echo "deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse" >> /etc/apt/sources.list
@macbre
macbre / compare.js
Last active February 2, 2019 10:53
Headless browsers comparison
var webpage = require('webpage'),
page = webpage.create(),
fs = require('fs'),
args = require('system').args;
var engine = args[1];
// @see http://phantomjs.org/api/webpage/handler/on-console-message.html
page.onConsoleMessage = function(msg) {
console.log(msg);