Archives 2005 - 2019    Search

Kompressionskläder för sport - en recension för social dans

published Apr 30, 2017 05:40   by admin ( last modified May 03, 2017 12:32 )

Plagg som testats.

Användning

När jag dansar latinsk dans kan det bli väldigt varmt och svettigt, och man kan lokalt bli väldigt kall när man försöker svalka sig. Kompressionsplagg förbättrar cirkulationen nära huden och idén var att testa om kompressionskläder kan hjälpa mot lokal avkylning, samtidigt som de fortfarande håller en torr och sval.

Slutsats

Kompressionskläder fungerar, men vissa syntetmaterial såsom nylon suger åt sig vatten.

Detaljer

Jag har inte kunnat undgå att folk nu springer och går omkring i tights. Jag har motstått frestelsen av flera skäl, men insåg tidigare i veckan att kompressionskläder kan hjälpa mot lokal avkylning efter svettiga danser. Idealt sett ska de kläder man har på sig vara så fuktgenomsläppliga att man alltid håller sig torr och sval. I praktiken så blir man svettig och när man sedan kyler av sig så kan man lokalt bli väldigt kall, samtidgt som man fortfarande som helhet behöver mer avkylning.

Kanske kan kompressionskläder hålla uppe cirkulationen i dessa kalla delar? Då slipper man känna sig kall, samtidigt som man förbättrar kylningen av kroppen, genom att transportera varmt blod nära huden.

Kompressionshorts från Nike: "Cool Comp 6 Short" (90% polyester, 10% elastan). Dessa fungerar riktigt bra, och är hyfsat fuktgenomsläppliga. De kostar ungefär 200:-

Kompressions t-shirt från Under Armour "Zona" är en dyrare produkt, och jag valde att gå upp lite i pris för denna eftersom det var den kompressionströja jag såg minst löjlig ut i. Denna tröja innehåller mycket elastan (vilket jag antar drar upp priset) och har en ganska hög kompression, i alla fall jämfört med shortsen.

Efftekten under dansen  av tröjan var inte så väldigt bra: Den förhindrar visserligen lokal kyla med hjälp av kompressionen men den känns blöt och den tar tid att torka. Jag insåg varför, när jag efteråt noterade att den var gjord i nylon. Nylon är en stark och bra fiber, men den drar åt sig fukt, den är hydrofil. På Under Armour:s sida står det att det är polyester, inte nylon, men i lappen i själva tröjan står det nylon. Go figure. Jag är faktiskt inte säker på vad den är gjord av, längre.

Dagen efter var däremot effekten från tröjan bra, fast jag inte längre bar den. Det verkar som att kompression fungerar som en slags massage och ryggen kändes varm och med god blodcirkulation.

Min gissning är att ju mer elastan ett plagg innehåller, desto mer elastiskt blir det. Elastan är gissningsvis också dyrare än polyester eller nylon, så plagg med mycket elastan blir också dyrare. Vissa kompressionsplagg verkar gjorda för att användas under själva träningen och andra för att ha på sig efteråt.


Metalsmith - a blog site and general site generator

published Apr 29, 2017 01:13   by admin ( last modified Apr 29, 2017 01:13 )

...that uses pipelines. I like pipelines. Metalsmith is in Node.js. But I also like Plone. And Plone has built-in commenting, that works ok.

 

Metalsmith


Initial ideas on how to get sshd into a Ubuntu server install

published Apr 27, 2017 11:56   by admin ( last modified Apr 27, 2017 11:56 )

To add packages for the installation, add a %package section to the ks.cfg kickstart file, append to the end of ks.cfg file something like this.

%packages
@ ubuntu-server
openssh-server
ftp
build-essential

The above is from:

system installation - How do I create a completely unattended install of Ubuntu? - Ask Ubuntu

A skeleton kickstart file looks like this:

#
#Generic Kickstart template for Ubuntu
#Platform: x86 and x86-64
#

#System language
lang en_US

