<atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
<item>
- <title>Fortsatt ingen sikkerhetsoppdateringer for billettautomatene til kollektivtrafikken i Oslo?</title>
- <link>http://people.skolelinux.org/pere/blog/Fortsatt_ingen_sikkerhetsoppdateringer_for_billettautomatene_til_kollektivtrafikken_i_Oslo_.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Fortsatt_ingen_sikkerhetsoppdateringer_for_billettautomatene_til_kollektivtrafikken_i_Oslo_.html</guid>
- <pubDate>Tue, 29 Nov 2016 09:05:00 +0100</pubDate>
- <description><p><a href="http://people.skolelinux.org/pere/blog/Er_billettautomatene_til_kollektivtrafikken_i_Oslo_uten_sikkerhetsoppdateringer_.html">For
-fire og et halvt år siden</a> lot jeg meg overraske over at Ruters
-billettautomater for kollektivtrafikken i Oslo kjørte
-<a href="http://en.wikipedia.org/wiki/Windows_2000">Windows 2000
-Professional</a>, et og et halvt år etter at Microsoft hadde gitt
-beskjed om at det ikke lenger kom sikkerhetsoppdateringer til
-systemet. Støtten fra Microsoft
-<a href="http://support.microsoft.com/lifecycle/search/?sort=PN&alpha=Windows+2000&Filter=FilterNO">tok
-slutt 2010-07-13 i følge Wikipedia og Microsoft selv</a>.</p>
-
-<p>For fem dager siden passerte jeg på nytt en slik billettautomat som
-hadde brutt sammen, og den annonserte fortsatt at den kjører Windows
-2000 Professional, nå mer enn seks år siden Microsoft sluttet å komme
-med sikkerhetspatcher til produktet. Sikret meg et bilde av
-krasjmeldingen på skjermen.
-
-<p><a href="http://people.skolelinux.org/pere/blog/images/2016-11-29-ruter-win2000pro.jpeg"><img width="40%" src="http://people.skolelinux.org/pere/blog/images/2016-11-29-ruter-win2000pro.jpeg" alt="[foto av billettautomat]"></a></p>
-
-<p>Mon tro om de mangler kildekoden til systemet som kjører på
-automaten, og dermed ikke uten videre kan oppgradere?</p>
-
-<p>Jeg ser jo fra
-<a href="https://www.mimesbronn.no/request/ruterbillett_app">en
-innsynshenvendelse om kildekoden til billett-Appen til Ruter på Mimes
-brønn</a> at Ruter tilsynelatende ikke legger sikkerheten i
-sertifikater, nøkler og passord, men i stedet baserer seg på at
-logikken i programvaren holdes hemmelig. Det borger ikke godt for
-sikkerheten i Ruters datasystemer.
-
-<p>Det er nå tre og et halvt år siden
-<a href="http://www.aftenposten.no/osloby/Ingen-nye-Ruter-automater-for-sommeren-118460b.html">Ruter
-fortalte Aftenposten at nye automater ble minst seks måneder
-forsinket</a>, da leverandøren ikke hadde god nok kontroll. Det kan
-virke som om leverandøren ikke er alene om å ikke ha god nok
-kontroll.</p>
-
-<p>Bildet er tilgjengelig for bruk med bruksvilkårene til
-<a href="http://creativecommons.org/licenses/by/3.0/no/">Creative
-Commons Navngivelse 3.0 Norge (CC BY 3.0)</a>.</p>
-
-<p>Oppdatering 2016-12-01: Saken har fått omtale på
-<a href="http://www.digi.no/artikler/petter-advarte-selskapet-allerede-i-2012-da-systemkraesjen-dukket-opp-igjen-pa-tirsdag-ble-han-svaert-overrasket/365613">digi.no</a>
-og
-<a href="https://nrkbeta.no/2016/12/01/mener-oslos-billettsystem-er-en-tikkende-bombe/">NRK
-Beta</a>.</p>
+ <title>Retten til kontant betaling er en rettighet som må brukes for å beholdes</title>
+ <link>http://people.skolelinux.org/pere/blog/Retten_til_kontant_betaling_er_en_rettighet_som_m__brukes_for___beholdes.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Retten_til_kontant_betaling_er_en_rettighet_som_m__brukes_for___beholdes.html</guid>
+ <pubDate>Tue, 11 Dec 2018 10:00:00 +0100</pubDate>
+ <description><p><a href="https://www.fn.no/Om-FN/Avtaler/Menneskerettigheter/FNs-verdenserklaering-om-menneskerettigheter">FNs
+menneskerettighetserklæring</a> artikkel 13 første punkt lyder som
+følger:</p>
+
+<p><blockquote>
+Enhver har rett til å bevege seg fritt og til fritt å velge
+oppholdssted innenfor en stats grenser.
+</blockquote></p>
+
+<p>Det er altså en menneskerett å kunne bevege seg fritt i landet.
+For å bevege seg fritt i landet, så må en kunne bevege seg uten å bli
+sporet. Det vil i dagens samfunn innebære å bevege seg uten å legge
+igjen digitale spor og uten å være radiomerket. Hvis en vet at ens
+bevegelser, hvor en befinner seg når, og hvem som befinner seg i
+nærheten, blir samlet inn og gjort tilgjengelig for fremmede, det være
+seg myndighetene eller private organisasjoner, så kan en ikke lenger
+bevege seg fritt. Dette gjør at det er en forutsetning for å ha glede
+av retten til å bevege seg fritt i landet at en motstår fristelsen til
+å legge igjen digitale spor når en betaler for seg. Rettigheter som
+ikke blir brukt, blit fjernet. Den eneste måten i dag å unngå å legge
+igjen digitale spor når en betaler for seg, er å betale med kontanter,
+samt takke nei til å legge igjen navn og adresse (slik f.eks. Elkjøp
+ber om &mdash; jeg sier de kan legge inn 'anonym anonym' når
+datasystemet deres trenger et navn). Personlig bruker jeg derfor
+konsekvent kontant betaling når jeg beveger meg rundt, for å bidra med
+mitt for å forsvare menneskerettighetene i Norge. Kanskje noe også
+for deg? Merk at det ikke er tilstrekkelig for å unngå sporing å
+betale med kontanter, men det er et lite steg i riktig retning.</p>
+
+<p>Det er flere andre argumenter i tillegg til
+menneskerettighetsargumentet for å bruke kontanter. I går hadde
+Dagbladet en utmerket kommentar av sin journalist John Olav Egeland om
+hvilket
+<a href="https://www.dagbladet.no/kultur/kontantlost-diktatur/70543434">kontantløst
+diktatur</a> som venter oss hvis mange nok slutter å insistere på å
+betale med kontanter. Jeg anbefaler deg å lese den.</p>
+
+<p>Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
+det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
+til min adresse
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.
+Merk, betaling med bitcoin er ikke anonymt. :)</p>
</description>
</item>
<item>
- <title>Quicker Debian installations using eatmydata</title>
- <link>http://people.skolelinux.org/pere/blog/Quicker_Debian_installations_using_eatmydata.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Quicker_Debian_installations_using_eatmydata.html</guid>
- <pubDate>Fri, 25 Nov 2016 14:50:00 +0100</pubDate>
- <description><p>Two years ago, I did some experiments with eatmydata and the Debian
-installation system, observing how using
-<a href="http://people.skolelinux.org/pere/blog/Speeding_up_the_Debian_installer_using_eatmydata_and_dpkg_divert.html">eatmydata
-could speed up the installation</a> quite a bit. My testing measured
-speedup around 20-40 percent for Debian Edu, where we install around
-1000 packages from within the installer. The eatmydata package
-provide a way to disable/delay file system flushing. This is a bit
-risky in the general case, as files that should be stored on disk will
-stay only in memory a bit longer than expected, causing problems if a
-machine crashes at an inconvenient time. But for an installation, if
-the machine crashes during installation the process is normally
-restarted, and avoiding disk operations as much as possible to speed
-up the process make perfect sense.
-
-<p>I added code in the Debian Edu specific installation code to enable
-<a href="https://tracker.debian.org/pkg/libeatmydata">eatmydata</a>,
-but did not have time to push it any further. But a few months ago I
-picked it up again and worked with the libeatmydata package maintainer
-Mattia Rizzolo to make it easier for everyone to get this installation
-speedup in Debian. Thanks to our cooperation There is now an
-eatmydata-udeb package in Debian testing and unstable, and simply
-enabling/installing it in debian-installer (d-i) is enough to get the
-quicker installations. It can be enabled using preseeding. The
-following untested kernel argument should do the trick:</p>
-
-<blockquote><pre>
-preseed/early_command="anna-install eatmydata-udeb"
-</pre></blockquote>
-
-<p>This should ask d-i to install the package inside the d-i
-environment early in the installation sequence. Having it installed
-in d-i in turn will make sure the relevant scripts are called just
-after debootstrap filled /target/ with the freshly installed Debian
-system to configure apt to run dpkg with eatmydata. This is enough to
-speed up the installation process. There is a proposal to
-<a href="https://bugs.debian.org/841153">extend the idea a bit further
-by using /etc/ld.so.preload instead of apt.conf</a>, but I have not
-tested its impact.</p>
+ <title>Why is your site not using Content Security Policy / CSP?</title>
+ <link>http://people.skolelinux.org/pere/blog/Why_is_your_site_not_using_Content_Security_Policy___CSP_.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Why_is_your_site_not_using_Content_Security_Policy___CSP_.html</guid>
+ <pubDate>Sun, 9 Dec 2018 15:00:00 +0100</pubDate>
+ <description><p>Yesterday, I had the pleasure of watching on Frikanalen the OWASP
+talk by Scott Helme titled
+"<a href="https://frikanalen.no/video/626080/">What We’ve Learned From
+Billions of Security Reports</a>". I had not heard of the
+<a href="https://en.wikipedia.org/wiki/Content_Security_Policy">Content
+Security Policy standard</a> nor its ability to "call home" when a
+browser detect a policy breach (I do not follow web page design
+development much these days), and found the talk very illuminating.</p>
+
+<p>The mechanism allow a web site owner to use HTTP headers to tell
+visitors web browser which sources (internal and external) are allowed to
+be used on the web site. Thus it become possible to enforce a "only
+local content" policy despite web designers urge to fetch programs
+from random sites on the Internet, like the one
+<a href="https://securityaffairs.co/wordpress/68966/hacking/browsealoud-plugin-hack.html">enabling
+the attack</a> reported by Scott Helme earlier this year.</p>
+
+<p>Using CSP seem like an obvious thing for a site admin to implement
+to take some control over the information leak that occur when
+external sources are used to render web pages, it is a mystery more
+sites are not using CSP? It is being
+<a href="https://www.w3.org/TR/CSP/">standardized under W3C</a> these
+days, and is supposed by most web browsers</p>
+
+<p>I managed to find <a href="https://github.com/mozilla/django-csp">a
+Django middleware for implementing CSP</a> and was happy to discover
+it was already in Debian. I plan to use it to add CSP support to the
+Frikanalen web site soon.</p>
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>
<item>
- <title>Oversette bokmål til nynorsk, enklere enn du tror takket være Apertium</title>
- <link>http://people.skolelinux.org/pere/blog/Oversette_bokm_l_til_nynorsk__enklere_enn_du_tror_takket_v_re_Apertium.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Oversette_bokm_l_til_nynorsk__enklere_enn_du_tror_takket_v_re_Apertium.html</guid>
- <pubDate>Thu, 24 Nov 2016 10:50:00 +0100</pubDate>
- <description><p>I Norge er det mange som trenger å skrive både bokmål og nynorsk.
-Eksamensoppgaver, offentlige brev og nyheter er eksempler på tekster
-der det er krav om skriftspråk. I tillegg til alle skoleoppgavene som
-elever over det ganske land skal levere inn hvert år. Det mange ikke
-vet er at selv om de kommersielle alternativene
-<a href="https://translate.google.com/">Google Translate</a> og
-<a href="https://www.bing.com/translator/">Bing Translator</a> ikke kan
-bidra med å oversette mellom bokmål og nynorsk, så finnes det et
-utmerket fri programvarealternativ som kan. Oversetterverktøyet
-Apertium har støtte for en rekke språkkombinasjoner, og takket være
-den utrettelige innsatsen til blant annet Kevin Brubeck Unhammer, kan
-en bruke webtjenesten til å fylle inn en tekst på bokmål eller
-nynorsk, og få den automatoversatt til det andre skriftspråket.
-Resultatet er ikke perfekt, men et svært godt utgangspunkt. Av og til
-er resultatet så bra at det kan benyttes uten endringer. Jeg vet
-f.eks. at store deler av Joomla ble oversatt til nynorsk ved hjelp
-Apertium. Høres det ut som noe du kan ha bruk for? Besøk i så fall
-<a href="https://www.apertium.org/">Apertium.org</a> og fyll inn
-teksten din i webskjemaet der.
-
-<p>Hvis du trenger maskinell tilgang til den bakenforliggende
-teknologien kan du enten installere pakken
-<a href="https://tracker.debian.org/apertium-nno-nob">apertium-nno-nob</a>
-på en Debian-maskin eller bruke web-API-et tilgjengelig fra
-api.apertium.org. Se
-<a href="http://wiki.apertium.org/wiki/Apertium-apy">API-dokumentasjonen</a>
-for detaljer om web-API-et. Her kan du se hvordan resultatet blir for
-denne teksten som ble skrevet på bokmål over maskinoversatt til
-nynorsk.</p>
-
-<hr/>
-
-<p>I Noreg er det mange som treng å skriva både bokmål og nynorsk.
-Eksamensoppgåver, offentlege brev og nyhende er døme på tekster der
-det er krav om skriftspråk. I tillegg til alle skuleoppgåvene som
-elevar over det ganske land skal levera inn kvart år. Det mange ikkje
-veit er at sjølv om dei kommersielle alternativa
-<a href="https://translate.google.com/">Google *Translate</a> og
-<a href="https://www.bing.com/translator/">Bing *Translator</a> ikkje
-kan bidra med å omsetja mellom bokmål og nynorsk, så finst det eit
-utmerka fri programvarealternativ som kan. Omsetjarverktøyet
-*Apertium har støtte for ei rekkje språkkombinasjonar, og takka vera
-den utrøyttelege innsatsen til blant anna Kevin Brubeck Unhammer, kan
-ein bruka *webtjenesten til å fylla inn ei tekst på bokmål eller
-nynorsk, og få den *automatoversatt til det andre skriftspråket.
-Resultatet er ikkje perfekt, men eit svært godt utgangspunkt. Av og
-til er resultatet så bra at det kan nyttast utan endringar. Eg veit
-t.d. at store delar av *Joomla vart omsett til nynorsk ved hjelp
-*Apertium. Høyrast det ut som noko du kan ha bruk for? Besøk i så
-fall <a href="https://www.apertium.org/">*Apertium.org</a> og fyll inn
-teksta di i *webskjemaet der.
-
-<p>Viss du treng *maskinell tilgjenge til den *bakenforliggende
-teknologien kan du anten installera pakken
-<a href="https://tracker.debian.org/apertium-nno-nob">*apertium-*nno-*nob</a>
-på ein *Debian-maskin eller bruka *web-*API-eit tilgjengeleg frå
-*api.*apertium.org. Sjå
-<a href="http://wiki.apertium.org/wiki/Apertium-apy">*API-dokumentasjonen</a>
-for detaljar om *web-*API-eit. Her kan du sjå korleis resultatet vert
-for denne teksta som vart skreva på bokmål over *maskinoversatt til
-nynorsk.</p>
+ <title>New and improved Frikanalen Kodi addon version 0.0.3</title>
+ <link>http://people.skolelinux.org/pere/blog/New_and_improved_Frikanalen_Kodi_addon_version_0_0_3.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/New_and_improved_Frikanalen_Kodi_addon_version_0_0_3.html</guid>
+ <pubDate>Thu, 8 Nov 2018 10:30:00 +0100</pubDate>
+ <description><p>If you read my blog regularly, you probably know I am involved in
+running and developing the <a href="https://frikanalen.no/">Norwegian
+TV channel Frikanalen</a>. It is an open channel, allowing everyone
+in Norway to publish videos on a TV channel with national coverage.
+You can think of it as Youtube for national television.
+In addition to distribution on RiksTV and Uninett, Frikanalen is also
+available as a Kodi addon. The last few days I have updated the code
+to add more features. A
+<a href="https://kodi.tv/addon/plugins-video-add-ons/frikanalen-nett-tv">new
+and improved version 0.0.3 Frikanalen addon</a> was just made
+available via the Kodi repositories. This new version include a
+option to browse videos by category, as well as free text search
+in the video archive. It will now also show the video duration in the
+video lists, which were missing earlier. A new and experimental
+link to the HD video stream currently being worked on is provided, for
+those that want to see what the <a href="https://casparcg.com/">CasparCG</a>
+output look like. The alternative is the SD video stream, generated
+using MLT. CasparCG is controlled by our
+<a href="https://github.com/Frikanalen/mltplayout/">mltplayout
+server</a> which instead of talking to mlt is giving PLAY instructions
+to the CasparCG server when it is time to start a new program.</p>
+
+<p>By now, you are probably wondering what kind of content is being
+played on the channel. These days, it is filled with technical
+presentations like those from <a href="https://www.nuug.no/">NUUG</a>,
+<a href="https://www.debconf.org/">Debconf</a>, Makercon, and TED,
+but there are also some periods with
+<a href="https://www.empo.no/">EMPT TV</a> and
+<a href="https://www.p7.no/">P7</a>.
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>
<item>
- <title>Hyperions magasin Pegasus går for Creative Commons</title>
- <link>http://people.skolelinux.org/pere/blog/Hyperions_magasin_Pegasus_g_r_for_Creative_Commons.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Hyperions_magasin_Pegasus_g_r_for_Creative_Commons.html</guid>
- <pubDate>Tue, 22 Nov 2016 20:10:00 +0100</pubDate>
- <description><p>For noen dager siden ble jeg tipset av min venn Andreas
-Aanerud om at <a href="http://magasinetpegasus.no">magasinet
-Pegasus</a> skulle ta i bruk
-<a href="https://creativecommons.org/">Creative
-Commons</a>-lisensiering på sine artikler. Han fortalte at den
-direkte årsaken var at han hadde blitt inspirert av å lese
-<a href=" http://www.lulu.com/shop/http://www.lulu.com/shop/lawrence-lessig/fri-kultur/paperback/product-22441576.html">boken
-Fri kultur</a>
-(<a href="https://github.com/petterreinholdtsen/free-culture-lessig">github</a>)
-og foreslått endringen. Jeg ble veldig glad for å høre
-dette, da det er det første konkrete tilfellet jeg har hørt om der den
-norske oversettelsen av <a href="http://www.free-culture.cc/">
-Lawrence Lessigs bok Free Culture</a> som jeg ga ut i fjor høst hadde
-fått noen til å ta i bruk Creative Commons.</p>
-
-<p>Andreas fikk boken av meg som takk for at han inviterte meg til
-<a href="http://www.gathering.org/">The Gathering</a>, og jeg er veldig
-glad for at den falt i smak. Jeg ble nysgjerrig på hva som var
-bakgrunnen for denne policy-endringen hos Hyperion og han sa seg
-villig til å la seg intervjue til bloggen min. </p>
-
-<blockquote>
-
-<p><strong>Hvilke tanker gjorde du deg da boken lå i hånden første
-gang?</strong></p>
-
-<p>Jeg husker da jeg fikk boken, etter en omvisning på The Gathering i
-2016, der jeg var Core Organizer. The Gathering er jo et sted hvor en
-fremmer delingskultur, i alt fra kode, til løsninger og «hacks», så en
-kan vel si at boken er veldig relevant!</p>
-
-<p>Mine første tanker om boken, var at den trengte et grafisk løft.
-Selv har jeg dysleksi og er ikke verdens beste i å lese, men for meg
-så skal ikke det bety at jeg ikke klarer å lese. Jeg har jo også mine
-egne tanker om «Fri kultur», ettersom jeg har jobbet med noen norske
-filmer via NRK og TV2 og nå sitter som en teknisk leder i
-filmavdelingen til Schjærven Reklamebyrå.</p>
-
-<p><strong>Har du lest boken, og hva tenker du om den nå?</strong></p>
-
-<p>Jeg har lest boken, og for meg er det jo veldig moro å kunne si at
-Disney var en pirat og nå ha bevisene. Men det å gå fra Disney via
-RIAA, og så igjennom en jungel av teknikk og programmering og ende opp
-med spørsmålet om vi alle piratkopierer litt, er enda bedre. For ja,
-boken klarer å få frem en diskusjon om åndsverk på en god måte
-gjennom en samling historier, men den viste meg også et bilde, hvor
-teknologi blir kneblet, og ikke får lov til å utvikle seg, ettersom
-«opphavsrettsinnehaverne» bryr seg mer om sin industri enn om verden
-går fremover. Ta f.eks. internettradio! Hvorfor tuller vi med DAB+
-og alt det der, når radio kan være en app på alle telefoner i dag.
-Men den største tanken som jeg satt igjen med, er at vi må få færre
-advokater og flere tenkere som kan dra oss vekk fra de feilene vi er i
-ferd med å ende opp i.</p>
-
-<p><strong>Har budskapet i boken påvirker deg og det du holder på
-med?</strong></p>
-
-<p>The Gathering sin moderforening er
-<a href="http://www.kandu.no/">KANDU</a>, som er et stolt medlem av <a
-href="http://n4f.no/">Hyperion</a>. Hyperion har et mandat igjennom
-sitt interne magasin Pegasus å fremme Hyperion sine
-medlemsarrangementer og kultur. Dette tror jeg er veldig viktig, og en
-av de viktigste virkemidlene det magasinet nå har fått, er pålegget om
-å publisere alt under de forskjellige Creative Commons
-retningslinjer. Grunnen til at Pegasus kan velge fritt blant lisensene
-til Creative Commons er deres bruk av freelancere m.m. som også må få
-sine rettigheter dekket.</p>
-
-<p>Det er et steg i riktig retning som jeg håper, vil gi lokalaviser,
-nasjonale aviser, bloggere m.m. muligheten til å referere til Pegasus
-sitt innhold uten å måtte be om tillatelse først, som i bunnen vil
-hjelpe oss å spre vår kultur i Hyperion.</p>
-
-<p><strong>Hva fikk Pegasus til å vedta retninglinjer om bruk av
-Creative Commons, og hvordan kom dere frem til en slik
-policy?</strong></p>
-
-<p>Dette skjedde på Hyperion sitt landsting, hvor jeg ønsket å fremme
-Creative Commons som en retning som flere mener magasinet burde ta,
-hvordan Pegasus tar det i bruk er mer opp til redaksjonen. Det som var
-trist er at en del har misforstått hva Creative Commons er. Vi fikk
-en veldig het «debatt» på facebook i etterkant hvor noen blant annet
-mener at dette vedtaket har drept Pegasus.</p>
-
-<p>Personlig syntes jeg disse reaksjonene er rare, ettersom Pegasus er
-et medlemsmagasin og magasinet sitt mål er å spre vår fantastiske
-kultur. Jeg mener at Ceative Commons-bruksvilkår på artikler skaper
-en veldig god mulighet til å spre denne kulturen. Det gjør at større
-og mindre aviser kan låne artikler fra medlemsmagasinet og publisere
-det hos seg, slik at effekten nettopp er fremme vår kultur.</p>
-
-<p>Jeg gleder meg til å se hvordan redaksjonen håndhever bruken av
-Creative Commons.</p>
-
-<p><strong>Hvem tror du kunne ha mest nytte av å lese Fri
-kultur?</strong></p>
-
-<p>Jeg tror at boken Fri kultur bør leses av de som ønsker en debatt
-om nye medier, samt de som jobber med medier og føler seg «truet» av
-utviklingen. Kanskje det kan være et lysglimt om at vi må heller være
-med å utvikle oss, enn å stoppe opp og «beskytte» våre eier-, penge-
-og materielle interesser.</p>
-
-<p>Spørsmålet for redaksjoner vil vel være om de «tjener» på klikk og
-sine artikler via annonser, i så fall ville jeg tenkt litt rundt
-spredningen. Nettavisen Digi.no gjorde en analyse i 2015 som var
-veldig fin. Hvor de måtte konkludere med at de fikk ut budskapet
-bedre, men de mistet inntekter på annonsevisning.</p>
-
-<p>Derfor for et magasin som skal «spre» kultur, så burde Creative
-Commons være en no-brainer, en kunne også kanskje argumentere med at
-NRK også burde gjøre dette, ettersom de ikke lever av reklame, og vi
-betaler for innholdet deres.</p>
-
-<p><strong>Kommer du til å anbefale boken til noen du
-kjenner?</strong></p>
-
-<p>Absolutt! Jeg har faktisk tenkt å gi den videre som en vandrebok,
-til redaksjonen i Pegasus slik at de kan lese den og få noen ider og
-tanker om fri kultur.</p>
-
-<p><strong>Du sier at boken klarer å få frem viktig en diskusjon om
- vern av åndsverk. Boken er jo skrevet med bakgrunn i USAs
- Copyright-lovgiving og ikke den norske åndsverksloven. Hva gjør at
- du mener boken er relevant for den norske debatten?</strong></p>
-
-<p>En av tingene boken pekte på var tanken om hvor opphavsretten skal
-ligge. Skal den ligge hos den som skriver sangen, den som fremfører
-eller den som tar opp sangen. Og når spørsmålet kom tilbake i en
-software-utgave, «hvordan kan Adobe styre opphavsretten i sin eBook
-Publisher» så føler jeg at vi kommer inn på spennende tanker som jeg
-mener vi glemmer i norsk åndsverksdebatt. USA har rett å slett et
-«større bilde» som kanskje vi kan ta lærdom av.</p>
-
-</blockquote>
-
-<p>Jeg er veldig spent på hvordan redaksjonen i Pegasus kommer til å
-ta i bruk Creative Commons, og gleder meg til neste tegn på at
-bokutgivelsen har fått noen til å tenke mer på problemene med dagens
-åndsverksvern.</p>
+ <title>Time for an official MIME type for patches?</title>
+ <link>http://people.skolelinux.org/pere/blog/Time_for_an_official_MIME_type_for_patches_.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Time_for_an_official_MIME_type_for_patches_.html</guid>
+ <pubDate>Thu, 1 Nov 2018 08:15:00 +0100</pubDate>
+ <description><p>As part of my involvement in
+<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core">the Nikita
+archive API project</a>, I've been importing a fairly large lump of
+emails into a test instance of the archive to see how well this would
+go. I picked a subset of <a href="https://notmuchmail.org/">my
+notmuch email database</a>, all public emails sent to me via
+@lists.debian.org, giving me a set of around 216 000 emails to import.
+In the process, I had a look at the various attachments included in
+these emails, to figure out what to do with attachments, and noticed
+that one of the most common attachment formats do not have
+<a href="https://www.iana.org/assignments/media-types/media-types.xhtml">an
+official MIME type</a> registered with IANA/IETF. The output from
+diff, ie the input for patch, is on the top 10 list of formats
+included in these emails. At the moment people seem to use either
+text/x-patch or text/x-diff, but neither is officially registered. It
+would be better if one official MIME type were registered and used
+everywhere.</p>
+
+<p>To try to get one official MIME type for these files, I've brought
+up the topic on
+<a href="https://www.ietf.org/mailman/listinfo/media-types">the
+media-types mailing list</a>. If you are interested in discussion
+which MIME type to use as the official for patch files, or involved in
+making software using a MIME type for patches, perhaps you would like
+to join the discussion?</p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>
<item>
- <title>Coz profiler for multi-threaded software is now in Debian</title>
- <link>http://people.skolelinux.org/pere/blog/Coz_profiler_for_multi_threaded_software_is_now_in_Debian.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Coz_profiler_for_multi_threaded_software_is_now_in_Debian.html</guid>
- <pubDate>Sun, 13 Nov 2016 12:30:00 +0100</pubDate>
- <description><p><a href="http://coz-profiler.org/">The Coz profiler</a>, a nice
-profiler able to run benchmarking experiments on the instrumented
-multi-threaded program, finally
-<a href="https://tracker.debian.org/pkg/coz-profiler">made it into
-Debian unstable yesterday</A>. Lluís Vilanova and I have spent many
-months since
-<a href="http://people.skolelinux.org/pere/blog/Coz_can_help_you_find_bottlenecks_in_multi_threaded_software___nice_free_software.html">I
-blogged about the coz tool</a> in August working with upstream to make
-it suitable for Debian. There are still issues with clang
-compatibility, inline assembly only working x86 and minimized
-JavaScript libraries.</p>
-
-<p>To test it, install 'coz-profiler' using apt and run it like this:</p>
-
-<p><blockquote>
-<tt>coz run --- /path/to/binary-with-debug-info</tt>
-</blockquote></p>
+ <title>Measuring the speaker frequency response using the AUDMES free software GUI - nice free software</title>
+ <link>http://people.skolelinux.org/pere/blog/Measuring_the_speaker_frequency_response_using_the_AUDMES_free_software_GUI___nice_free_software.html</link>
+ <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>
+ <pubDate>Mon, 22 Oct 2018 08:40:00 +0200</pubDate>
+ <description><p><img src="http://people.skolelinux.org/pere/blog/images/2018-10-22-audmes-measure-speakers.png" align="right" width="40%"/></p>
+
+<p>My current home stereo is a patchwork of various pieces I got on
+flee markeds over the years. It is amazing what kind of equipment
+show up there. I've been wondering for a while if it was possible to
+measure how well this equipment is working together, and decided to
+see how far I could get using free software. After trawling the web I
+came across an article from DIY Audio and Video on
+<a href="https://www.diyaudioandvideo.com/Tutorial/SpeakerResponseTesting/">Speaker
+Testing and Analysis</a> describing how to test speakers, and it listing
+several software options, among them
+<a href="https://sourceforge.net/projects/audmes/">AUDio MEasurement
+System (AUDMES)</a>. It is the only free software system I could find
+focusing on measuring speakers and audio frequency response. In the
+process I also found an interesting article from NOVO on
+<a href="http://novo.press/understanding-speaker-specifications-and-frequency-response/">Understanding
+Speaker Specifications and Frequency Response</a> and an article from
+ecoustics on
+<a href="https://www.ecoustics.com/articles/understanding-speaker-frequency-response/">Understanding
+Speaker Frequency Response</a>, with a lot of information on what to
+look for and how to interpret the graphs. Armed with this knowledge,
+I set out to measure the state of my speakers.</p>
+
+<p>The first hurdle was that AUDMES hadn't seen a commit for 10 years
+and did not build with current compilers and libraries. I got in
+touch with its author, who no longer was spending time on the program
+but gave me write access to the subversion repository on Sourceforge.
+The end result is that now the code build on Linux and is capable of
+saving and loading the collected frequency response data in CSV
+format. The application is quite nice and flexible, and I was able to
+select the input and output audio interfaces independently. This made
+it possible to use a USB mixer as the input source, while sending
+output via my laptop headphone connection. I lacked the hardware and
+cabling to figure out a different way to get independent cabling to
+speakers and microphone.</p>
+
+<p>Using this setup I could see how a large range of high frequencies
+apparently were not making it out of my speakers. The picture show
+the frequency response measurement of one of the speakers. Note the
+frequency lines seem to be slightly misaligned, compared to the CSV
+output from the program. I can not hear several of these are high
+frequencies, according to measurement from
+<a href="http://freehearingtestsoftware.com">Free Hearing Test
+Software</a>, an freeware system to measure your hearing (still
+looking for a free software alternative), so I do not know if they are
+coming out out the speakers. I thus do not quite know how to figure
+out if the missing frequencies is a problem with the microphone, the
+amplifier or the speakers, but I managed to rule out the audio card in my
+PC by measuring my Bose noise canceling headset using its own
+microphone. This setup was able to see the high frequency tones, so
+the problem with my stereo had to be in the amplifier or speakers.</p>
+
+<p>Anyway, to try to role out one factor I ended up picking up a new
+set of speakers at a flee marked, and these work a lot better than the
+old speakers, so I guess the microphone and amplifier is OK. If you
+need to measure your own speakers, check out AUDMES. If more people
+get involved, perhaps the project could become good enough to
+<a href="https://bugs.debian.org/910876">include in Debian</a>? And if
+you know of some other free software to measure speakers and amplifier
+performance, please let me know. I am aware of the freeware option
+<a href="https://www.roomeqwizard.com/">REW</a>, but I want something
+that can be developed also when the vendor looses interest.</p>
-<p>This will produce a profile.coz file in the current working
-directory with the profiling information. This is then given to a
-JavaScript application provided in the package and available from
-<a href="http://plasma-umass.github.io/coz/">a project web page</a>.
-To start the local copy, invoke it in a browser like this:</p>
-
-<p><blockquote>
-<tt>sensible-browser /usr/share/coz-profiler/viewer/index.htm</tt>
-</blockquote></p>
-
-<p>See the project home page and the
-<a href="https://www.usenix.org/publications/login/summer2016/curtsinger">USENIX
-;login: article on Coz</a> for more information on how it is
-working.</p>
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>
<item>
- <title>How to talk with your loved ones in private</title>
- <link>http://people.skolelinux.org/pere/blog/How_to_talk_with_your_loved_ones_in_private.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/How_to_talk_with_your_loved_ones_in_private.html</guid>
- <pubDate>Mon, 7 Nov 2016 10:25:00 +0100</pubDate>
- <description><p>A few days ago I ran a very biased and informal survey to get an
-idea about what options are being used to communicate with end to end
-encryption with friends and family. I explicitly asked people not to
-list options only used in a work setting. The background is the
-uneasy feeling I get when using Signal, a feeling shared by others as
-a blog post from Sander Venima about
-<a href="https://sandervenema.ch/2016/11/why-i-wont-recommend-signal-anymore/">why
-he do not recommend Signal anymore</a> (with
-<a href="https://news.ycombinator.com/item?id=12883410">feedback from
-the Signal author available from ycombinator</a>). I wanted an
-overview of the options being used, and hope to include those options
-in a less biased survey later on. So far I have not taken the time to
-look into the individual proposed systems. They range from text
-sharing web pages, via file sharing and email to instant messaging,
-VOIP and video conferencing. For those considering which system to
-use, it is also useful to have a look at
-<a href="https://www.eff.org/secure-messaging-scorecard">the EFF Secure
-messaging scorecard</a> which is slightly out of date but still
-provide valuable information.</p>
-
-<p>So, on to the list. There were some used by many, some used by a
-few, some rarely used ones and a few mentioned but without anyone
-claiming to use them. Notice the grouping is in reality quite random
-given the biased self selected set of participants. First the ones
-used by many:</p>
-
-<ul>
-
-<li><a href="https://whispersystems.org/">Signal</a></li>
-<li>Email w/<a href="http://openpgp.org/">OpenPGP</a> (Enigmail, GPGSuite,etc)</li>
-<li><a href="https://www.whatsapp.com/">Whatsapp</a></li>
-<li>IRC w/<a href="https://otr.cypherpunks.ca/">OTR</a></li>
-<li>XMPP w/<a href="https://otr.cypherpunks.ca/">OTR</a></li>
-
-</ul>
-
-<p>Then the ones used by a few.</p>
-
-<ul>
+ <title>Web browser integration of VLC with Bittorrent support</title>
+ <link>http://people.skolelinux.org/pere/blog/Web_browser_integration_of_VLC_with_Bittorrent_support.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Web_browser_integration_of_VLC_with_Bittorrent_support.html</guid>
+ <pubDate>Sun, 21 Oct 2018 09:50:00 +0200</pubDate>
+ <description><p>Bittorrent is as far as I know, currently the most efficient way to
+distribute content on the Internet. It is used all by all sorts of
+content providers, from national TV stations like
+<a href="https://www.nrk.no/">NRK</a>, Linux distributors like
+<a href="https://www.debian.org/">Debian</a> and
+<a href="https://www.ubuntu.com/">Ubuntu</a>, and of course the
+<a href="https://archive.org/">Internet archive</A>.
+
+<p>Almost a month ago
+<a href="https://tracker.debian.org/pkg/vlc-plugin-bittorrent">a new
+package adding Bittorrent support to VLC</a> became available in
+Debian testing and unstable. To test it, simply install it like
+this:</p>
+
+<p><pre>
+apt install vlc-plugin-bittorrent
+</pre></p>
+
+<p>Since the plugin was made available for the first time in Debian,
+several improvements have been made to it. In version 2.2-4, now
+available in both testing and unstable, a desktop file is provided to
+teach browsers to start VLC when the user click on torrent files or
+magnet links. The last part is thanks to me finally understanding
+what the strange x-scheme-handler style MIME types in desktop files
+are used for. By adding x-scheme-handler/magnet to the MimeType entry
+in the desktop file, at least the browsers Firefox and Chromium will
+suggest to start VLC when selecting a magnet URI on a web page. The
+end result is that now, with the plugin installed in Buster and Sid,
+one can visit any
+<a href="https://archive.org/details/CopyingIsNotTheft1080p">Internet
+Archive page with movies</a> using a web browser and click on the
+torrent link to start streaming the movie.</p>
+
+<p>Note, there is still some misfeatures in the plugin. One is the
+fact that it will hang and
+<a href="https://github.com/johang/vlc-bittorrent/issues/13">block VLC
+from exiting until the torrent streaming starts</a>. Another is the
+fact that it
+<a href="https://github.com/johang/vlc-bittorrent/issues/9">will pick
+and play a random file in a multi file torrent</a>. This is not
+always the video file you want. Combined with the first it can be a
+bit hard to get the video streaming going. But when it work, it seem
+to do a good job.</p>
+
+<p>For the Debian packaging, I would love to find a good way to test
+if the plugin work with VLC using autopkgtest. I tried, but do not
+know enough of the inner workings of VLC to get it working. For now
+the autopkgtest script is only checking if the .so file was
+successfully loaded by VLC. If you have any suggestions, please
+submit a patch to the Debian bug tracking system.</p>
-<li><a href="https://wiki.mumble.info/wiki/Main_Page">Mumble</a></li>
-<li>iMessage (included in iOS from Apple)</li>
-<li><a href="https://telegram.org/">Telegram</a></li>
-<li><a href="https://jitsi.org/">Jitsi</a></li>
-<li><a href="https://keybase.io/download">Keybase file</a></li>
-
-</ul>
-
-<p>Then the ones used by even fewer people</p>
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+</description>
+ </item>
+
+ <item>
+ <title>Release 0.2 of free software archive system Nikita announced</title>
+ <link>http://people.skolelinux.org/pere/blog/Release_0_2_of_free_software_archive_system_Nikita_announced.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Release_0_2_of_free_software_archive_system_Nikita_announced.html</guid>
+ <pubDate>Thu, 18 Oct 2018 14:40:00 +0200</pubDate>
+ <description><p>This morning, the new release of the
+<a href="https://gitlab.com/OsloMet-ABI/nikita-noark5-core/">Nikita
+Noark 5 core project</a> was
+<a href="https://lists.nuug.no/pipermail/nikita-noark/2018-October/000406.html">announced
+on the project mailing list</a>. The free software solution is an
+implementation of the Norwegian archive standard Noark 5 used by
+government offices in Norway. These were the changes in version 0.2
+since version 0.1.1 (from NEWS.md):
<ul>
-
-<li><a href="https://ring.cx/">Ring</a></li>
-<li><a href="https://bitmessage.org/">Bitmessage</a></li>
-<li><a href="https://wire.com/">Wire</a></li>
-<li>VoIP w/<a href="https://en.wikipedia.org/wiki/ZRTP">ZRTP</a> or controlled <a href="https://en.wikipedia.org/wiki/Secure_Real-time_Transport_Protocol">SRTP</a> (e.g using <a href="https://en.wikipedia.org/wiki/CSipSimple">CSipSimple</a>, <a href="https://en.wikipedia.org/wiki/Linphone">Linphone</a>)</li>
-<li><a href="https://matrix.org/">Matrix</a></li>
-<li><a href="https://kontalk.org/">Kontalk</a></li>
-<li><a href="https://0bin.net/">0bin</a> (encrypted pastebin)</li>
-<li><a href="https://appear.in">Appear.in</a></li>
-<li><a href="https://riot.im/">riot</a></li>
-<li><a href="https://www.wickr.com/">Wickr Me</a></li>
-
+ <li>Fix typos in REL names</li>
+ <li>Tidy up error message reporting</li>
+ <li>Fix issue where we used Integer.valueOf(), not Integer.getInteger()</li>
+ <li>Change some String handling to StringBuffer</li>
+ <li>Fix error reporting</li>
+ <li>Code tidy-up</li>
+ <li>Fix issue using static non-synchronized SimpleDateFormat to avoid
+ race conditions</li>
+ <li>Fix problem where deserialisers were treating integers as strings</li>
+ <li>Update methods to make them null-safe</li>
+ <li>Fix many issues reported by coverity</li>
+ <li>Improve equals(), compareTo() and hash() in domain model</li>
+ <li>Improvements to the domain model for metadata classes</li>
+ <li>Fix CORS issues when downloading document</li>
+ <li>Implementation of case-handling with registryEntry and document upload</li>
+ <li>Better support in Javascript for OPTIONS</li>
+ <li>Adding concept description of mail integration</li>
+ <li>Improve setting of default values for GET on ny-journalpost</li>
+ <li>Better handling of required values during deserialisation </li>
+ <li>Changed tilknyttetDato (M620) from date to dateTime</li>
+ <li>Corrected some opprettetDato (M600) (de)serialisation errors.</li>
+ <li>Improve parse error reporting.</li>
+ <li>Started on OData search and filtering.</li>
+ <li>Added Contributor Covenant Code of Conduct to project.</li>
+ <li>Moved repository and project from Github to Gitlab.</li>
+ <li>Restructured repository, moved code into src/ and web/.</li>
+ <li>Updated code to use Spring Boot version 2.</li>
+ <li>Added support for OAuth2 authentication.</li>
+ <li>Fixed several bugs discovered by Coverity.</li>
+ <li>Corrected handling of date/datetime fields.</li>
+ <li>Improved error reporting when rejecting during deserializatoin.</li>
+ <li>Adjusted default values provided for ny-arkivdel, ny-mappe,
+ ny-saksmappe, ny-journalpost and ny-dokumentbeskrivelse.</li>
+ <li>Several fixes for korrespondansepart*.</li>
+ <li>Updated web GUI:
+ <ul>
+ <li>Now handle both file upload and download.</li>
+ <li>Uses new OAuth2 authentication for login.</li>
+ <li>Forms now fetches default values from API using GET.</li>
+ <li>Added RFC 822 (email), TIFF and JPEG to list of possible file formats.</li>
+ </ul></li>
</ul>
-<p>And finally the ones mentioned by not marked as used by
-anyone. This might be a mistake, perhaps the person adding the entry
-forgot to flag it as used?</p>
-
-<ul>
-
-<li>Email w/Certificates <a href="https://en.wikipedia.org/wiki/S/MIME">S/MIME</a></li>
-<li><a href="https://www.crypho.com/">Crypho</a></li>
-<li><a href="https://cryptpad.fr/">CryptPad</a></li>
-<li><a href="https://github.com/ricochet-im/ricochet">ricochet</a></li>
+<p>The changes and improvements are extensive. Running diffstat on
+the changes between git tab 0.1.1 and 0.2 show 1098 files changed,
+108666 insertions(+), 54066 deletions(-).</p>
-</ul>
+<p>If free and open standardized archiving API sound interesting to
+you, please contact us on IRC
+(<a href="irc://irc.freenode.net/%23nikita">#nikita on
+irc.freenode.net</a>) or email
+(<a href="https://lists.nuug.no/mailman/listinfo/nikita-noark">nikita-noark
+mailing list</a>).</p>
-<p>Given the network effect it seem obvious to me that we as a society
-have been divided and conquered by those interested in keeping
-encrypted and secure communication away from the masses. The
-finishing remarks <a href="https://vimeo.com/97505679">from Aral Balkan
-in his talk "Free is a lie"</a> about the usability of free software
-really come into effect when you want to communicate in private with
-your friends and family. We can not expect them to allow the
-usability of communication tool to block their ability to talk to
-their loved ones.</p>
-
-<p>Note for example the option IRC w/OTR. Most IRC clients do not
-have OTR support, so in most cases OTR would not be an option, even if
-you wanted to. In my personal experience, about 1 in 20 I talk to
-have a IRC client with OTR. For private communication to really be
-available, most people to talk to must have the option in their
-currently used client. I can not simply ask my family to install an
-IRC client. I need to guide them through a technical multi-step
-process of adding extensions to the client to get them going. This is
-a non-starter for most.</p>
-
-<p>I would like to be able to do video phone calls, audio phone calls,
-exchange instant messages and share files with my loved ones, without
-being forced to share with people I do not know. I do not want to
-share the content of the conversations, and I do not want to share who
-I communicate with or the fact that I communicate with someone.
-Without all these factors in place, my private life is being more or
-less invaded.</p>
-</description>
- </item>
-
- <item>
- <title>My own self balancing Lego Segway</title>
- <link>http://people.skolelinux.org/pere/blog/My_own_self_balancing_Lego_Segway.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/My_own_self_balancing_Lego_Segway.html</guid>
- <pubDate>Fri, 4 Nov 2016 10:15:00 +0100</pubDate>
- <description><p>A while back I received a Gyro sensor for the NXT
-<a href="mindstorms.lego.com">Mindstorms</a> controller as a birthday
-present. It had been on my wishlist for a while, because I wanted to
-build a Segway like balancing lego robot. I had already built
-<a href="http://www.nxtprograms.com/NXT2/segway/">a simple balancing
-robot</a> with the kids, using the light/color sensor included in the
-NXT kit as the balance sensor, but it was not working very well. It
-could balance for a while, but was very sensitive to the light
-condition in the room and the reflective properties of the surface and
-would fall over after a short while. I wanted something more robust,
-and had
-<a href="https://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NGY1044">the
-gyro sensor from HiTechnic</a> I believed would solve it on my
-wishlist for some years before it suddenly showed up as a gift from my
-loved ones. :)</p>
-
-<p>Unfortunately I have not had time to sit down and play with it
-since then. But that changed some days ago, when I was searching for
-lego segway information and came across a recipe from HiTechnic for
-building
-<a href="http://www.hitechnic.com/blog/gyro-sensor/htway/">the
-HTWay</a>, a segway like balancing robot. Build instructions and
-<a href="https://www.hitechnic.com/upload/786-HTWayC.nxc">source
-code</a> was included, so it was just a question of putting it all
-together. And thanks to the great work of many Debian developers, the
-compiler needed to build the source for the NXT is already included in
-Debian, so I was read to go in less than an hour. The resulting robot
-do not look very impressive in its simplicity:</p>
-
-<p align="center"><img width="70%" src="http://people.skolelinux.org/pere/blog/images/2016-11-04-lego-htway-robot.jpeg"></p>
-
-<p>Because I lack the infrared sensor used to control the robot in the
-design from HiTechnic, I had to comment out the last task
-(taskControl). I simply placed /* and */ around it get the program
-working without that sensor present. Now it balances just fine until
-the battery status run low:</p>
-
-<p align="center"><video width="70%" controls="true">
- <source src="http://people.skolelinux.org/pere/blog/images/2016-11-04-lego-htway-balancing.ogv" type="video/ogg">
-</video></p>
-
-<p>Now we would like to teach it how to follow a line and take remote
-control instructions using the included Bluetooth receiver in the NXT.</p>
-
-<p>If you, like me, love LEGO and want to make sure we find the tools
-they need to work with LEGO in Debian and all our derivative
-distributions like Ubuntu, check out
-<a href="http://wiki.debian.org/LegoDesigners">the LEGO designers
-project page</a> and join the Debian LEGO team. Personally I own a
-RCX and NXT controller (no EV3), and would like to make sure the
-Debian tools needed to program the systems I own work as they
-should.</p>
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>
<item>
- <title>Aktivitetsbånd som beskytter privatsfæren</title>
- <link>http://people.skolelinux.org/pere/blog/Aktivitetsb_nd_som_beskytter_privatsf_ren.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Aktivitetsb_nd_som_beskytter_privatsf_ren.html</guid>
- <pubDate>Thu, 3 Nov 2016 09:55:00 +0100</pubDate>
- <description><p>Jeg ble så imponert over
-<a href="https://www.nrk.no/norge/forbrukerradet-mener-aktivitetsarmband-strider-mot-norsk-lov-1.13209079">dagens
-gladnyhet på NRK</a>, om at Forbrukerrådet klager inn vilkårene for
-bruk av aktivitetsbånd fra Fitbit, Garmin, Jawbone og Mio til
-Datatilsynet og forbrukerombudet, at jeg sendte følgende brev til
-forbrukerrådet for å uttrykke min støtte:
-
-<blockquote>
-
-<p>Jeg ble veldig glad over å lese at Forbrukerrådet
-<a href="http://www.forbrukerradet.no/siste-nytt/klager-inn-aktivitetsarmband-for-brudd-pa-norsk-lov/">klager
-inn flere aktivitetsbånd til Datatilsynet for dårlige vilkår</a>. Jeg
-har ønsket meg et aktivitetsbånd som kan måle puls, bevegelse og
-gjerne også andre helserelaterte indikatorer en stund nå. De eneste
-jeg har funnet i salg gjør, som dere også har oppdaget, graverende
-inngrep i privatsfæren og sender informasjonen ut av huset til folk og
-organisasjoner jeg ikke ønsker å dele aktivitets- og helseinformasjon
-med. Jeg ønsker et alternativ som <em>ikke</em> sender informasjon til
-skyen, men derimot bruker
-<a href="http://people.skolelinux.org/pere/blog/Fri_og__pen_standard__slik_Digistan_ser_det.html">en
-fritt og åpent standardisert</a> protokoll (eller i det minste en
-dokumentert protokoll uten patent- og opphavsrettslige
-bruksbegrensinger) til å kommunisere med datautstyr jeg kontrollerer.
-Er jo ikke interessert i å betale noen for å tilrøve seg
-personopplysninger fra meg. Desverre har jeg ikke funnet noe
-alternativ så langt.</p>
-
-<p>Det holder ikke å endre på bruksvilkårene for enhetene, slik
-Datatilsynet ofte legger opp til i sin behandling, når de gjør slik
-f.eks. Fitbit (den jeg har sett mest på). Fitbit krypterer
-informasjonen på enheten og sender den kryptert til leverandøren. Det
-gjør det i praksis umulig både å sjekke hva slags informasjon som
-sendes over, og umulig å ta imot informasjonen selv i stedet for
-Fitbit. Uansett hva slags historie som forteller i bruksvilkårene er
-en jo både prisgitt leverandørens godvilje og at de ikke tvinges av
-sitt lands myndigheter til å lyve til sine kunder om hvorvidt
-personopplysninger spres ut over det bruksvilkårene sier. Det er
-veldokumentert hvordan f.eks. USA tvinger selskaper vha. såkalte
-National security letters til å utlevere personopplysninger samtidig
-som de ikke får lov til å fortelle dette til kundene sine.</p>
-
-<p>Stå på, jeg er veldig glade for at dere har sett på saken. Vet
-dere om aktivitetsbånd i salg i dag som ikke tvinger en til å utlevere
-aktivitets- og helseopplysninger med leverandøren?</p>
-
-</blockquote>
-
-<p>Jeg håper en konkurrent som respekterer kundenes privatliv klarer å
-nå opp i markedet, slik at det finnes et reelt alternativ for oss som
-har full tillit til at skyleverandører vil prioritere egen inntjening
-og myndighetspålegg langt foran kundenes rett til privatliv. Jeg har
-ingen tiltro til at Datatilsynet vil kreve noe mer enn at vilkårene
-endres slik at de forklarer eksplisitt i hvor stor grad bruk av
-produktene utraderer privatsfæren til kundene. Det vil nok gjøre de
-innklagede armbåndene «lovlige», men fortsatt tvinge kundene til å
-dele sine personopplysninger med leverandøren.</p>
+ <title>Fetching trusted timestamps using the rfc3161ng python module</title>
+ <link>http://people.skolelinux.org/pere/blog/Fetching_trusted_timestamps_using_the_rfc3161ng_python_module.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Fetching_trusted_timestamps_using_the_rfc3161ng_python_module.html</guid>
+ <pubDate>Mon, 8 Oct 2018 12:30:00 +0200</pubDate>
+ <description><p>I have earlier covered the basics of trusted timestamping using the
+'openssl ts' client. See blog post for
+<a href="http://people.skolelinux.org/pere/blog/Public_Trusted_Timestamping_services_for_everyone.html">2014</a>,
+<a href="http://people.skolelinux.org/pere/blog/syslog_trusted_timestamp___chain_of_trusted_timestamps_for_your_syslog.html">2016</a>
+and
+<a href="http://people.skolelinux.org/pere/blog/Idea_for_storing_trusted_timestamps_in_a_Noark_5_archive.html">2017</a>
+for those stories. But some times I want to integrate the timestamping
+in other code, and recently I needed to integrate it into Python.
+After searching a bit, I found
+<a href="https://dev.entrouvert.org/projects/python-rfc3161">the
+rfc3161 library</a> which seemed like a good fit, but I soon
+discovered it only worked for python version 2, and I needed something
+that work with python version 3. Luckily I next came across
+<a href="https://github.com/trbs/rfc3161ng/">the rfc3161ng library</a>,
+a fork of the original rfc3161 library. Not only is it working with
+python 3, it have fixed a few of the bugs in the original library, and
+it has an active maintainer. I decided to wrap it up and make it
+<a href="https://tracker.debian.org/pkg/python-rfc3161ng">available in
+Debian</a>, and a few days ago it entered Debian unstable and testing.</p>
+
+<p>Using the library is fairly straight forward. The only slightly
+problematic step is to fetch the required certificates to verify the
+timestamp. For some services it is straight forward, while for others
+I have not yet figured out how to do it. Here is a small standalone
+code example based on of the integration tests in the library code:</p>
+
+<pre>
+#!/usr/bin/python3
+
+"""
+
+Python 3 script demonstrating how to use the rfc3161ng module to
+get trusted timestamps.
+
+The license of this code is the same as the license of the rfc3161ng
+library, ie MIT/BSD.
+
+"""
+
+import os
+import pyasn1.codec.der
+import rfc3161ng
+import subprocess
+import tempfile
+import urllib.request
+
+def store(f, data):
+ f.write(data)
+ f.flush()
+ f.seek(0)
+
+def fetch(url, f=None):
+ response = urllib.request.urlopen(url)
+ data = response.read()
+ if f:
+ store(f, data)
+ return data
+
+def main():
+ with tempfile.NamedTemporaryFile() as cert_f,\
+ tempfile.NamedTemporaryFile() as ca_f,\
+ tempfile.NamedTemporaryFile() as msg_f,\
+ tempfile.NamedTemporaryFile() as tsr_f:
+
+ # First fetch certificates used by service
+ certificate_data = fetch('https://freetsa.org/files/tsa.crt', cert_f)
+ ca_data_data = fetch('https://freetsa.org/files/cacert.pem', ca_f)
+
+ # Then timestamp the message
+ timestamper = \
+ rfc3161ng.RemoteTimestamper('http://freetsa.org/tsr',
+ certificate=certificate_data)
+ data = b"Python forever!\n"
+ tsr = timestamper(data=data, return_tsr=True)
+
+ # Finally, convert message and response to something 'openssl ts' can verify
+ store(msg_f, data)
+ store(tsr_f, pyasn1.codec.der.encoder.encode(tsr))
+ args = ["openssl", "ts", "-verify",
+ "-data", msg_f.name,
+ "-in", tsr_f.name,
+ "-CAfile", ca_f.name,
+ "-untrusted", cert_f.name]
+ subprocess.check_call(args)
+
+if '__main__' == __name__:
+ main()
+</pre>
+
+<p>The code fetches the required certificates, store them as temporary
+files, timestamp a simple message, store the message and timestamp to
+disk and ask 'openssl ts' to verify the timestamp. A timestamp is
+around 1.5 kiB in size, and should be fairly easy to store for future
+use.</p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>
<item>
- <title>Experience and updated recipe for using the Signal app without a mobile phone</title>
- <link>http://people.skolelinux.org/pere/blog/Experience_and_updated_recipe_for_using_the_Signal_app_without_a_mobile_phone.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Experience_and_updated_recipe_for_using_the_Signal_app_without_a_mobile_phone.html</guid>
- <pubDate>Mon, 10 Oct 2016 11:30:00 +0200</pubDate>
- <description><p>In July
-<a href="http://people.skolelinux.org/pere/blog/How_to_use_the_Signal_app_if_you_only_have_a_land_line__ie_no_mobile_phone_.html">I
-wrote how to get the Signal Chrome/Chromium app working</a> without
-the ability to receive SMS messages (aka without a cell phone). It is
-time to share some experiences and provide an updated setup.</p>
-
-<p>The Signal app have worked fine for several months now, and I use
-it regularly to chat with my loved ones. I had a major snag at the
-end of my summer vacation, when the the app completely forgot my
-setup, identity and keys. The reason behind this major mess was
-running out of disk space. To avoid that ever happening again I have
-started storing everything in <tt>userdata/</tt> in git, to be able to
-roll back to an earlier version if the files are wiped by mistake. I
-had to use it once after introducing the git backup. When rolling
-back to an earlier version, one need to use the 'reset session' option
-in Signal to get going, and notify the people you talk with about the
-problem. I assume there is some sequence number tracking in the
-protocol to detect rollback attacks. The git repository is rather big
-(674 MiB so far), but I have not tried to figure out if some of the
-content can be added to a .gitignore file due to lack of spare
-time.</p>
-
-<p>I've also hit the 90 days timeout blocking, and noticed that this
-make it impossible to send messages using Signal. I could still
-receive them, but had to patch the code with a new timestamp to send.
-I believe the timeout is added by the developers to force people to
-upgrade to the latest version of the app, even when there is no
-protocol changes, to reduce the version skew among the user base and
-thus try to keep the number of support requests down.</p>
-
-<p>Since my original recipe, the Signal source code changed slightly,
-making the old patch fail to apply cleanly. Below is an updated
-patch, including the shell wrapper I use to start Signal. The
-original version required a new user to locate the JavaScript console
-and call a function from there. I got help from a friend with more
-JavaScript knowledge than me to modify the code to provide a GUI
-button instead. This mean that to get started you just need to run
-the wrapper and click the 'Register without mobile phone' to get going
-now. I've also modified the timeout code to always set it to 90 days
-in the future, to avoid having to patch the code regularly.</p>
-
-<p>So, the updated recipe for Debian Jessie:</p>
-
-<ol>
-
-<li>First, install required packages to get the source code and the
-browser you need. Signal only work with Chrome/Chromium, as far as I
-know, so you need to install it.
-
-<pre>
-apt install git tor chromium
-git clone https://github.com/WhisperSystems/Signal-Desktop.git
-</pre></li>
-
-<li>Modify the source code using command listed in the the patch
-block below.</li>
-
-<li>Start Signal using the run-signal-app wrapper (for example using
-<tt>`pwd`/run-signal-app</tt>).
-
-<li>Click on the 'Register without mobile phone', will in a phone
-number you can receive calls to the next minute, receive the
-verification code and enter it into the form field and press
-'Register'. Note, the phone number you use will be user Signal
-username, ie the way others can find you on Signal.</li>
-
-<li>You can now use Signal to contact others. Note, new contacts do
-not show up in the contact list until you restart Signal, and there is
-no way to assign names to Contacts. There is also no way to create or
-update chat groups. I suspect this is because the web app do not have
-a associated contact database.</li>
-
-</ol>
-
-<p>I am still a bit uneasy about using Signal, because of the way its
-main author moxie0 reject federation and accept dependencies to major
-corporations like Google (part of the code is fetched from Google) and
-Amazon (the central coordination point is owned by Amazon). See for
-example
-<a href="https://github.com/LibreSignal/LibreSignal/issues/37">the
-LibreSignal issue tracker</a> for a thread documenting the authors
-view on these issues. But the network effect is strong in this case,
-and several of the people I want to communicate with already use
-Signal. Perhaps we can all move to <a href="https://ring.cx/">Ring</a>
-once it <a href="https://bugs.debian.org/830265">work on my
-laptop</a>? It already work on Windows and Android, and is included
-in <a href="https://tracker.debian.org/pkg/ring">Debian</a> and
-<a href="https://launchpad.net/ubuntu/+source/ring">Ubuntu</a>, but not
-working on Debian Stable.</p>
-
-<p>Anyway, this is the patch I apply to the Signal code to get it
-working. It switch to the production servers, disable to timeout,
-make registration easier and add the shell wrapper:</p>
-
-<pre>
-cd Signal-Desktop; cat &lt;&lt;EOF | patch -p1
-diff --git a/js/background.js b/js/background.js
-index 24b4c1d..579345f 100644
---- a/js/background.js
-+++ b/js/background.js
-@@ -33,9 +33,9 @@
- });
- });
-
-- var SERVER_URL = 'https://textsecure-service-staging.whispersystems.org';
-+ var SERVER_URL = 'https://textsecure-service-ca.whispersystems.org';
- var SERVER_PORTS = [80, 4433, 8443];
-- var ATTACHMENT_SERVER_URL = 'https://whispersystems-textsecure-attachments-staging.s3.amazonaws.com';
-+ var ATTACHMENT_SERVER_URL = 'https://whispersystems-textsecure-attachments.s3.amazonaws.com';
- var messageReceiver;
- window.getSocketStatus = function() {
- if (messageReceiver) {
-diff --git a/js/expire.js b/js/expire.js
-index 639aeae..beb91c3 100644
---- a/js/expire.js
-+++ b/js/expire.js
-@@ -1,6 +1,6 @@
- ;(function() {
- 'use strict';
-- var BUILD_EXPIRATION = 0;
-+ var BUILD_EXPIRATION = Date.now() + (90 * 24 * 60 * 60 * 1000);
-
- window.extension = window.extension || {};
-
-diff --git a/js/views/install_view.js b/js/views/install_view.js
-index 7816f4f..1d6233b 100644
---- a/js/views/install_view.js
-+++ b/js/views/install_view.js
-@@ -38,7 +38,8 @@
- return {
- 'click .step1': this.selectStep.bind(this, 1),
- 'click .step2': this.selectStep.bind(this, 2),
-- 'click .step3': this.selectStep.bind(this, 3)
-+ 'click .step3': this.selectStep.bind(this, 3),
-+ 'click .callreg': function() { extension.install('standalone') },
- };
- },
- clearQR: function() {
-diff --git a/options.html b/options.html
-index dc0f28e..8d709f6 100644
---- a/options.html
-+++ b/options.html
-@@ -14,7 +14,10 @@
- &lt;div class='nav'>
- &lt;h1>{{ installWelcome }}&lt;/h1>
- &lt;p>{{ installTagline }}&lt;/p>
-- &lt;div> &lt;a class='button step2'>{{ installGetStartedButton }}&lt;/a> &lt;/div>
-+ &lt;div> &lt;a class='button step2'>{{ installGetStartedButton }}&lt;/a>
-+ &lt;br> &lt;a class="button callreg">Register without mobile phone&lt;/a>
-+
-+ &lt;/div>
- &lt;span class='dot step1 selected'>&lt;/span>
- &lt;span class='dot step2'>&lt;/span>
- &lt;span class='dot step3'>&lt;/span>
---- /dev/null 2016-10-07 09:55:13.730181472 +0200
-+++ b/run-signal-app 2016-10-10 08:54:09.434172391 +0200
-@@ -0,0 +1,12 @@
-+#!/bin/sh
-+set -e
-+cd $(dirname $0)
-+mkdir -p userdata
-+userdata="`pwd`/userdata"
-+if [ -d "$userdata" ] && [ ! -d "$userdata/.git" ] ; then
-+ (cd $userdata && git init)
-+fi
-+(cd $userdata && git add . && git commit -m "Current status." || true)
-+exec chromium \
-+ --proxy-server="socks://localhost:9050" \
-+ --user-data-dir=$userdata --load-and-launch-app=`pwd`
-EOF
-chmod a+rx run-signal-app
-</pre>
+ <title>Automatic Google Drive sync using grive in Debian</title>
+ <link>http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Automatic_Google_Drive_sync_using_grive_in_Debian.html</guid>
+ <pubDate>Thu, 4 Oct 2018 15:20:00 +0200</pubDate>
+ <description><p>A few days, I rescued a Windows victim over to Debian. To try to
+rescue the remains, I helped set up automatic sync with Google Drive.
+I did not find any sensible Debian package handling this
+automatically, so I rebuild the grive2 source from
+<a href="http://www.webupd8.org/">the Ubuntu UPD8 PPA</a> to do the
+task and added a autostart desktop entry and a small shell script to
+run in the background while the user is logged in to do the sync.
+Here is a sketch of the setup for future reference.</p>
+
+<p>I first created <tt>~/googledrive</tt>, entered the directory and
+ran '<tt>grive -a</tt>' to authenticate the machine/user. Next, I
+created a autostart hook in <tt>~/.config/autostart/grive.desktop</tt>
+to start the sync when the user log in:</p>
+
+<p><blockquote><pre>
+[Desktop Entry]
+Name=Google drive autosync
+Type=Application
+Exec=/home/user/bin/grive-sync
+</pre></blockquote></p>
+
+<p>Finally, I wrote the <tt>~/bin/grive-sync</tt> script to sync
+~/googledrive/ with the files in Google Drive.</p>
+
+<p><blockquote><pre>
+#!/bin/sh
+set -e
+cd ~/
+cleanup() {
+ if [ "$syncpid" ] ; then
+ kill $syncpid
+ fi
+}
+trap cleanup EXIT INT QUIT
+/usr/lib/grive/grive-sync.sh listen googledrive 2>&1 | sed "s%^%$0:%" &
+syncpdi=$!
+while true; do
+ if ! xhost >/dev/null 2>&1 ; then
+ echo "no DISPLAY, exiting as the user probably logged out"
+ exit 1
+ fi
+ if [ ! -e /run/user/1000/grive-sync.sh_googledrive ] ; then
+ /usr/lib/grive/grive-sync.sh sync googledrive
+ fi
+ sleep 300
+done 2>&1 | sed "s%^%$0:%"
+</pre></blockquote></p>
+
+<p>Feel free to use the setup if you want. It can be assumed to be
+GNU GPL v2 licensed (or any later version, at your leisure), but I
+doubt this code is possible to claim copyright on.</p>
<p>As usual, if you use Bitcoin and want to show your support of my
activities, please send Bitcoin donations to my address
-<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&label=PetterReinholdtsenBlog">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>
<item>
- <title>NRKs kildevern når NRK-epost deles med utenlands etterretning?</title>
- <link>http://people.skolelinux.org/pere/blog/NRKs_kildevern_n_r_NRK_epost_deles_med_utenlands_etterretning_.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/NRKs_kildevern_n_r_NRK_epost_deles_med_utenlands_etterretning_.html</guid>
- <pubDate>Sat, 8 Oct 2016 08:15:00 +0200</pubDate>
- <description><p>NRK
-<a href="https://nrkbeta.no/2016/09/02/securing-whistleblowers/">lanserte
-for noen uker siden</a> en ny
-<a href="https://www.nrk.no/varsle/">varslerportal som bruker
-SecureDrop til å ta imot tips</a> der det er vesentlig at ingen
-utenforstående får vite at NRK er tipset. Det er et langt steg
-fremover for NRK, og når en leser bloggposten om hva de har tenkt på
-og hvordan løsningen er satt opp virker det som om de har gjort en
-grundig jobb der. Men det er ganske mye ekstra jobb å motta tips via
-SecureDrop, så varslersiden skriver "Nyhetstips som ikke krever denne
-typen ekstra vern vil vi gjerne ha på nrk.no/03030", og 03030-siden
-foreslår i tillegg til et webskjema å bruke epost, SMS, telefon,
-personlig oppmøte og brevpost. Denne artikkelen handler disse andre
-metodene.</p>
-
-<p>Når en sender epost til en @nrk.no-adresse så vil eposten sendes ut
-av landet til datamaskiner kontrollert av Microsoft. En kan sjekke
-dette selv ved å slå opp epostleveringsadresse (MX) i DNS. For NRK er
-dette i dag "nrk-no.mail.protection.outlook.com". NRK har som en ser
-valgt å sette bort epostmottaket sitt til de som står bak outlook.com,
-dvs. Microsoft. En kan sjekke hvor nettverkstrafikken tar veien
-gjennom Internett til epostmottaket vha. programmet
-<tt>traceroute</tt>, og finne ut hvem som eier en Internett-adresse
-vha. whois-systemet. Når en gjør dette for epost-trafikk til @nrk.no
-ser en at trafikken fra Norge mot nrk-no.mail.protection.outlook.com
-går via Sverige mot enten Irland eller Tyskland (det varierer fra gang
-til gang og kan endre seg over tid).</p>
-
-<p>Vi vet fra
-<a href="https://no.wikipedia.org/wiki/FRA-loven">introduksjonen av
-FRA-loven</a> at IP-trafikk som passerer grensen til Sverige avlyttes
-av Försvarets radioanstalt (FRA). Vi vet videre takket være
-Snowden-bekreftelsene at trafikk som passerer grensen til
-Storbritannia avlyttes av Government Communications Headquarters
-(GCHQ). I tillegg er er det nettopp lansert et forslag i Norge om at
-forsvarets E-tjeneste skal få avlytte trafikk som krysser grensen til
-Norge. Jeg er ikke kjent med dokumentasjon på at Irland og Tyskland
-gjør det samme. Poenget er uansett at utenlandsk etterretning har
-mulighet til å snappe opp trafikken når en sender epost til @nrk.no.
-I tillegg er det selvsagt tilgjengelig for Microsoft som er underlagt USAs
-jurisdiksjon og
-<a href="https://www.theguardian.com/world/2013/jul/11/microsoft-nsa-collaboration-user-data">samarbeider
-med USAs etterretning på flere områder</a>. De som tipser NRK om
-nyheter via epost kan dermed gå ut fra at det blir kjent for mange
-andre enn NRK at det er gjort.</p>
-
-<p>Bruk av SMS og telefon registreres av blant annet telefonselskapene
-og er tilgjengelig i følge lov og forskrift for blant annet Politi,
-NAV og Finanstilsynet, i tillegg til IT-folkene hos telefonselskapene
-og deres overordnede. Hvis innringer eller mottaker bruker
-smarttelefon vil slik kontakt også gjøres tilgjengelig for ulike
-app-leverandører og de som lytter på trafikken mellom telefon og
-app-leverandør, alt etter hva som er installert på telefonene som
-brukes.</p>
-
-<p>Brevpost kan virke trygt, og jeg vet ikke hvor mye som registreres
-og lagres av postens datastyrte postsorteringssentraler. Det vil ikke
-overraske meg om det lagres hvor i landet hver konvolutt kommer fra og
-hvor den er adressert, i hvert fall for en kortere periode. Jeg vet
-heller ikke hvem slik informasjon gjøres tilgjengelig for. Det kan
-være nok til å ringe inn potensielle kilder når det krysses med hvem
-som kjente til aktuell informasjon og hvor de befant seg (tilgjengelig
-f.eks. hvis de bærer mobiltelefon eller bor i nærheten).</p>
-
-<p>Personlig oppmøte hos en NRK-journalist er antagelig det tryggeste,
-men en bør passe seg for å bruke NRK-kantina. Der bryter de nemlig
-<a href="http://www.lovdata.no/all/hl-19850524-028.html#14">Sentralbanklovens
-paragraf 14</a> og nekter folk å betale med kontanter. I stedet
-krever de at en varsle sin bankkortutsteder om hvor en befinner seg
-ved å bruke bankkort. Banktransaksjoner er tilgjengelig for
-bankkortutsteder (det være seg VISA, Mastercard, Nets og/eller en
-bank) i tillegg til politiet og i hvert fall tidligere med Se & Hør
-(via utro tjenere, slik det ble avslørt etter utgivelsen av boken
-«Livet, det forbannede» av Ken B. Rasmussen). Men hvor mange kjenner
-en NRK-journalist personlig? Besøk på NRK på Marienlyst krever at en
-registrerer sin ankost elektronisk i besøkssystemet. Jeg vet ikke hva
-som skjer med det datasettet, men har grunn til å tro at det sendes ut
-SMS til den en skal besøke med navnet som er oppgitt. Kanskje greit å
-oppgi falskt navn.</p>
-
-<p>Når så tipset er kommet frem til NRK skal det behandles
-redaksjonelt i NRK. Der vet jeg via ulike kilder at de fleste
-journalistene bruker lokalt installert programvare, men noen bruker
-Google Docs og andre skytjenester i strid med interne retningslinjer
-når de skriver. Hvordan vet en hvem det gjelder? Ikke vet jeg, men
-det kan være greit å spørre for å sjekke at journalisten har tenkt på
-problemstillingen, før en gir et tips. Og hvis tipset omtales internt
-på epost, er det jo grunn til å tro at også intern eposten vil deles
-med Microsoft og utenlands etterretning, slik tidligere nevnt, men det
-kan hende at det holdes internt i NRKs interne MS Exchange-løsning.
-Men Microsoft ønsker å få alle Exchange-kunder over "i skyen" (eller
-andre folks datamaskiner, som det jo innebærer), så jeg vet ikke hvor
-lenge det i så fall vil vare.</p>
-
-<p>I tillegg vet en jo at
-<a href="https://www.nrk.no/ytring/elektronisk-kildevern-i-nrk-1.11941196">NRK
-har valgt å gi nasjonal sikkerhetsmyndighet (NSM) tilgang til å se på
-intern og ekstern Internett-trafikk</a> hos NRK ved oppsett av såkalte
-VDI-noder, på tross av
-<a href="https://www.nrk.no/ytring/bekymring-for-nrks-kildevern-1.11941584">protester
-fra NRKs journalistlag</a>. Jeg vet ikke om den vil kunne snappe opp
-dokumenter som lagres på interne filtjenere eller dokumenter som lages
-i de interne webbaserte publiseringssystemene, men vet at hva noden
-ser etter på nettet kontrolleres av NSM og oppdateres automatisk, slik
-at det ikke gir så mye mening å sjekke hva noden ser etter i dag når
-det kan endres automatisk i morgen.</p>
-
-<p>Personlig vet jeg ikke om jeg hadde turt tipse NRK hvis jeg satt på
-noe som kunne være en trussel mot den bestående makten i Norge eller
-verden. Til det virker det å være for mange åpninger for
-utenforstående med andre prioriteter enn NRKs journalistiske fokus.
-Og den største truslen for en varsler er jo om metainformasjon kommer
-på avveie, dvs. informasjon om at en har vært i kontakt med en
-journalist. Det kan være nok til at en kommer i myndighetenes
-søkelys, og de færreste har nok operasjonell sikkerhet til at vil tåle
-slik flombelysning på sitt privatliv.</p>
+ <title>Valutakrambod - A python and bitcoin love story</title>
+ <link>http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html</guid>
+ <pubDate>Sat, 29 Sep 2018 22:20:00 +0200</pubDate>
+ <description><p>It would come as no surprise to anyone that I am interested in
+bitcoins and virtual currencies. I've been keeping an eye on virtual
+currencies for many years, and it is part of the reason a few months
+ago, I started writing a python library for collecting currency
+exchange rates and trade on virtual currency exchanges. I decided to
+name the end result valutakrambod, which perhaps can be translated to
+small currency shop.</p>
+
+<p>The library uses the tornado python library to handle HTTP and
+websocket connections, and provide a asynchronous system for
+connecting to and tracking several services. The code is available
+from
+<a href="http://github.com/petterreinholdtsen/valutakrambod">github</a>.</p>
+
+</p>There are two example clients of the library. One is very simple and
+list every updated buy/sell price received from the various services.
+This code is started by running bin/btc-rates and call the client code
+in valutakrambod/client.py. The simple client look like this:</p>
+
+<p><blockquote><pre>
+import functools
+import tornado.ioloop
+import valutakrambod
+class SimpleClient(object):
+ def __init__(self):
+ self.services = []
+ self.streams = []
+ pass
+ def newdata(self, service, pair, changed):
+ print("%-15s %s-%s: %8.3f %8.3f" % (
+ service.servicename(),
+ pair[0],
+ pair[1],
+ service.rates[pair]['ask'],
+ service.rates[pair]['bid'])
+ )
+ async def refresh(self, service):
+ await service.fetchRates(service.wantedpairs)
+ def run(self):
+ self.ioloop = tornado.ioloop.IOLoop.current()
+ self.services = valutakrambod.service.knownServices()
+ for e in self.services:
+ service = e()
+ service.subscribe(self.newdata)
+ stream = service.websocket()
+ if stream:
+ self.streams.append(stream)
+ else:
+ # Fetch information from non-streaming services immediately
+ self.ioloop.call_later(len(self.services),
+ functools.partial(self.refresh, service))
+ # as well as regularly
+ service.periodicUpdate(60)
+ for stream in self.streams:
+ stream.connect()
+ try:
+ self.ioloop.start()
+ except KeyboardInterrupt:
+ print("Interrupted by keyboard, closing all connections.")
+ pass
+ for stream in self.streams:
+ stream.close()
+</pre></blockquote></p>
+
+<p>The library client loops over all known "public" services,
+initialises it, subscribes to any updates from the service, checks and
+activates websocket streaming if the service provide it, and if no
+streaming is supported, fetches information from the service and sets
+up a periodic update every 60 seconds. The output from this client
+can look like this:</p>
+
+<p><blockquote><pre>
+Bl3p BTC-EUR: 5687.110 5653.690
+Bl3p BTC-EUR: 5687.110 5653.690
+Bl3p BTC-EUR: 5687.110 5653.690
+Hitbtc BTC-USD: 6594.560 6593.690
+Hitbtc BTC-USD: 6594.560 6593.690
+Bl3p BTC-EUR: 5687.110 5653.690
+Hitbtc BTC-USD: 6594.570 6593.690
+Bitstamp EUR-USD: 1.159 1.154
+Hitbtc BTC-USD: 6594.570 6593.690
+Hitbtc BTC-USD: 6594.580 6593.690
+Hitbtc BTC-USD: 6594.580 6593.690
+Hitbtc BTC-USD: 6594.580 6593.690
+Bl3p BTC-EUR: 5687.110 5653.690
+Paymium BTC-EUR: 5680.000 5620.240
+</pre></blockquote></p>
+
+<p>The exchange order book is tracked in addition to the best buy/sell
+price, for those that need to know the details.</p>
+
+<p>The other example client is focusing on providing a curses view
+with updated buy/sell prices as soon as they are received from the
+services. This code is located in bin/btc-rates-curses and activated
+by using the '-c' argument. Without the argument the "curses" output
+is printed without using curses, which is useful for debugging. The
+curses view look like this:</p>
+
+<p><blockquote><pre>
+ Name Pair Bid Ask Spr Ftcd Age
+ BitcoinsNorway BTCEUR 5591.8400 5711.0800 2.1% 16 nan 60
+ Bitfinex BTCEUR 5671.0000 5671.2000 0.0% 16 22 59
+ Bitmynt BTCEUR 5580.8000 5807.5200 3.9% 16 41 60
+ Bitpay BTCEUR 5663.2700 nan nan% 15 nan 60
+ Bitstamp BTCEUR 5664.8400 5676.5300 0.2% 0 1 1
+ Bl3p BTCEUR 5653.6900 5684.9400 0.5% 0 nan 19
+ Coinbase BTCEUR 5600.8200 5714.9000 2.0% 15 nan nan
+ Kraken BTCEUR 5670.1000 5670.2000 0.0% 14 17 60
+ Paymium BTCEUR 5620.0600 5680.0000 1.1% 1 7515 nan
+ BitcoinsNorway BTCNOK 52898.9700 54034.6100 2.1% 16 nan 60
+ Bitmynt BTCNOK 52960.3200 54031.1900 2.0% 16 41 60
+ Bitpay BTCNOK 53477.7833 nan nan% 16 nan 60
+ Coinbase BTCNOK 52990.3500 54063.0600 2.0% 15 nan nan
+ MiraiEx BTCNOK 52856.5300 54100.6000 2.3% 16 nan nan
+ BitcoinsNorway BTCUSD 6495.5300 6631.5400 2.1% 16 nan 60
+ Bitfinex BTCUSD 6590.6000 6590.7000 0.0% 16 23 57
+ Bitpay BTCUSD 6564.1300 nan nan% 15 nan 60
+ Bitstamp BTCUSD 6561.1400 6565.6200 0.1% 0 2 1
+ Coinbase BTCUSD 6504.0600 6635.9700 2.0% 14 nan 117
+ Gemini BTCUSD 6567.1300 6573.0700 0.1% 16 89 nan
+ Hitbtc+BTCUSD 6592.6200 6594.2100 0.0% 0 0 0
+ Kraken BTCUSD 6565.2000 6570.9000 0.1% 15 17 58
+ Exchangerates EURNOK 9.4665 9.4665 0.0% 16 107789 nan
+ Norgesbank EURNOK 9.4665 9.4665 0.0% 16 107789 nan
+ Bitstamp EURUSD 1.1537 1.1593 0.5% 4 5 1
+ Exchangerates EURUSD 1.1576 1.1576 0.0% 16 107789 nan
+ BitcoinsNorway LTCEUR 1.0000 49.0000 98.0% 16 nan nan
+ BitcoinsNorway LTCNOK 492.4800 503.7500 2.2% 16 nan 60
+ BitcoinsNorway LTCUSD 1.0221 49.0000 97.9% 15 nan nan
+ Norgesbank USDNOK 8.1777 8.1777 0.0% 16 107789 nan
+</pre></blockquote></p>
+
+<p>The code for this client is too complex for a simple blog post, so
+you will have to check out the git repository to figure out how it
+work. What I can tell is how the three last numbers on each line
+should be interpreted. The first is how many seconds ago information
+was received from the service. The second is how long ago, according
+to the service, the provided information was updated. The last is an
+estimate on how often the buy/sell values change.</p>
+
+<p>If you find this library useful, or would like to improve it, I
+would love to hear from you. Note that for some of the services I've
+implemented a trading API. It might be the topic of a future blog
+post.</p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
</description>
</item>