Monday, June 29, 2015

Calf Heart Attack

OK! So, an update to the famous injury... Some folks call it calf heart attack. See more below, but will just jump onto what I think may be the reason, even if it looks really lame! Basically, don't cross your legs! I used to spend all the day sitting and crossing the legs is a natural way. Funny enough, I cross my left over my right, and sure enough, the right knee sharp pressure was in the spot of the left leg that eventually was "breaking" when running. Also, funny enough, I never cross the right over the left which would explain why I never had that issue with my right leg (except for once that I really strained putting a lot of force into it, so it may have been totally unrelated).

I stopped crossing my legs 2 years and I have been free of that injury the same time. Nothing of the other stuff correlated with or fixed this (stretch, hydration, warming up, compression socks, deep tissue massage, the stick, rest, no rest, change shoes, physio...). I used to have them every 3 to 6 months for almost 5 years. Boy that was frustrating. This so far seems to be the only correlation and certainly I am not planning to cross my legs just to check it is not! :)

PS.: The only other thing may had been a butt stretch (the kind that you bring your bent leg to your chest). But I think that wasn't working either in the past. The crossing the legs really seems to be the one.

PS2.: UPDATE (2/2/2019): Kept running since I wrote this article and never ever got injured again. But sure, never crossed my legs (except for very short periods) since then. It is actually not so easy to avoid crossing them :). Anyhow, if you are reading this and have a similar issue can you please comment 1/ If you cross your legs or apply any other kind of continuous pressure over the day on the calf that eventually gets injured. 2/ Did stop doing that solved the issue? Thank you! It'll help get some statistics...

OLD POST ===

Thought I would quickly list the symptoms/clues about my recurring injury in what seems to be the soleus... Maybe somebody got a clue? Please comment :)
  1. Sudden pain deep in the left calf, half height, a bit to the left.
  2. Always same leg and same point in the leg. Only once I hurt my other leg after pushing an SUV, but never "broke" again... Funny though that the pain really felt the same, so, it could be a good clue.
  3. Injury feels like a very localized pain, a bit like if you were sticking your finger deep in the muscle. The pain  is strong enough that you really got to stop running. Walking is fine but still hurts. Hurts mostly going tip toe or downstairs (typical indication of soleus damage).
  4. Once injury happens, will take 3 days for the pain to go away. One can then run no problem without pain.
  5. Nevertheless, running longer will likely bring the injury back. 
  6. So, solution is to ramp training slowly. The longer it takes to ramp, the less likely getting hurt at any of those runs.
  7. Running on your tip toes will likely bring the injury back quick.
  8. The time when it happens must be important. It never happened after a good while of running or just at the beginning (unless you were injured already), but more around the 10-15 min mark (2-3Km). Trying to see what happens around that time, I found this link about the phases of a 30 min run and a more detailed one here. It is basically the time that the aerobic systems takes to take over.
  9. It has happened many times in really easy runs. Couple of times even texting, which makes me think is a posture issue. Or in other words, very sensitive to the posture.
  10. Eating bananas has not helped (see below).
  11. Not sure hydration has anything to do.
  12. Warm weather seems to be worst.
  13. Massaging after the injury doesn't seem to help or make worst the recovery. Icing may help but not sure.
  14. Stretching before didn't seem to help but warming a bit and stretching afterwards may be helping.
  15. Working out (besides running) the soleus didn't seem to help.
  16. Deep tissue massage didn't seem to help.
  17. The rate of injury has not changed over the years (for the same kind of training). I.e., the more I train, the more times I can run without getting injured. But that likelihood is the same now, than it was few years back. I.e., getting injured doesn't seem to make things worst with time. The right leg didn't get injure ever again (touch wood).
  18. Biking is fine even when injured.
These ones look very similar to mine and the solution, may actually work...:
http://www.runnersworld.com/injury-treatment/calf-heart-attacks
http://www.endurancemag.com/2013/06/sustainability-of-you-the-anatomy-of-a-soleus-strain/

This one not so much, probably not, although the exercises may work out (?)
http://www.legacieshealthcentre.ca/resources/articles/soleus-syndrome-and-running/

