Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import csv
import hashlib
import os
from os.path import dirname, exists, join
import re
import shutil
from urlparse import urljoin
#!/usr/bin/env python
from datetime import datetime
import os
import re
from subprocess import call, check_call, check_output
OUTPUT_DIRECTORY = "/home/mark/Videos"
SOURCE_DRIVE = "/dev/dvd"
# HANDBRAKE_PRESET = "Android Tablet MP3"
import json, os, yaml
d = 'nuntium/tests/fixtures/vcr_cassettes/'
for y in os.listdir(d):
yf = os.path.join(d, y)
data = yaml.load(open(yf).read())
print "======== ", y
for i in data['interactions']:
print "---- ", i['request']['uri']
body_dict = i['response']['body']
s = body_dict['string']
# This assumes that you have created a vagrant instance based on
# trusty with localhost:3000 from the host forwarded to localhost:3000
# in the guest, and there is a popit instance running inside it that
# was created roughly with (after logging in with 'vagrant ssh'):
# sudo apt-get update
# sudo apt-get install git-core
# git clone https://github.com/ciudadanointeligente/write-it.git
# sudo apt-get install nodejs npm
# sudo ln -s /usr/bin/nodejs /usr/bin/node
# If necessary, apply this patch:
==7523== Memcheck, a memory error detector
==7523== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==7523== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==7523== Command: /home/mark/hb/build/HandBrakeCLI -v2 -N eng -a 1 -i atpm.iso -t 1 -o /home/mark/Videos/ALL_THE_PRESIDENTS_MEN_PAL1_2016-06-26T10:29:07/title-01.mkv --preset-import-gui --preset=Android\ 720p30\ MP3 -s scan --subtitle-forced --subtitle-default
==7523== Parent PID: 7490
==7523==
==7523== Thread 3:
==7523== Invalid read of size 4
==7523== at 0x80B2E79: append_string (common.c:3947)
==7523== by 0x80B2E79: stringify_dict (common.c:4065)
This file has been truncated, but you can view the full file.
$ rm -rf build/
$ ./configure --debug=max
probe: host tuple...(pass) i686-pc-linux-gnu
compute: available architectures...(pass) i686
find: ar...(pass) /usr/bin/ar
find: cp...(pass) /bin/cp
find: gcc...(pass) /usr/bin/gcc
find: gmake...(pass) /usr/bin/make
find: gm4...(pass) /usr/bin/m4
find: mkdir...(pass) /bin/mkdir
probe: host tuple...(pass) i686-pc-linux-gnu
+ ./make/config.guess
: i686-pc-linux-gnu
compute: available architectures...(pass) i686
: <NO-OUTPUT>
find: ar...(pass) /usr/bin/ar
: name[0] = ar
find: cp...(pass) /bin/cp
: name[0] = cp
find: gcc...(pass) /usr/bin/gcc
probe: host tuple...(pass) i686-pc-linux-gnu
compute: available architectures...(pass) i686
find: ar...(pass) /usr/bin/ar
find: cp...(pass) /bin/cp
find: gcc...(pass) /usr/bin/gcc
find: gmake...(pass) /usr/bin/make
find: gm4...(pass) /usr/bin/m4
find: mkdir...(pass) /bin/mkdir
find: gpatch...(pass) /usr/bin/patch
find: rm...(pass) /bin/rm
[10:29:09] hb_init: starting libhb thread
[10:29:09] thread b69bcb40 started ("libhb")
HandBrake 20160626065415-700b4f8-master (2016062601) - Linux i686 - https://handbrake.fr
2 CPUs detected
Opening /dev/dvd...
[10:29:09] CPU: Genuine Intel(R) CPU 1400 @ 1.83GHz
[10:29:09] - logical processor count: 2
[10:29:09] OpenCL: library not available
[10:29:09] hb_scan: path=/dev/dvd, title_index=1
[10:29:09] thread b61bbb40 started ("scan")
Ignoring unknown MIME type text/html for Baildon ward
Ignoring unknown MIME type text/html for Bingley Rural ward
Ignoring unknown MIME type text/html for Bingley ward
Ignoring unknown MIME type text/html for Bolton and Undercliffe ward
Ignoring unknown MIME type text/html for Bradford Moor ward
Ignoring unknown MIME type text/html for City ward
Ignoring unknown MIME type text/html for Clayton and Fairweather Green ward
Ignoring unknown MIME type text/html for Craven ward
Ignoring unknown MIME type text/html for Eccleshill ward
Ignoring unknown MIME type text/html for Great Horton ward