Archives 2005 - 2019    Search

Some advice for beginners on pay-as-you go e-scooters

published Aug 25, 2019 07:50   by admin ( last modified Sep 25, 2019 08:22 )

I was supposed to help some colleagues with their first experiences on pay-as-you go e-scooters this week, weather permitting. Well the weather was not cooperating, but I decided to write down some things I was going to tell them:

Use a helmet and possibly other protection at least in the beginning

The big problem with e-scooters even if you are used to bicycles, is the small wheel size. They can dig themselves into holes and stop at curbs, if the height difference is bigger than half the diameter of the front wheel. They also do not turn that smoothly beyond a certain angle. So a helmet can be good in the beginning!

Spread your feet out on the board

Put the balls of your feet as close to the front and back (diagonally) as possible, and angle them out to the sides (but still comfortable). For example front left and rear right. In that way you have the best balance and also the most weight shifting options.

Learn to jump off on the right side!

An e-scooter is actually in at least one way safer than a bicycle, and that is that you can dismount with ease and so place yourself further away from danger. It can also be used as a breaking method.

In countries with right hand traffic, the correct side to practice dismount on, is the right hand side of the scooter. The reason for this is that if you would dismount on the left hand side in a critical situation, you're basically jumping into the way of any oncoming bicycle or car. I've been close to doing that mistake, when a lady cyclist veered into my lane going head-on, while she was texting on her phone.

Keep your left index finger coiled around the handle at all times

Many scooters have a hand brake on the left hand side and you should favor those scooters, I believe, that do have one. If you ride with all fingers on the brake handle, your grip of the handlebar itself will be tenuous. Chances are that the times you really do need to brake will be in moments of instability and forces will try to pry your grip off the handlebar. By keeping the index finger on the handlebar you still have enough finger power on the brake lever while having good purchase on the steering bar itself.

When you start using the scooter, test the brakes. On some scooters the brake handle travels so far in towards the handlebar while braking that you'd pinch your index finger with the brake handle if you kept the finger around the handle, so obviously you can't have your index finger there in that case.

Scooters with the batteries in the steering bar will hit your shins

Scooters with the batteries in the steering bar are front heavy and lack mass in the rear so as you're leading the scooter beside you, there will be times when you turn or go up or down when the rear weel will lose contact with the ground and the board will come swinging at you and hit your shins. Ouch. You have my sympathies.


Nginx — Remember to cache content until the cache is actually updated

published Aug 22, 2019 03:55   by admin ( last modified Aug 22, 2019 04:02 )

Caching when stale

If you cache something for say 6 seconds in Nginx, then only one request comes through per 6 seconds right? Not necessarily. It depends on how you have configured the behavior for when a cached entry goes stale.

If the backend takes a number of milliseconds to update the cache, other requests that are let through during that time (let through since the cache is stale) could overwhelm the backend application server.

In the default example in the nginx blog they do not cater for this "slip-through":

proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;

However it can be mitigated. For all versions of nginx there is an updating value you can add to the proxy_cache_use_stale directive. It will continue serving cached requests even when the cache is stale

proxy_cache_use_stale updating […]

Here is a comparison between not having the updating parameter switched on and having it on, for a slow backend application server with a low tolerance for load. In both cases 10 simultaneous user agents each doing 1 request per second for 30 seconds. Framework used is Artillery.js. Check the 95th and 99th percentiles

Request latency:
min: 33.7
max: 16763.4
median: 37.9
p95: 7666.3
p99: 15260.1
Scenario counts:
0: 300 (100%)
Codes:
200: 300

Now with the updating parameter added:

Request latency:
min: 34.3
max: 726.9
median: 38
p95: 43.4
p99: 70
Scenario counts:
0: 300 (100%)
Codes:
200: 300


Bruce Schneier on the nature of dishonest Internet influence operations

published Aug 20, 2019 10:43   by admin ( last modified Aug 20, 2019 10:43 )