#Language modules to install
langsupport en_US

#System keyboard
keyboard us

#System mouse
mouse

#System timezone
timezone America/New_York

#Root password
rootpw --disabled

#Initial user (user with sudo capabilities) 
user ubuntu --fullname "Ubuntu User" --password root4me2

#Reboot after installation
reboot

#Use text mode install
text

#Install OS instead of upgrade
install

#Installation media
cdrom
#nfs --server=server.com --dir=/path/to/ubuntu/

#System bootloader configuration
bootloader --location=mbr 

#Clear the Master Boot Record
zerombr yes

#Partition clearing information
clearpart --all --initlabel 

#Basic disk partition
part / --fstype ext4 --size 1 --grow --asprimary 
part swap --size 1024 
part /boot --fstype ext4 --size 256 --asprimary 

#Advanced partition
#part /boot --fstype=ext4 --size=500 --asprimary
#part pv.aQcByA-UM0N-siuB-Y96L-rmd3-n6vz-NMo8Vr --grow --size=1
#volgroup vg_mygroup --pesize=4096 pv.aQcByA-UM0N-siuB-Y96L-rmd3-n6vz-NMo8Vr
#logvol / --fstype=ext4 --name=lv_root --vgname=vg_mygroup --grow --size=10240 --maxsize=20480
#logvol swap --name=lv_swap --vgname=vg_mygroup --grow --size=1024 --maxsize=8192

#System authorization infomation
auth  --useshadow  --enablemd5 

#Network information
network --bootproto=dhcp --device=eth0

#Firewall configuration
firewall --disabled --trust=eth0 --ssh 

#Do not configure the X Window System
skipx

Taken from here: 4.6. Automatic Installation


Enable mouse support in Emacs

published Apr 26, 2017 08:18   by admin ( last modified Apr 26, 2017 08:18 )

Summary:

F10,  “Options” → “Customize Emacs” → “Options matching Regexp…”. Type mouse and Enter.

Go to “Xterm Mouse mode”.

Press Enter on “Show Value”. A “Toggle” button appears, press Enter on it. Then press Enter on the “State” box and choose  “1” for “Save for Future Sessions”

 

More complete info here: How can mouse support be enabled in terminal Emacs? - Unix & Linux Stack Exchange

 

 

 


sudo with no password on Ubuntu

published Apr 25, 2017 04:42   by admin ( last modified Apr 25, 2017 04:42 )

In the /etc/sudoers file:

For a single user :

superuser ALL=(ALL) NOPASSWD:ALL

For a group :

%supergroup  ALL=(ALL) NOPASSWD:ALL

 


"File not found" on Linux could be trying to run 32 bit executable on 64 bit system or vice versa

published Apr 21, 2017 05:55   by admin ( last modified Apr 30, 2017 11:48 )

The file is clearly there, you ls it, view it and everything. but when you try to run, it's reported as not being there. You could be on the wrong sub architecture like 64 bit when the execiutable is 32 or vice versa: perl - Getting "Not found" message when running a 32-bit binary on a 64-bit system - Unix & Linux Stack Exchange

 

In my case it seemed to be running a 64 bit executable on a system that had a bit of an identity crisis as to what it were, byte-wise.


