1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/' xmlns:
atom=
"http://www.w3.org/2005/Atom">
4 <title>Petter Reinholdtsen
</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
7 <atom:link href=
"http://people.skolelinux.org/pere/blog/index.rss" rel=
"self" type=
"application/rss+xml" />
10 <title>Time for an official MIME type for patches?
</title>
11 <link>http://people.skolelinux.org/pere/blog/Time_for_an_official_MIME_type_for_patches_.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Time_for_an_official_MIME_type_for_patches_.html
</guid>
13 <pubDate>Thu,
1 Nov
2018 08:
15:
00 +
0100</pubDate>
14 <description><p
>As part of my involvement in
15 <a href=
"https://gitlab.com/OsloMet-ABI/nikita-noark5-core
">the Nikita
16 archive API project
</a
>, I
've been importing a fairly large lump of
17 emails into a test instance of the archive to see how well this would
18 go. I picked a subset of
<a href=
"https://notmuchmail.org/
">my
19 notmuch email database
</a
>, all public emails sent to me via
20 @lists.debian.org, giving me a set of around
216 000 emails to import.
21 In the process, I had a look at the various attachments included in
22 these emails, to figure out what to do with attachments, and noticed
23 that one of the most common attachment formats do not have
24 <a href=
"https://www.iana.org/assignments/media-types/media-types.xhtml
">an
25 official MIME type
</a
> registered with IANA/IETF. The output from
26 diff, ie the input for patch, is on the top
10 list of formats
27 included in these emails. At the moment people seem to use either
28 text/x-patch or text/x-diff, but neither is officially registered. It
29 would be better if one official MIME type were registered and used
32 <p
>To try to get one official MIME type for these files, I
've brought
34 <a href=
"https://www.ietf.org/mailman/listinfo/media-types
">the
35 media-types mailing list
</a
>. If you are interested in discussion
36 which MIME type to use as the official for patch files, or involved in
37 making software using a MIME type for patches, perhaps you would like
38 to join the discussion?
</p
>
40 <p
>As usual, if you use Bitcoin and want to show your support of my
41 activities, please send Bitcoin donations to my address
42 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
47 <title>Measuring the speaker frequency response using the AUDMES free software GUI - nice free software
</title>
48 <link>http://people.skolelinux.org/pere/blog/Measuring_the_speaker_frequency_response_using_the_AUDMES_free_software_GUI___nice_free_software.html
</link>
49 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Measuring_the_speaker_frequency_response_using_the_AUDMES_free_software_GUI___nice_free_software.html
</guid>
50 <pubDate>Mon,
22 Oct
2018 08:
40:
00 +
0200</pubDate>
51 <description><p
><img src=
"http://people.skolelinux.org/pere/blog/images/
2018-
10-
22-audmes-measure-speakers.png
" align=
"right
" width=
"40%
"/
></p
>
53 <p
>My current home stereo is a patchwork of various pieces I got on
54 flee markeds over the years. It is amazing what kind of equipment
55 show up there. I
've been wondering for a while if it was possible to
56 measure how well this equipment is working together, and decided to
57 see how far I could get using free software. After trawling the web I
58 came across an article from DIY Audio and Video on
59 <a href=
"https://www.diyaudioandvideo.com/Tutorial/SpeakerResponseTesting/
">Speaker
60 Testing and Analysis
</a
> describing how to test speakers, and it listing
61 several software options, among them
62 <a href=
"https://sourceforge.net/projects/audmes/
">AUDio MEasurement
63 System (AUDMES)
</a
>. It is the only free software system I could find
64 focusing on measuring speakers and audio frequency response. In the
65 process I also found an interesting article from NOVO on
66 <a href=
"http://novo.press/understanding-speaker-specifications-and-frequency-response/
">Understanding
67 Speaker Specifications and Frequency Response
</a
> and an article from
69 <a href=
"https://www.ecoustics.com/articles/understanding-speaker-frequency-response/
">Understanding
70 Speaker Frequency Response
</a
>, with a lot of information on what to
71 look for and how to interpret the graphs. Armed with this knowledge,
72 I set out to measure the state of my speakers.
</p
>
74 <p
>The first hurdle was that AUDMES hadn
't seen a commit for
10 years
75 and did not build with current compilers and libraries. I got in
76 touch with its author, who no longer was spending time on the program
77 but gave me write access to the subversion repository on Sourceforge.
78 The end result is that now the code build on Linux and is capable of
79 saving and loading the collected frequency response data in CSV
80 format. The application is quite nice and flexible, and I was able to
81 select the input and output audio interfaces independently. This made
82 it possible to use a USB mixer as the input source, while sending
83 output via my laptop headphone connection. I lacked the hardware and
84 cabling to figure out a different way to get independent cabling to
85 speakers and microphone.
</p
>
87 <p
>Using this setup I could see how a large range of high frequencies
88 apparently were not making it out of my speakers. The picture show
89 the frequency response measurement of one of the speakers. Note the
90 frequency lines seem to be slightly misaligned, compared to the CSV
91 output from the program. I can not hear several of these are high
92 frequencies, according to measurement from
93 <a href=
"http://freehearingtestsoftware.com
">Free Hearing Test
94 Software
</a
>, an freeware system to measure your hearing (still
95 looking for a free software alternative), so I do not know if they are
96 coming out out the speakers. I thus do not quite know how to figure
97 out if the missing frequencies is a problem with the microphone, the
98 amplifier or the speakers, but I managed to rule out the audio card in my
99 PC by measuring my Bose noise canceling headset using its own
100 microphone. This setup was able to see the high frequency tones, so
101 the problem with my stereo had to be in the amplifier or speakers.
</p
>
103 <p
>Anyway, to try to role out one factor I ended up picking up a new
104 set of speakers at a flee marked, and these work a lot better than the
105 old speakers, so I guess the microphone and amplifier is OK. If you
106 need to measure your own speakers, check out AUDMES. If more people
107 get involved, perhaps the project could become good enough to
108 <a href=
"https://bugs.debian.org/
910876">include in Debian
</a
>? And if
109 you know of some other free software to measure speakers and amplifier
110 performance, please let me know. I am aware of the freeware option
111 <a href=
"https://www.roomeqwizard.com/
">REW
</a
>, but I want something
112 that can be developed also when the vendor looses interest.
</p
>
114 <p
>As usual, if you use Bitcoin and want to show your support of my
115 activities, please send Bitcoin donations to my address
116 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
121 <title>Web browser integration of VLC with Bittorrent support
</title>
122 <link>http://people.skolelinux.org/pere/blog/Web_browser_integration_of_VLC_with_Bittorrent_support.html
</link>
123 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Web_browser_integration_of_VLC_with_Bittorrent_support.html
</guid>
124 <pubDate>Sun,
21 Oct
2018 09:
50:
00 +
0200</pubDate>
125 <description><p
>Bittorrent is as far as I know, currently the most efficient way to
126 distribute content on the Internet. It is used all by all sorts of
127 content providers, from national TV stations like
128 <a href=
"https://www.nrk.no/
">NRK
</a
>, Linux distributors like
129 <a href=
"https://www.debian.org/
">Debian
</a
> and
130 <a href=
"https://www.ubuntu.com/
">Ubuntu
</a
>, and of course the
131 <a href=
"https://archive.org/
">Internet archive
</A
>.
133 <p
>Almost a month ago
134 <a href=
"https://tracker.debian.org/pkg/vlc-plugin-bittorrent
">a new
135 package adding Bittorrent support to VLC
</a
> became available in
136 Debian testing and unstable. To test it, simply install it like
140 apt install vlc-plugin-bittorrent
141 </pre
></p
>
143 <p
>Since the plugin was made available for the first time in Debian,
144 several improvements have been made to it. In version
2.2-
4, now
145 available in both testing and unstable, a desktop file is provided to
146 teach browsers to start VLC when the user click on torrent files or
147 magnet links. The last part is thanks to me finally understanding
148 what the strange x-scheme-handler style MIME types in desktop files
149 are used for. By adding x-scheme-handler/magnet to the MimeType entry
150 in the desktop file, at least the browsers Firefox and Chromium will
151 suggest to start VLC when selecting a magnet URI on a web page. The
152 end result is that now, with the plugin installed in Buster and Sid,
154 <a href=
"https://archive.org/details/CopyingIsNotTheft1080p
">Internet
155 Archive page with movies
</a
> using a web browser and click on the
156 torrent link to start streaming the movie.
</p
>
158 <p
>Note, there is still some misfeatures in the plugin. One is the
159 fact that it will hang and
160 <a href=
"https://github.com/johang/vlc-bittorrent/issues/
13">block VLC
161 from exiting until the torrent streaming starts
</a
>. Another is the
163 <a href=
"https://github.com/johang/vlc-bittorrent/issues/
9">will pick
164 and play a random file in a multi file torrent
</a
>. This is not
165 always the video file you want. Combined with the first it can be a
166 bit hard to get the video streaming going. But when it work, it seem
167 to do a good job.
</p
>
169 <p
>For the Debian packaging, I would love to find a good way to test
170 if the plugin work with VLC using autopkgtest. I tried, but do not
171 know enough of the inner workings of VLC to get it working. For now
172 the autopkgtest script is only checking if the .so file was
173 successfully loaded by VLC. If you have any suggestions, please
174 submit a patch to the Debian bug tracking system.
</p
>
176 <p
>As usual, if you use Bitcoin and want to show your support of my
177 activities, please send Bitcoin donations to my address
178 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
183 <title>Release
0.2 of free software archive system Nikita announced
</title>
184 <link>http://people.skolelinux.org/pere/blog/Release_0_2_of_free_software_archive_system_Nikita_announced.html
</link>
185 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Release_0_2_of_free_software_archive_system_Nikita_announced.html
</guid>
186 <pubDate>Thu,
18 Oct
2018 14:
40:
00 +
0200</pubDate>
187 <description><p
>This morning, the new release of the
188 <a href=
"https://gitlab.com/OsloMet-ABI/nikita-noark5-core/
">Nikita
189 Noark
5 core project
</a
> was
190 <a href=
"https://lists.nuug.no/pipermail/nikita-noark/
2018-October/
000406.html
">announced
191 on the project mailing list
</a
>. The free software solution is an
192 implementation of the Norwegian archive standard Noark
5 used by
193 government offices in Norway. These were the changes in version
0.2
194 since version
0.1.1 (from NEWS.md):
197 <li
>Fix typos in REL names
</li
>
198 <li
>Tidy up error message reporting
</li
>
199 <li
>Fix issue where we used Integer.valueOf(), not Integer.getInteger()
</li
>
200 <li
>Change some String handling to StringBuffer
</li
>
201 <li
>Fix error reporting
</li
>
202 <li
>Code tidy-up
</li
>
203 <li
>Fix issue using static non-synchronized SimpleDateFormat to avoid
204 race conditions
</li
>
205 <li
>Fix problem where deserialisers were treating integers as strings
</li
>
206 <li
>Update methods to make them null-safe
</li
>
207 <li
>Fix many issues reported by coverity
</li
>
208 <li
>Improve equals(), compareTo() and hash() in domain model
</li
>
209 <li
>Improvements to the domain model for metadata classes
</li
>
210 <li
>Fix CORS issues when downloading document
</li
>
211 <li
>Implementation of case-handling with registryEntry and document upload
</li
>
212 <li
>Better support in Javascript for OPTIONS
</li
>
213 <li
>Adding concept description of mail integration
</li
>
214 <li
>Improve setting of default values for GET on ny-journalpost
</li
>
215 <li
>Better handling of required values during deserialisation
</li
>
216 <li
>Changed tilknyttetDato (M620) from date to dateTime
</li
>
217 <li
>Corrected some opprettetDato (M600) (de)serialisation errors.
</li
>
218 <li
>Improve parse error reporting.
</li
>
219 <li
>Started on OData search and filtering.
</li
>
220 <li
>Added Contributor Covenant Code of Conduct to project.
</li
>
221 <li
>Moved repository and project from Github to Gitlab.
</li
>
222 <li
>Restructured repository, moved code into src/ and web/.
</li
>
223 <li
>Updated code to use Spring Boot version
2.
</li
>
224 <li
>Added support for OAuth2 authentication.
</li
>
225 <li
>Fixed several bugs discovered by Coverity.
</li
>
226 <li
>Corrected handling of date/datetime fields.
</li
>
227 <li
>Improved error reporting when rejecting during deserializatoin.
</li
>
228 <li
>Adjusted default values provided for ny-arkivdel, ny-mappe,
229 ny-saksmappe, ny-journalpost and ny-dokumentbeskrivelse.
</li
>
230 <li
>Several fixes for korrespondansepart*.
</li
>
231 <li
>Updated web GUI:
233 <li
>Now handle both file upload and download.
</li
>
234 <li
>Uses new OAuth2 authentication for login.
</li
>
235 <li
>Forms now fetches default values from API using GET.
</li
>
236 <li
>Added RFC
822 (email), TIFF and JPEG to list of possible file formats.
</li
>
237 </ul
></li
>
240 <p
>The changes and improvements are extensive. Running diffstat on
241 the changes between git tab
0.1.1 and
0.2 show
1098 files changed,
242 108666 insertions(+),
54066 deletions(-).
</p
>
244 <p
>If free and open standardized archiving API sound interesting to
245 you, please contact us on IRC
246 (
<a href=
"irc://irc.freenode.net/%
23nikita
">#nikita on
247 irc.freenode.net
</a
>) or email
248 (
<a href=
"https://lists.nuug.no/mailman/listinfo/nikita-noark
">nikita-noark
249 mailing list
</a
>).
</p
>
251 <p
>As usual, if you use Bitcoin and want to show your support of my
252 activities, please send Bitcoin donations to my address
253 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
258 <title>Fetching trusted timestamps using the rfc3161ng python module
</title>
259 <link>http://people.skolelinux.org/pere/blog/Fetching_trusted_timestamps_using_the_rfc3161ng_python_module.html
</link>
260 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Fetching_trusted_timestamps_using_the_rfc3161ng_python_module.html
</guid>
261 <pubDate>Mon,
8 Oct
2018 12:
30:
00 +
0200</pubDate>
262 <description><p
>I have earlier covered the basics of trusted timestamping using the
263 'openssl ts
' client. See blog post for
264 <a href=
"http://people.skolelinux.org/pere/blog/Public_Trusted_Timestamping_services_for_everyone.html
">2014</a
>,
265 <a href=
"http://people.skolelinux.org/pere/blog/syslog_trusted_timestamp___chain_of_trusted_timestamps_for_your_syslog.html
">2016</a
>
267 <a href=
"http://people.skolelinux.org/pere/blog/Idea_for_storing_trusted_timestamps_in_a_Noark_5_archive.html
">2017</a
>
268 for those stories. But some times I want to integrate the timestamping
269 in other code, and recently I needed to integrate it into Python.
270 After searching a bit, I found
271 <a href=
"https://dev.entrouvert.org/projects/python-rfc3161
">the
272 rfc3161 library
</a
> which seemed like a good fit, but I soon
273 discovered it only worked for python version
2, and I needed something
274 that work with python version
3. Luckily I next came across
275 <a href=
"https://github.com/trbs/rfc3161ng/
">the rfc3161ng library
</a
>,
276 a fork of the original rfc3161 library. Not only is it working with
277 python
3, it have fixed a few of the bugs in the original library, and
278 it has an active maintainer. I decided to wrap it up and make it
279 <a href=
"https://tracker.debian.org/pkg/python-rfc3161ng
">available in
280 Debian
</a
>, and a few days ago it entered Debian unstable and testing.
</p
>
282 <p
>Using the library is fairly straight forward. The only slightly
283 problematic step is to fetch the required certificates to verify the
284 timestamp. For some services it is straight forward, while for others
285 I have not yet figured out how to do it. Here is a small standalone
286 code example based on of the integration tests in the library code:
</p
>
293 Python
3 script demonstrating how to use the rfc3161ng module to
294 get trusted timestamps.
296 The license of this code is the same as the license of the rfc3161ng
302 import pyasn1.codec.der
306 import urllib.request
313 def fetch(url, f=None):
314 response = urllib.request.urlopen(url)
315 data = response.read()
321 with tempfile.NamedTemporaryFile() as cert_f,\
322 tempfile.NamedTemporaryFile() as ca_f,\
323 tempfile.NamedTemporaryFile() as msg_f,\
324 tempfile.NamedTemporaryFile() as tsr_f:
326 # First fetch certificates used by service
327 certificate_data = fetch(
'https://freetsa.org/files/tsa.crt
', cert_f)
328 ca_data_data = fetch(
'https://freetsa.org/files/cacert.pem
', ca_f)
330 # Then timestamp the message
332 rfc3161ng.RemoteTimestamper(
'http://freetsa.org/tsr
',
333 certificate=certificate_data)
334 data = b
"Python forever!\n
"
335 tsr = timestamper(data=data, return_tsr=True)
337 # Finally, convert message and response to something
'openssl ts
' can verify
339 store(tsr_f, pyasn1.codec.der.encoder.encode(tsr))
340 args = [
"openssl
",
"ts
",
"-verify
",
341 "-data
", msg_f.name,
342 "-in
", tsr_f.name,
343 "-CAfile
", ca_f.name,
344 "-untrusted
", cert_f.name]
345 subprocess.check_call(args)
347 if
'__main__
' == __name__:
351 <p
>The code fetches the required certificates, store them as temporary
352 files, timestamp a simple message, store the message and timestamp to
353 disk and ask
'openssl ts
' to verify the timestamp. A timestamp is
354 around
1.5 kiB in size, and should be fairly easy to store for future
357 <p
>As usual, if you use Bitcoin and want to show your support of my
358 activities, please send Bitcoin donations to my address
359 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
364 <title>Automatic Google Drive sync using grive in Debian
</title>
365 <link>http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html
</link>
366 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html
</guid>
367 <pubDate>Thu,
4 Oct
2018 15:
20:
00 +
0200</pubDate>
368 <description><p
>A few days, I rescued a Windows victim over to Debian. To try to
369 rescue the remains, I helped set up automatic sync with Google Drive.
370 I did not find any sensible Debian package handling this
371 automatically, so I rebuild the grive2 source from
372 <a href=
"http://www.webupd8.org/
">the Ubuntu UPD8 PPA
</a
> to do the
373 task and added a autostart desktop entry and a small shell script to
374 run in the background while the user is logged in to do the sync.
375 Here is a sketch of the setup for future reference.
</p
>
377 <p
>I first created
<tt
>~/googledrive
</tt
>, entered the directory and
378 ran
'<tt
>grive -a
</tt
>' to authenticate the machine/user. Next, I
379 created a autostart hook in
<tt
>~/.config/autostart/grive.desktop
</tt
>
380 to start the sync when the user log in:
</p
>
382 <p
><blockquote
><pre
>
384 Name=Google drive autosync
386 Exec=/home/user/bin/grive-sync
387 </pre
></blockquote
></p
>
389 <p
>Finally, I wrote the
<tt
>~/bin/grive-sync
</tt
> script to sync
390 ~/googledrive/ with the files in Google Drive.
</p
>
392 <p
><blockquote
><pre
>
397 if [
"$syncpid
" ] ; then
401 trap cleanup EXIT INT QUIT
402 /usr/lib/grive/grive-sync.sh listen googledrive
2>&1 | sed
"s%^%$
0:%
" &
405 if ! xhost
>/dev/null
2>&1 ; then
406 echo
"no DISPLAY, exiting as the user probably logged out
"
409 if [ ! -e /run/user/
1000/grive-sync.sh_googledrive ] ; then
410 /usr/lib/grive/grive-sync.sh sync googledrive
413 done
2>&1 | sed
"s%^%$
0:%
"
414 </pre
></blockquote
></p
>
416 <p
>Feel free to use the setup if you want. It can be assumed to be
417 GNU GPL v2 licensed (or any later version, at your leisure), but I
418 doubt this code is possible to claim copyright on.
</p
>
420 <p
>As usual, if you use Bitcoin and want to show your support of my
421 activities, please send Bitcoin donations to my address
422 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
427 <title>Valutakrambod - A python and bitcoin love story
</title>
428 <link>http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html
</link>
429 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html
</guid>
430 <pubDate>Sat,
29 Sep
2018 22:
20:
00 +
0200</pubDate>
431 <description><p
>It would come as no surprise to anyone that I am interested in
432 bitcoins and virtual currencies. I
've been keeping an eye on virtual
433 currencies for many years, and it is part of the reason a few months
434 ago, I started writing a python library for collecting currency
435 exchange rates and trade on virtual currency exchanges. I decided to
436 name the end result valutakrambod, which perhaps can be translated to
437 small currency shop.
</p
>
439 <p
>The library uses the tornado python library to handle HTTP and
440 websocket connections, and provide a asynchronous system for
441 connecting to and tracking several services. The code is available
443 <a href=
"http://github.com/petterreinholdtsen/valutakrambod
">github
</a
>.
</p
>
445 </p
>There are two example clients of the library. One is very simple and
446 list every updated buy/sell price received from the various services.
447 This code is started by running bin/btc-rates and call the client code
448 in valutakrambod/client.py. The simple client look like this:
</p
>
450 <p
><blockquote
><pre
>
452 import tornado.ioloop
454 class SimpleClient(object):
459 def newdata(self, service, pair, changed):
460 print(
"%-
15s %s-%s: %
8.3f %
8.3f
" % (
461 service.servicename(),
464 service.rates[pair][
'ask
'],
465 service.rates[pair][
'bid
'])
467 async def refresh(self, service):
468 await service.fetchRates(service.wantedpairs)
470 self.ioloop = tornado.ioloop.IOLoop.current()
471 self.services = valutakrambod.service.knownServices()
472 for e in self.services:
474 service.subscribe(self.newdata)
475 stream = service.websocket()
477 self.streams.append(stream)
479 # Fetch information from non-streaming services immediately
480 self.ioloop.call_later(len(self.services),
481 functools.partial(self.refresh, service))
482 # as well as regularly
483 service.periodicUpdate(
60)
484 for stream in self.streams:
488 except KeyboardInterrupt:
489 print(
"Interrupted by keyboard, closing all connections.
")
491 for stream in self.streams:
493 </pre
></blockquote
></p
>
495 <p
>The library client loops over all known
"public
" services,
496 initialises it, subscribes to any updates from the service, checks and
497 activates websocket streaming if the service provide it, and if no
498 streaming is supported, fetches information from the service and sets
499 up a periodic update every
60 seconds. The output from this client
500 can look like this:
</p
>
502 <p
><blockquote
><pre
>
503 Bl3p BTC-EUR:
5687.110 5653.690
504 Bl3p BTC-EUR:
5687.110 5653.690
505 Bl3p BTC-EUR:
5687.110 5653.690
506 Hitbtc BTC-USD:
6594.560 6593.690
507 Hitbtc BTC-USD:
6594.560 6593.690
508 Bl3p BTC-EUR:
5687.110 5653.690
509 Hitbtc BTC-USD:
6594.570 6593.690
510 Bitstamp EUR-USD:
1.159 1.154
511 Hitbtc BTC-USD:
6594.570 6593.690
512 Hitbtc BTC-USD:
6594.580 6593.690
513 Hitbtc BTC-USD:
6594.580 6593.690
514 Hitbtc BTC-USD:
6594.580 6593.690
515 Bl3p BTC-EUR:
5687.110 5653.690
516 Paymium BTC-EUR:
5680.000 5620.240
517 </pre
></blockquote
></p
>
519 <p
>The exchange order book is tracked in addition to the best buy/sell
520 price, for those that need to know the details.
</p
>
522 <p
>The other example client is focusing on providing a curses view
523 with updated buy/sell prices as soon as they are received from the
524 services. This code is located in bin/btc-rates-curses and activated
525 by using the
'-c
' argument. Without the argument the
"curses
" output
526 is printed without using curses, which is useful for debugging. The
527 curses view look like this:
</p
>
529 <p
><blockquote
><pre
>
530 Name Pair Bid Ask Spr Ftcd Age
531 BitcoinsNorway BTCEUR
5591.8400 5711.0800 2.1%
16 nan
60
532 Bitfinex BTCEUR
5671.0000 5671.2000 0.0%
16 22 59
533 Bitmynt BTCEUR
5580.8000 5807.5200 3.9%
16 41 60
534 Bitpay BTCEUR
5663.2700 nan nan%
15 nan
60
535 Bitstamp BTCEUR
5664.8400 5676.5300 0.2%
0 1 1
536 Bl3p BTCEUR
5653.6900 5684.9400 0.5%
0 nan
19
537 Coinbase BTCEUR
5600.8200 5714.9000 2.0%
15 nan nan
538 Kraken BTCEUR
5670.1000 5670.2000 0.0%
14 17 60
539 Paymium BTCEUR
5620.0600 5680.0000 1.1%
1 7515 nan
540 BitcoinsNorway BTCNOK
52898.9700 54034.6100 2.1%
16 nan
60
541 Bitmynt BTCNOK
52960.3200 54031.1900 2.0%
16 41 60
542 Bitpay BTCNOK
53477.7833 nan nan%
16 nan
60
543 Coinbase BTCNOK
52990.3500 54063.0600 2.0%
15 nan nan
544 MiraiEx BTCNOK
52856.5300 54100.6000 2.3%
16 nan nan
545 BitcoinsNorway BTCUSD
6495.5300 6631.5400 2.1%
16 nan
60
546 Bitfinex BTCUSD
6590.6000 6590.7000 0.0%
16 23 57
547 Bitpay BTCUSD
6564.1300 nan nan%
15 nan
60
548 Bitstamp BTCUSD
6561.1400 6565.6200 0.1%
0 2 1
549 Coinbase BTCUSD
6504.0600 6635.9700 2.0%
14 nan
117
550 Gemini BTCUSD
6567.1300 6573.0700 0.1%
16 89 nan
551 Hitbtc+BTCUSD
6592.6200 6594.2100 0.0%
0 0 0
552 Kraken BTCUSD
6565.2000 6570.9000 0.1%
15 17 58
553 Exchangerates EURNOK
9.4665 9.4665 0.0%
16 107789 nan
554 Norgesbank EURNOK
9.4665 9.4665 0.0%
16 107789 nan
555 Bitstamp EURUSD
1.1537 1.1593 0.5%
4 5 1
556 Exchangerates EURUSD
1.1576 1.1576 0.0%
16 107789 nan
557 BitcoinsNorway LTCEUR
1.0000 49.0000 98.0%
16 nan nan
558 BitcoinsNorway LTCNOK
492.4800 503.7500 2.2%
16 nan
60
559 BitcoinsNorway LTCUSD
1.0221 49.0000 97.9%
15 nan nan
560 Norgesbank USDNOK
8.1777 8.1777 0.0%
16 107789 nan
561 </pre
></blockquote
></p
>
563 <p
>The code for this client is too complex for a simple blog post, so
564 you will have to check out the git repository to figure out how it
565 work. What I can tell is how the three last numbers on each line
566 should be interpreted. The first is how many seconds ago information
567 was received from the service. The second is how long ago, according
568 to the service, the provided information was updated. The last is an
569 estimate on how often the buy/sell values change.
</p
>
571 <p
>If you find this library useful, or would like to improve it, I
572 would love to hear from you. Note that for some of the services I
've
573 implemented a trading API. It might be the topic of a future blog
576 <p
>As usual, if you use Bitcoin and want to show your support of my
577 activities, please send Bitcoin donations to my address
578 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
583 <title>VLC in Debian now can do bittorrent streaming
</title>
584 <link>http://people.skolelinux.org/pere/blog/VLC_in_Debian_now_can_do_bittorrent_streaming.html
</link>
585 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/VLC_in_Debian_now_can_do_bittorrent_streaming.html
</guid>
586 <pubDate>Mon,
24 Sep
2018 21:
20:
00 +
0200</pubDate>
587 <description><p
>Back in February, I got curious to see
588 <a href=
"http://people.skolelinux.org/pere/blog/Using_VLC_to_stream_bittorrent_sources.html
">if
589 VLC now supported Bittorrent streaming
</a
>. It did not, despite the
590 fact that the idea and code to handle such streaming had been floating
591 around for years. I did however find
592 <a href=
"https://github.com/johang/vlc-bittorrent
">a standalone plugin
593 for VLC
</a
> to do it, and half a year later I decided to wrap up the
594 plugin and get it into Debian. I uploaded it to NEW a few days ago,
595 and am very happy to report that it
596 <a href=
"https://tracker.debian.org/pkg/vlc-plugin-bittorrent
">entered
597 Debian
</a
> a few hours ago, and should be available in Debian/Unstable
598 tomorrow, and Debian/Testing in a few days.
</p
>
600 <p
>With the vlc-plugin-bittorrent package installed you should be able
601 to stream videos using a simple call to
</p
>
603 <p
><blockquote
><pre
>
604 vlc https://archive.org/download/TheGoat/TheGoat_archive.torrent
605 </pre
></blockquote
></p
>
607 </p
>It can handle magnet links too. Now if only native vlc had
608 bittorrent support. Then a lot more would be helping each other to
609 share public domain and creative commons movies. The plugin need some
610 stability work with seeking and picking the right file in a torrent
611 with many files, but is already usable. Please note that the plugin
612 is not removing downloaded files when vlc is stopped, so it can fill
613 up your disk if you are not careful. Have fun. :)
</p
>
615 <p
>I would love to get help maintaining this package. Get in touch if
616 you are interested.
</p
>
618 <p
>As usual, if you use Bitcoin and want to show your support of my
619 activities, please send Bitcoin donations to my address
620 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
625 <title>Using the Kodi API to play Youtube videos
</title>
626 <link>http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html
</link>
627 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html
</guid>
628 <pubDate>Sun,
2 Sep
2018 23:
40:
00 +
0200</pubDate>
629 <description><p
>I continue to explore my Kodi installation, and today I wanted to
630 tell it to play a youtube URL I received in a chat, without having to
631 insert search terms using the on-screen keyboard. After searching the
632 web for API access to the Youtube plugin and testing a bit, I managed
633 to find a recipe that worked. If you got a kodi instance with its API
634 available from http://kodihost/jsonrpc, you can try the following to
635 have check out a nice cover band.
</p
>
637 <p
><blockquote
><pre
>curl --silent --header
'Content-Type: application/json
' \
638 --data-binary
'{
"id
":
1,
"jsonrpc
":
"2.0",
"method
":
"Player.Open
",
639 "params
": {
"item
": {
"file
":
640 "plugin://plugin.video.youtube/play/?video_id=LuRGVM9O0qg
" } } }
' \
641 http://projector.local/jsonrpc
</pre
></blockquote
></p
>
643 <p
>I
've extended kodi-stream program to take a video source as its
644 first argument. It can now handle direct video links, youtube links
645 and
'desktop
' to stream my desktop to Kodi. It is almost like a
646 Chromecast. :)
</p
>
648 <p
>As usual, if you use Bitcoin and want to show your support of my
649 activities, please send Bitcoin donations to my address
650 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
655 <title>Software created using taxpayers’ money should be Free Software
</title>
656 <link>http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html
</link>
657 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html
</guid>
658 <pubDate>Thu,
30 Aug
2018 13:
50:
00 +
0200</pubDate>
659 <description><p
>It might seem obvious that software created using tax money should
660 be available for everyone to use and improve. Free Software
661 Foundation Europe recentlystarted a campaign to help get more people
662 to understand this, and I just signed the petition on
663 <a href=
"https://publiccode.eu/
">Public Money, Public Code
</a
> to help
664 them. I hope you too will do the same.
</p
>