Bruce Schneier on the nature of dishonest Internet influence operations ("they're surprisingly inexpensive to run", "they will increasingly be seen as how the game of politics is played in the information age") and how to kill them, point by point.

 

https://www.schneier.com/blog/archives/2019/08/influence_opera.html


Humidex — one way of getting a truer measurement of the summer heat's effect on the body

published Jul 24, 2019 11:45   by admin ( last modified Aug 14, 2019 07:07 )

Parts of Europe suffer a heatwave but you got to weigh in humidity to get closer to the real impact. Meteociel displays the Humidex readings all over Europe, taking humidity into account. Check chart below for guidance

Forecast for France and some surroundings https://www.meteociel.fr/modeles/gfs/humidex/3h.htm

Humidex measurements http://www.meteociel.fr/observations-meteo/humidex.php?region=eur2

Chart025
Click to view full-size image…

 

There may well be better scales for assessing this, but Humidex has the distinct advantage of actually being reported for European weather.


Voice over mic test by BoothJunkie:My take on which mics sounded best

published Jul 22, 2019 12:20   by admin ( last modified Jul 24, 2019 05:50 )

I'm listening through a tinny laptop speaker, but here goes. The mic he is mainly testing, the VO 1-A is really good. It is better than the first mic he compares it too the CAD m179, and also edges out the Røde NT1 mic, although is has to be said that the Røde is good. I wonder if you ever can go wrong with a Røde mic. The Lewitt LCT 440 PURE in some ways better than the VO 1-A, I'd say maybe not as clear, but with a nice compression, that suits voiceover often I gather. The Neumann mics are better, but it makes you think by how much given the price. I am a bit interested in the Neumann KMS 105 BK  which is a cheaper version for stage use. 

Below is BoothJunkie's affiliate links for the different microphones. Haven't thought that much about the Sennheiser and the CAD e100s.

 

With headphones on

I have now listened with my Sony MDR-CD480 headphones,  and methinks VO 1-a still sounds better than the m179 and the NT1. The LC440 sounds a litlle bit better, less raw and less sibilant but otoh with more distortion. The e100s sounds better. The TLM103 sounds a lot (well maybe not a lot but in this context of listening intently) better.


The Neumann sound — it's true

published Jul 12, 2019 01:35   by admin ( last modified Jul 12, 2019 03:34 )

Bandrew just tested a Neumann mic that costs $700. And I pretty much immediately recognised the sound of this mic as the sound of hosts and news announcers on Swedish high-end FM radio in the 1980s. I bet they had similar sounding Neumann mics. Now I want one. It's so much better sounding.

 

 

Here is a microphone in the "Ekot" news studio. Don't know what it is though:

11403123 1137518022928628 7128068138886291737 n
Click to view full-size image…


How to upload images with e.g. WhatsApp in Firefox

published Jul 10, 2019 01:30   by admin ( last modified Jul 10, 2019 11:48 )

Images can show up blank. In that case:
In about:config, Set

privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts

to

false

and allow WhatsApp access to canvas data.

It seems to be enough to toggle this,  confirm access for Whatsapp, and toogle it off again We'll see.

Web WhatsApp shows blank/white image : firefox


A salsa video with Magna Gopal & June from Seoul 2008

published Jul 04, 2019 10:40   by admin ( last modified Jul 04, 2019 10:37 )

For whatever reason, this dance video has stuck with me, I like it:

https://www.youtube.com/watch?v=GBWMOurhmpk

 

If the embed doesn't work, follow the link!


Taleb's fundamental notion: ­The world is nonlinear

published Jul 01, 2019 12:01   by admin ( last modified Jul 01, 2019 12:01 )

A random like on Twitter reminded me of this old tweet:

 

taleb
Click to view full-size image…

 


Testing electrical scooters (kickbikes, mopeds) in Stockholm

published Jun 23, 2019 10:55   by admin ( last modified Jul 01, 2019 11:00 )