Powering a 2-pole 3.5mm (1/8") connected electret microphone with a Xenyx 302USB

published Apr 14, 2017 04:30   by admin ( last modified Sep 03, 2017 11:20 )

Update 2017-08-27: This solution does work! But you can't have dirty power with mains hum in it. If you are running on a laptop and you hear hum, try disconnecting the laptop from the charger.

box2
Click to view full-size image…
Size: 51.1 kB

box
Click to view full-size image…
Size: 156.4 kB

There is a 3,5mm (1.8") microphone jack at the top right of the Xenyx 302USB.

It seems to be wired the same as in SoundBlaster sound cards, and have a 4V voltage for driving electret condenser microphones:

        / \ 
       |   |   Tip - Audio signal
        \ / 
       +===+
       |   |   Ring - Bias voltage for microphone (+4V)
       |===|
       |   |
       |   |   Sleeve - Ground
       |   | 
     +=======+
     |       |

Schematics adapted from: Powering microphones

However my electret microphone seems to be wired like this:

        / \
       |   |   Tip - Audio and bias voltage (+3V)
        \ /
       +===+
       |   |  
       |   |
       |   |
       |   |   Sleeve - Ground
       |   |
     +=======+
     |       |

I think it runs on 3V so 4V is close enough I guess.

So I am using a wiring block to make the ground not extend to the ring, and have the signal + voltage on both the ring and the tip, going into the mixer:

        / \ 
       |   |   Tip - Audio and bias voltage (+4V)
        \ / 
       +===+
       |   |   Ring - Audio and bias voltage (+4V)
       |===|
       |   |
       |   |   Sleeve - Ground
       |   | 
     +=======+
     |       |



Source quote for the voltage:

The 302USB does not have the higher voltage phantom power used in older mixers. It does have the 14 volt on the XLR and the 4 volt on the 1/8' (3.5 ) bias for electert mics. This is not something you can turn off but is not a problem unless you are using equipment that is not isolated or balanced and then you can get noise from cable movements, inserting plugs with the volume up. Hope this helps.

Amazon.com: Questions And Answers: Can I use this preamp without phantom power? and if so, how?


Ubuntu Linux on Aspire V15 Nitro - first impressions

published Apr 12, 2017 04:50   by admin ( last modified Apr 25, 2017 02:50 )

It works with Ubuntu 16.04LTS, 16.10 and 17.04 and with  Fedora Linux with the following caveat:

Furthermore, this is not a bug, but the M2 SSD does not support encryption (Opal encryption) which surprised me a bit.


Let's just call them superstitious

published Apr 08, 2017 06:40   by admin ( last modified Apr 08, 2017 06:40 )

Yesterday, as I walked home from my work at Vasagatan, I saw hundreds of people walking on Västerbron bridge making their way home, after the attack at #Drottninggatan. My heart goes out to those hurt and killed by the terrorists.

In ancient Rome, before Christianity and before Islam, there was an expression for people who think they are gods or who think they could manipulate gods to do their bidding: They were not seen as religious, but superstitious (superstitio).

Imagine if we could deny the "religious" label to people who do not respect the right to life or the UN declaration of human rights. We simply deny them the protection and respect we extend to others to worship in freedom. Criminals will not longer be able to hide behind a perversion of piety.

People who preach hate are just recruiters for criminal organizations and networks and should be treated as such. Insofar as their ramblings can be interpreted as threats or incitement to violence, they should be prosecuted to the fullest extent of the law, without any regard to hurting religious feelings, since this is not religion.

We are entering an age where small groups can do a lot of damage; a sect of a couple of thousand tops were close to wiping out many many people in Japan some years ago. Three times. The freedom of communication we have now will in the future mandate a lot more physical protection. And we need to communicate more in person:

If any people are close enough to hurt you, you need to communicate with them, engage them. We must reach the people who have Internet fueled make-believe communities in their heads.

Theirs is a path of bitterness, hate and delusion, their perceived self-worth oscillating between the extremes of self-hatred and self-aggrandizement.
Our path is one of love, joy and freedom, knowing in our hearts without hesitation the true value and power of humans. We will prevail.


Using a virtual machine for Ardour/Jack on a pulseaudio host OS (Linux)

published Apr 02, 2017 07:45   by admin ( last modified Apr 02, 2017 08:01 )

KVM works, VirtualBox doesn't in my tests.

Ardour and Jack do not play well with PulseAudio. On my Ubuntu 16.04 it kills Pulseaudio and that is a bit awkward. So I decided to install Ardour on a virtual machine, and I wanted to test the performance. So I installed Ubuntu Studio on VirtualBox and KVM too see which one gives me best performance for audio editing. In VirtualBox it seemed to work internally, but alas, no sound reached the host system, regardless of configuration Kvm/Qemu worked on the first try!

Host operating system is Ubuntu 16.04LTS

Guest operating system is Ubuntu studio 16.04

Virtual machine is KVM/QEMU

Using the virtual machine manager

You may want to share files between the host machine and the Ubuntu Studio VM. In that case: Mount a volume into the virtual machine like this:

Setting up KVM shared directory in ubuntu 14.04 | Pascal d'Hermilly's tech Blog

Summary:

Make a mount filesystem with driver Default in kvm, mode passthrough, enter "/commonshare" for target path.

Try in clientmachine

sudo mount -t 9p -o trans=virtio,version=9p2000.L /commonshare /mnt/commonshare

Then enter in /etc/fstab

/commonshare /mnt/commonshare 9p trans=virtio,version=9p2000.L,access=any 0 0

 


Audio compression tools for screencasts on Linux

published Mar 31, 2017 11:35   by admin ( last modified Apr 03, 2017 11:08 )

Summary: Use ardour - the digital audio workstation with the Calf Studio Gear - GNU/Linux Audio Plug-Ins and the JACK Audio Connection Kit system.

See other options on Linux than Ardour, such as ffmpeg, sox and Audacity below, with examples.

Ardour, Jack and the Calf plugins are all in the Ubuntu repositories if you are using Ubuntu.

However PulseAudio in Ubuntu does not play well with Ardour, and you would probably prefer a Linux distribution that natively uses Jack instead, and not PulseAudio. The problems with PulseAudio and Jack together are listed here:

JACK Audio Connection Kit|How use PulseAudio and JACK?

One option is to use the Ubuntu Studio Linux distribution directly on your computer, or in a virtual machine for Ardour/Jack on a pulseaudio host OS (Linux) . The latter works surprisingly well; I'm using it!

Ardour's plugin system is just gorgeous. Above two of the "Calf" series plugins in the foreground: An equalizer and a compressor. Effects can be stacked and signals routed in different ways. If you use Ardour 5 in Ubuntu studio, there are hundreds of effects plugins to choose from.

Apply the compressor twice. The effect was better I felt when using a moderate compression twice instead of a stronger once, as mentioned here:

"If you want to heavily compress a voice recording without making it sound too unnatural, use two or three compressors in series. This will sound better than using drastic settings on a single compressor"

That page has a lof of other useful advice as well.

Before you compress

Clipping is accentuated by compression in my limited experience. So if you record with clipping it may be a good idea to re-record. It's better to redo a recording until the suond is good, than try to fix it afterwards. Gigo.

Other choices

  • Audacity has and can use a set of effects plugins
  • ffmpeg has and can use a set of effects plugins
  • sox has a set of effects

But after having seen Ardour, who cares? :D Although sox and ffmpeg can be used from scripts, it must be said.

Audacity example

Here are the settings that worked for me, in Audacity's compress effect:

Threshold: -16dB first time (I think), -13dB second time

Noise floor: -30dB

Ratio: 2.5:1

Attack time: lowest (0.10 secs)

Release time: 1.0 secs first time, 2.2 secs second time

Sox example

sox has compression. I am toying with this one, basically lifted from the man page. At least it looks a bit complex:

sox audio-in.wav soxied.wav gain -28 mcompand "0.005,0.1 -47,-60,-34,-55,-17,-33,0,-10" 100 "0.003,0.05 -47,-60,-34,-55,-17,-33,0,-10" 400 "0.000625,0.0125 -47,-60,-34,-50,-15,-33,0,-10" 1600 "0.0001,0.025 -47,-60,-34,-50,-31,-31,-0,-30" 6400 "0,0.025 -38,-60,-28,-28,-0,-25" gain 15 highpass 22 highpass 22 sinc -n 255 -b 16 -17500  gain 9 lowpass -1 17801

ffmpeg example

ffmpeg -i screncast-audio.wav -vf "compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6" comptest.wav

 

 

 

 


Audio compression on Linux

published Mar 31, 2017 04:41   by admin ( last modified Mar 31, 2017 04:41 )

Just some notes:

sox has compression. I am toying with this one, basically lifted from the man page. At least it looks a bit complex:

sox audio-in.wav soxied.wav gain -28 mcompand "0.005,0.1 -47,-60,-34,-55,-17,-33,0,-10" 100 "0.003,0.05 -47,-60,-34,-55,-17,-33,0,-10" 400 "0.000625,0.0125 -47,-60,-34,-50,-15,-33,0,-10" 1600 "0.0001,0.025 -47,-60,-34,-50,-31,-31,-0,-30" 6400 "0,0.025 -38,-60,-28,-28,-0,-25" gain 15 highpass 22 highpass 22 sinc -n 255 -b 16 -17500  gain 9 lowpass -1 17801

 

 


Rotate an upside down video with the aid of ffmpeg

published Mar 27, 2017 02:35   by admin ( last modified Aug 20, 2017 01:02 )

Tested by me:

ffmpeg -i in.mov -vf "transpose=2,transpose=2"  -c:a copy -t 10 out.mov

See: rotation - Rotating videos with FFmpeg - Stack Overflow

If only rotating metadata:

ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4

Face recognition from python

published Mar 21, 2017 04:30   by admin ( last modified Mar 26, 2017 11:59 )

Linux software for making, editing & compressing screencasts

published Mar 18, 2017 09:10   by admin ( last modified Mar 20, 2017 05:51 )

Currently I use this:

Recording - Kazam, can record region of the desktop, among other things

Editing - KDEnlive, shows the sound graph very well and makes it easy to punch in markers with just typing "*", and to then remove pauses and extraneous and erroneous words. You make cuts by typing "x" and then cut in a good place. Cut once more, then type "s" to get the selection tool, select the cut part, delete it. Finally right click in the empty space and choose "Remove empty" space from the context menu. That will move all clips in that channel to the right of the cut left in order to close the space.

 KDEnlive is no good in my tests at compressing though, so I render it losslessly, and procede to the next step:

Compressing - Handbrake - still fiddling with the settings here. I want no JPEG artefacts since It's a screencast with sharp edges and few colors, so one would assume some kind of GIF or PNG encoding would be good.

Here are my settings right now for producing a screen cast:

Sound: Mono, mp3, bitrate: 96

Video: Bitrate 150kb/s. Encoder: H264. Tune: still image. Variable frame rate, 2-pass encoding.

 


Sphincs quantum resistant hashing

published Mar 14, 2017 10:47   by admin ( last modified Mar 14, 2017 10:47 )



PHINCS-256 is a high-security post-quantum stateless hash-based signature scheme


Read more: Link - SPHINCS: Introduction


ChaCha20 a cryptographic algo that is amazingly simple

published Feb 18, 2017 12:40   by admin ( last modified Feb 18, 2017 12:40 )



Chacha20 is a secure, fast, and amazingly simple encryption algorithm. It's author Daniel J. Bernstein explains it well in his Salsa20 and Chacha20 design papers (which I recommend), but did not dwell on details experts already know. Filling the gap took me a while.


Read more: Link - The design of Chacha20


Prevent Linux raising windows, disrupting your workflow

published Feb 12, 2017 12:29   by admin ( last modified Feb 12, 2017 12:29 )



Found an option in Compiz manager -> General options -> Focus and raise behaviour

Changed the 'Focus prevention level' from "Low" to "Normal" and it seems to have worked


Read more: Link - [SOLVED] Prevent newly opened apps to steal the focus


To prevent you from pasting from e.g. the web browser into a terminal

published Jan 27, 2017 12:28   by admin ( last modified Jan 27, 2017 12:28 )

On my to-read list

published Jan 22, 2017 10:47   by admin ( last modified Jan 22, 2017 10:47 )

Game theory credibility, could be interesting for smart contracts:

A Theory of Credibility - Credibility.pdf