I started suspecting that this may be some kind of cramp?  I mean, it does feel like a cramp but with some differences:
  1. It is a very concentrated pain in the leg, not just the whole calf, for instance. Are there micro cramps?
  2. It does feel like stretching it in order to remove it, but if you do, it can really break. What happens to a cramp if you force it? Funny enough, this link seems to nail it on what happens to me and what works... #1 still a doubt.
  3. Cramps do not seem to leave injuries. I.e., you are not more prone to a cramp just because you had one last week. Here it seems the case. It is correlated to how long ago you had the previous one, not to how trained you are...
Interestingly, this link explains that contrary to the popular believe, water or electrolytes do not seem to affect cramping rate.

I do feel that it is some lack of something, though. Like oxygen (for some time, it felt that breathing was able to control the onset). Maybe there is a lack of blood vessels to that part of the leg? That would match overall clues:

  1. The lack of nutrients/oxygen (hypoxia) eventually triggers a cramp on the region not getting them.
  2. It is not as massive as a normal cramp as it is not that your blood doesn't have the nutrients, but that small portion of the body doesn't have enough blood vessels.
  3. Training increases the build up of muscle and blood vessels, which lowers the risk.
Let's focus on hypoxia. On the Wikipedia link they say there can be couple of reasons. One of the would be ischemia, which is the lack of blood supply.

Pardon the rest: still under construction :)

https://runnersconnect.net/running-training-articles/aerobic-vs-anaerobic-training/

When running anaerobically, the muscles begin to break down sugar, but instead of producing just CO2 and water, they also produce excessive amounts of lactate. In the absence of oxygen, your body can’t clean up the extra hydrogen ion created by lactate and this is what causes that burning feeling in your muscles.

During exercise, things change. Your ATP stores are used quickly while your Anaerobic stores kick into high gear.  While that happens, your aerobic system starts producing more energy as well, though it takes about 15 minutes to really get it ramped up.

===

For my old tracking, places I left a comment on this:




Tuesday, March 17, 2015

Lowest Cost Wire Transfers

Directly to the answer... (some savings comparisons below, FYI).

The website name is TransferWise. If you click on this link  (https://transferwise.com/u/b9886f) they should give you commission free up to $4k in your first transfer. For full disclosure, every 3 of those I get $150 in my account, but seriously, keep reading :) And if you don't want to use the link, don't :)

Heads up, the signing process is a bit annoying because they need to ID you properly (to avoid money laundering, tax evasion…). Nothing too bad, all online, but they ask you for some pic of your driver license or something like that… Can't remember. Done in 10 minutes, though.

Other than that, the service is truly excellent. They give you immediate email feedback on every step of your transfer and usually exceed expectations on schedules. So far, 2 day transfers although they usually cover themselves and give you a worst forecast. The whole process is ultra transparent and they also reply very timely emails.

The best thing (who would care otherwise about anything else) are the rates. Way better than anything else I found (but hey, please comment if you got something better :) ). For instance, to transfer $10k to Euro today, they would take $85 commission (which is basically 0.85%):


I am kind of surprised to see this today, as I had read somewhere 0.75%, but will investigate later... Still way better than others I saw before... Also, I am pretty sure it is lower (0.5%) for other currencies but no worries, they’ll show it to you before anything... As I said, everything is very transparent. After taking the $85, they would convert the rest at today's rate of 1.0593 $/Euro (1/0.9440) which is exactly what Yahoo displays at this time:


So, basically they are giving you a rate 0.5-0.85% worse than the number displayed in Yahoo, which as I said, it’s very competitive.

Note: there is one more transfer fee which is the one your bank will charge you to send your money to a local US bank account on the name of TransferWise (Wells Fargo). My bank charges me $20. So, you should add that, but yeah... And the number is fix, so, the higher the dollar transfer, the lower percent that it represents...

So, that's it... but if you want to keep reading about a quick comparison when I tried to send money through my bank to Europe, here it goes...

Basically there would be two costs. The transfer itself and the conversion to Euros from dollars, which can be done at origin or destination. Rate (yahoo) at the time was 1Euro=$1.135 more or less. I tried several banks (Texans Credit Union, BBVA, Chase) and the best was 1.18!! That is 4% and I believe included both commissions. Can't really remember the details... Anyhow, you can always ask them yourself ahead of anything. They may tell you that they can't tell what the exchange rate will be because it will depend on when it actually happens in the next days. If so, ask for the exchange rate "today" just for comparison...

Cheers!

Tuesday, March 10, 2015

What if AI is here one day?

As lately this seems to be a hot topic... Some quick thoughts that I've been having for many years: 

AI is like the nuclear energy now. Invented but not used except on very controlled situations. But can it really be controlled that well? Specially if it can be done on any computer eventually...