Tried 3 electric scooters (kickbikes) rentals in Stockholm: Tier (Austrian, I think), Lime (American) and Voi (Swedish). The scooters are everywhere! I think the way they look & work though will evolve rapidly, because commercial use sets a different set of constraints.

  • Tier is the best scooter, but they become unavailable at late evenings
  • Lime has jerky accelerator
  • Voi is ok, with super availability and a stronger motor than Tier

Tier lacks external battery so I guess they have to collect all scooters every evening. Voi & Lime can just switch batteries. Hope Tier upgrades soon. It has smooth throttle & mechanical brake, & half the price/minute. These kind of vehicles the way they are designed today are front heavy & thus handle a bit weird.

tier
Click to view full-size image…

Update 2019-06-27: As can be seen above, some of the Tier scooters now have been fitted with external batteries (the black bulb halfway down the back of the steering column) afaict. The competition goes on… However I also see Tier scooters without this modification. Update 2019-06-30: Tier still shuts down the entire network at around 22.00 every day. That is truly weird. Also, their bikes seem to dropped back in clumps of four to six, near metro stations. Unless then, tier travellers like to travel and abandon their bikes in packs of six…

Better scooters ahead


Once they start designing their own rental vehicles they could well place the battery further back to ge a better weight distribution methinks. Update: I think that is exactly what Lime-S Generation 3 does! They do not mention it but you can see the space under the floorboard. And as you can see demonstrated in the above video I just found, Voi does it too. Also bigger wheels. I have not seen these new ones in Stockholm. Anyone who has been skating on inlines on surfaces with cones or stones, knows how much every extra couple of millimeters at the wheels help (in inlines from e.g. 72mm to 80mm). Voi will also try a three-wheeler as can be seen in the background of the above video.

An electrical moped

800px Blinkee electric scooter in Burjassot
Click to view full-size image…

Also tried the @blinkeecity (Polish company) moped. With a passenger I think it all weighed in at 218 kg! & you need to balance that with a wide stance due to the floorboard of what I'm fairly sure is a Viarelli Vincero. Good experience but this ain't no kick bike. Price/min not much higher than a kickbike though!

I think the moped itself weighs in at just below 90kg.

 


Breaking changes in Riot-js 4, first impressions from the migration guide

published Jun 06, 2019 02:40   by admin ( last modified Jun 09, 2019 12:29 )

Firstly, it's interesting with a migration guide that starts with saying you should not migrate. What is meant afaict is that you should upgrade your brain to write for Riot 4, but keep old components on e.g. Riot3.

Migration Guide · Riot.js

Version 3 documentation is here https://v3.riotjs.now.sh/

A number of things have changed that I have not used, such as the observable pattern and referencing parents and children.

More verbose

Pretty much all changes will make you write more code inside of a web component. That is a minus I think.

Some good things

The general idea is to be more compatible with contemporary javascript syntax.

There is one thing that has changed that I think is for the better and that is that the "refs" way of referring to DOM elements is gone and instead replaced by the jquery-like selector "$". That makes more sense. I have never used the "yield" tag but it sounds like the new term "slot" is a better word for it.

Some things that add lines of code

Methods operating on the component now need to be wrapped inside an "export default" block, which adds code. I guess you could just put the method names in there and keep the rest outside of the export block. The inline logical statements of the form {truthyOrFalsyTing ? 'iftrue': 'iffalse'} seem to have been removed, and instead you are supposed to create or import functions and put them in the template.

Conclusion

I see no reason to upgrade now, which is inline with the recommendation in the upgrade guide. I'll look through a bit more later onto the new things and see if there is some cool stuff that I'd like to use.

Also

It is hard to find the old docs on the riot site for verison 3, I think they have been deleted, and hence many Google links are broken. I had to go to GitHub to find stuff. I now see that the new FAQ refers you to https://riot.js.org/v3, but that page does not exist.


How to add a 12GiB swap volume on Ubuntu

published May 23, 2019 11:20   by admin ( last modified May 23, 2019 11:19 )
sudo fallocate -l 12g /mnt/12GiB.swap

sudo chmod 600 /mnt/12GiB.swap

sudo mkswap /mnt/12GiB.swap

sudo swapon /mnt/12GiB.swap

echo '/mnt/12GiB.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab

Source: https://help.ubuntu.com/community/SwapFaq#How_do_I_add_or_modify_a_swap_partition.3F


"docker-compose up" on Ubuntu 19.10, by Jove it stays up!

published May 22, 2019 03:40   by admin ( last modified May 22, 2019 03:39 )

I had to run a docker-compose file today to get access to some cool services and had big problems getting the services out of it that I thought I would. It all seemed a bit old. It turned out that I ran an older version of this file 2 weeks ago, and I never ran "docker-compose down". I did do a ctrl-c though which in older Ubuntu versions seemed to settle the matter. But in 19.10 it seems different. It stays up.

Those old containers have been running on my laptop through hell and high rain for two weeks now, through approximately 20 restarts and shutdowns of the laptop. And I could not get them down afaict with "docker-compose-down" now, since that file has changed. Systemd starts docker every reboot and then docker starts its stuff, including the containers.

I had to resort to docker rm and docker kill to get the new stuff up.


How to set up a semi private Syncthing system

published May 06, 2019 05:20   by admin ( last modified May 06, 2019 05:23 )

Syncthing is designed to be secure even when running mutual discovery between your computers and relaying their data — through servers that are all run by other people. As long as the TLS encryption holds up, the data should be safe. But if you think it may not be safe you may want to run it a little more private. First in order to make it somewhat private you will need to set up a relay server; you can see my notes here for Ubuntu: Notes on getting a syncthing relay server running on Ubuntu 18.04LTS


However, the computers cannot discover each other through the relay server, for that a discovery server is needed. This threw me a bit, since I thought the relay server would be enough. However it is not. This means that you need to run a private discovery server or be cool with the public discovery server. How you feel about depends a bit on whether you're cool with the announcements of your machines being somewhat public or not.


Notes on getting a syncthing relay server running on Ubuntu 18.04LTS

published May 02, 2019 12:55   by admin ( last modified May 02, 2019 02:16 )

I created a dedicated user with a shell so that I could easier see why things did not work. It may also automagically work if you do everything right from the beginning.

It can be good to know that the server is called "strelaysrv" on Ubuntu, which the Ubuntu man page does not mention, but instead uses the "relaysrv" name.

You have to make sure the keys for the server are stored where the server can find them. One way of doing this is to supply the -keys parameter to ExecStart in systemd. For a systemd conf, see https://wiki.archlinux.org/index.php/Syncthing#Running_a_relay

Clients will not connect to the server unless they know the server's key, so you have to configure them with an id parameter and not just protocol, server and port:

relay://server.example.com:22067?id=<id string>

The key is output by the server on startup, which you can catch if you run it from the command line (if you have shell).

If you forget to incude the id of the relay server, these are the errors you get (or at least I got) on the client side:

Disconnecting from relay relay://relay.example.com:22067 due to error: EOF
c.S.listenerSupervisor: Failed service 'relay://relay.example.com:22067' (2.985913 failures of 2.000000), restarting: false, \
error: "{relay://relay.example.com:22067 relay://relay.example.com:22067} returned unexpectedly", stacktrace: [unknown stack trace]

On the server side I believe it was:

read: connection reset by peer

and:

connection refused

 


Serverless Syncthing vs Dropbox — You may need a server anyway

published Apr 28, 2019 11:15   by admin ( last modified Apr 28, 2019 11:18 )

Since Dropbox doesn't support my file systems anymore, I decided to take a look at Syncthing and Sparkleshare, free and open source folder synchronization alternatives. Syncthing is by far the most polished of these two offerings. It's also cool in that it is peer-to-peer and hence has no center.

Instead it goes point to point and if that doesn't work it (which due to NAT it often does not) it relies on a public cluster of relay servers, or you can run your own if you do not trust that the public servers are unable to read the encrypted traffic.