Shouldn’t AI have the same rights as any other entity in the country, respecting its life?

What should we should define as full life vs a machine? It should have some feelings? But survival may not be the best feeling to have (may backfire against us). How about having empathy, respect, mercy… This seems the “only” hedging against an "cold" entity, and as such, AI shouldn’t be released till it had reached that level. For instance, in the movie, the machine has no feeling of loyalty or even thanks to the person that freed her up, letting him die locked inside the facility.

But if one adds feelings, will bad feelings also prosper by default from it? Like hate, etc… But may be better than none...


Still, probably the social crisis would hit already with some level of AI, not powerful enough to eliminate us but powerful enough to leave people without jobs. The only solution to this seems anticipation and a new social revolution... yeah right...

Monday, February 9, 2015

Cash back credit cards

Without annual fee:
Chase VISA: 1.5% on everything, 2% on the rotating category after is signed
Discover: 1% on everything, 5% on the rotating category after is signed
Capital One: unlimited 1.5%, no rotating categories

Saturday, November 29, 2014

Useful tips for remote connectivity/networking with Linux Mint

In previous posts I've been talking about VNC, X11, SSH, etc... Here a few left over things that are the icing on the cake:
  1. Waking up from LAN or WOL: basically, your server doesn't have to be up all the time. You can wake it up remotely, from suspend or hibernate, even from your cell phone. Worked flawlessly.
  2. How to setup Snort, a lightway network intrusion detection system. http://www.aboutdebian.com/snort.htm, http://www.informit.com/articles/article.aspx?p=21777&seqNum=3,
  3. Fail2ban scans log files for various services ( SSH, FTP, SMTP, Apache, etc., ) and bans the IP that makes too many password failures.
  4. To complement the above, you can also use Tripwire which will monitor/log changes to the files/directories.
  5. ifconfig to setup the network interface.
  6. To create a network share with Samba 
  7. How to manipulate your ethernet card
  8. List of known ports
  9. Very nice brief tutorial on ports, what they are, etc...
  10. To find the name of a server behind an IP address (reverse lookup):  nslookup 208.77.188.166. You can also use the web https://ipdb.at   
I have not work with some of these, so, as I go through them I may have a tutorial only on that.

Cheers!

Friday, November 28, 2014

Setting up VNC in Linux Mint, tunneling over SSH and connecting remotely from Windows

As we saw in my previous post, the result of working through X11 is ok, but not very pretty (although I have a feel that there is more to it, so, if you know, please comment :) ). If you want to see your desktop from another machine, the next level up is to use Vino (VNC) but many folks warn about security risks with this, as VNC per-se does not have encryption. This also requires for you to keep a session open/logged in the Linux machine (it is basically sharing the desktop). That is not the case with Xterm. It is just one more user connecting to the server.

Anyhow here is the way (I would advice to read first the whole thing so that you get an overall picture, before starting with the details):
  1. To remotely access the box from Windows. Mint comes with VNC server Vino, for full graphical access. Also, check this video.
  2. To launch the server in the terminal: /usr/lib/vino/vino-server
  3. To change preferences use vino-preferences in the terminal or type remote in the start menu (and desktop sharing will show up). 
  4. Nevertheless, that does not set all the preferences! I was having an issue connecting with TightVNC or with RealVNC because I didn't the right encryption. Type  gsettings set org.gnome.Vino require-encryption false to disable encryption.
  5. To check that the server is running and waiting: netstat -ln -A inet. To understand netstat you can check Wikipedia. Examples for Unix can be found here and here. For the DOS version, which is still cool, click here.
  6. A funny one... download gvncviewer (vnc client for linux) and run it with your own machine address. It will just go in a crazy loop exporting himself... You can close it by closing the top window.
Anyhow this is all good and easy to test within our own network, without having to go through a firewall or connecting remotely to the server in a network with dynamic IP address.

Nevertheless, as mentioned, VNC does not have encryption. Also, trying to remotely connect to a machine, for instance, at home, supported by DSL where the service provider changes your IP address every now and then, is also a challenge. So, we tackle here those two problems.