However the p2p nature of Syncthing becomes a bit of a problem if you want to sync between your own devices, because obviously the sync can only work if the machines are switched on and online at the same time. For your laptops, this is unlikely. And hence Syncthing does not work for that scenario. Unless you have an always on machine also in the mix (you can sync many machines, not just two).

But what do we call a machine that is always switched on? Yup, a server. Although the system would be robust since if you lose that machine you can just fire up another one and everything works again.

Still Syncthing feels like it is more for synchronizing files between people. And there git may be a contender. Still Syncthing looks great and I will see if I can tailor it to my needs. Worst case scenario I'll put two servers in the mix, one for relaying and one for making sure synching always works!

That would be two-server serverless architecture :) But with great resilience since the servers can be replaced at any time.


Autostart programs and scripts in ubuntu

published Apr 28, 2019 08:15   by admin ( last modified Apr 28, 2019 08:11 )

There is a GUI for that (tested by me). Just find the autostart GUI application through your application launcher. You can also edit directly the desktop files that are constructed in ~/.config/autostart . Keep in mind though that the GUI decides the names there so if you need to find and edit a specific statup you may need to look around a bit!

Read more: Link - autostart - How do I start applications automatically on login? - Ask Ubuntu


Timeout a function in Javascript

published Apr 05, 2019 02:50   by admin ( last modified Apr 05, 2019 02:50 )

Here's one way that seems to work, you set a time to change a function-scoped variable and return out of the function when that changes.

function thisShouldTimeOut() {

  var shouldIStopDoingThis = false

  setTimeout(() => {
    shouldIStopDoingThis = true
  }, 2000)

  for () { // some loopy stuff
    if (shouldIStopDoingThis) {
      return
    }
  }
}

Updating a part of a Riot.js tag

published Apr 04, 2019 02:55   by admin ( last modified Apr 07, 2019 11:23 )

Edit 2019-04-07: This does not work!

 

In order to get a less jumpy page, I'm looking at how to render just a sub part of a Riot.js tag. According to this conversation it should be possible. The example given is this:

var item = this.tags['big-data-tag'].tags.item[0]
item.first_name = 'jack'
item.update()

I think it could be adapted to work like this, untested by me:

 

<maintag>
    <subpart>
        { onlyupdatethis}
    <subpart>
Some other stuff that is static

   <script>
   const tag = this

     this.on('mount', function () {
       stateManager.subscribeToUpdates(function(state){
          tag.tags.subpart.update()
        })
       }   
      )

   </script>

</maintag>

 


Notes on order of speech processing and on automix

published Mar 27, 2019 09:20   by admin ( last modified Apr 24, 2019 10:38 )

These are just some notes jotted down for my memory, so not authoritative at all, not even inside my own head yet :)

Remove noise → Compress → Normalize

After having watched one of Curtis Judd's videos it was clear it is a good idea to compress/limit before normalizing. There may be some peaks otherwise in your recording that would make the normalizing not be good enough. Also I noted that Judd eyeballs on the left hand dB scale where to put the compressor's knee. That makes sense too.

And completely on my own I realized that noise reduction should go first in the chain. Chances are your noise is at a certain level and it's easier to remove it before compression has introduced a varying noise floor.

Automix

Finally in this post, I have seen that some newer digital recorders and mixers have "automix", that is they mute the microphones of those not talking. This I think would be a great feature to have in post-production! Imagine having six tracks and you just tell the software to automix it. I guess that exists somewhere. Otherwise it would be fun to write an algorithm for it, for post production. You could do voice detection (is this voice?) and amplitude detection, reverberation detection, phase and distance detection (like in a microphone array) and so on.

Update 2019-04-24

Julian Krause has just released a video with his workflow, it's a bit different: https://www.youtube.com/watch?v=GVovXsbCjjU

He normalizes the audio first to a certain LUFS level, then removes rumble and proximity effect with high pass filters, then applies a compressor and a noise gate. What is most interesting for me here is that he sets the attack of the compressor to 1ms and the decay to I think it was 100ms, settings that are on the shorter side but that he argues make sense for voice. Gotta try that.