For the first, to increase security, you will want to connect VNC through SSH (tunnel). Here is the way I did, but there are also this link, this and this one (that I found but didn't use). Trying to understand this better, I found this nice link. The way I understand it:
  1. The trick lies on a very nice capability from SSH. Basically, we can request the SSH client to listen on a particular port on our local machine, and forward that down the secure connection to a port on a machine at the other end. I.e., step 2 and step 3 here are telling to the SSH client to:
    1. Listen  to a given port (the VNC port 5900) in the local machine. When we launch VNC in the local machine, we will give it an IP address (127.0.0.1) which will be explained later, and by default, VNC tries to connect to the port 5900, so, there is where the SSH client listens to, to "catch" those attempts.
    2. If there is anything, forward it to the SSH server on the other side and tell it to pass that to the right machine and the right port. In my case, the right machine is the same running SSH, and by default, I got the VNC server running on the default port (5900).
  2. So, again , in those steps, the "source port" is the port on the local machine that PuTTY listens to, and the "destination" is the server address and the port where you want that information to be forwarded to.
  3. Now, instead of having the VNC client (RealVNC or whatever), connect to the remote address ("destination"), we tell it to connect to our own machine VNC server (There is actually not such a thing, just that PuTTY will be listening there). This is done by entering the address 127.0.0.1, which is a standard address to indicate loopback. I.e., the packets that come and go from the computer network adapter are routed in and out at the network adapter level, back into or out of the machine, without ever touching the external network (LAN). See this. So, the VNC client doesn't even realize of the trick.
  4. Notice that in the remote network, where the server is sitting, gated by a given firewall, we don't need to open the VNC port on that firewall, but just the SSH port.
For the 2nd problem, on doing a VNC to a machine in a network with changing IPs, one can read this. Basically, you got to register your domain name in some server in the Internet and then, have your network, somehow, report back its IP periodically in case it has changed. So, two things are needed here.
  1. First the dynamic DNS (DDNS) server. A good list of free ones can be found here. Basically register your domain name (whatever the name you want it to be) to your network IP. The domain name may be a full name (that you may have got somewhere) or a partial name, where you pick a portion of the full domain name and the rest is assigned by you DDNS company. I am using duckdns.org, and my server domain name will be something like myname.duckdns.org.
  2. Second, your network has to report back the IP periodically, to that server, so, that the server can now it has changed. This can be done by the router of the network (D-LINK is an example of that and they even provide the DDNS server for free) or, if your router can't do that, by a computer within the network, thanks to some kind of app that the DDNS company will give you. In my case, duckdns.org gives you a step by step installation for different platforms. Really easy. In my case, using Linux, my server will use crontab to periodically send the IP to the DDNS server (duckdns.org).
Note: somehow my router seems to be a branding of a D-LINK but not sure it is working, so, I am using the crontab.

Finally, now that we got all this running, it wouldn't hurt to step up the security and get some other cool stuff going. Check my lastest post on this topic...

Cheers!

Getting X11 setup in Mint and connecting with Windows

On my previous post I explained how to connect remotely to your box through SSH. Nevertheless, that was limited to a text terminal type interface, i.e., no access to graphical applications. So, now that we got the ssh running, we want to be able to get a GUI through that pipe, i.e., a remote graphical interface to our Linux box. I basically followed these steps:
  1. You got to make sure that you got the right software on the client (Windows on my case) machine (I use Xming) and on the server side (xorg). In my case, I had to install Xming. Xorg was there. I also installed xterm but I don't think it is required (?)
  2. Installing Xming was really straightforward and didn't require any configuration. When you run it will stay on the background (you can see it as a process).
  3. Then you can launch PuTTY (see my previous post on SSH). Make sure X11 forward option is there (see link above...)
  4. Once Xming is running, you should be able to launch graphical applications...  
Note: if for any reason this does not work, delete all .Xauthority* files from your home directory, reinstall Xorg (sudo apt-get --purge remove xorg and sudo apt-get install xorg) and login again.

I am not an expert on X Window system and have not researched the details at all, but if I had to guess, basically the client (Xming) gets commands (through the SSH connection) that tell it what to paint in the screen. Xorg is the one sending those. I guess the commands are kind of high level to minimize network bandwidth. Also, the client sends commands to interact with the windows.

If anybody knows of a simple explanation/link, please comment :)

I believe there are also configuration options that can improve the quality of what you get. Nevertheless, in my case, I just jumped all the way to VNC. This is not ideal, though, as it does require to have an open session on the server. Bandwidth requirements are also likely higher. So, I may come back and create  further post on this.

Also in VNC one has to be careful with security/lack of encryption. Anyhow, that will be described in my next post...

Cheers!!