Tuesday, 12 July 2016

Distributel Smart rg SR505N UDP Tunnelblick OpenVPN

A while back I was trying to connect to a VPN. The setup worked well for other users, and worked well in other networks other than at home. However, at home, I would connect, and experience a brief period of connectivity of a few seconds at most. The connection would remain but all the requests would basically fail after that.
After a bit of searching I found that I needed to change the MTU setting on my router/modem. I browsed to the router administrative interface, then to Advanced Setup, then to WAN, and for each listing there I clicked Edit and updated MTU size from 1452 to 1492, clicked Next 3 times, and then clicked Apply/Save. It worked! I figured it out due to this fine forum.

Tuesday, 28 June 2016


Who knows what $POSIXLY_CORRECT actually does, but it cost me an hour of time today. I needed to use process substitution <() with openssl to use a string as the input instead of a file. The command worked in my zsh console, but move it to the script, and poof! I was greeted with this error: syntax error near unexpected token `('. Apparently this can happen if $POSIXLY_CORRECT is enabled (set to "Y"), but that shouldn't happen in bash (I had the line #!/bin/bash at the start of my file).

It seems that because I was calling my bash file like this: "sh script.sh" it didn't work. I had to call "bash script.sh". Then $POSIXLY_CORRECT was not set and I was good to go.

Saturday, 13 June 2015

Upgrading GitLab from 6.7.4 (2f5b6e1) to 7.11

I bit of fun with this particular install (which is has come to be an expectation in regards to installing or updating GitLab:
  1. We found out that the update removed the ability to change the target merge branch, once a merge request is created. More: https://github.com/gitlabhq/gitlabhq/issues/7105 
  2. Towards the end of the install, the instructions actually disappeared and I could only find the 7.12 instructions. https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/6.x-or-7.x-to-7.12.md (https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/6.x-or-7.x-to-7.11.md)
  3. In step 3, (sudo -u git -H git checkout 7-12-stable),we had to stash in order to checkout: https://gitlab.com/gitlab-org/gitlab-ce/issues/220
  4. There was an error in step 4,(sudo apt-get install nodejs), which I barely noticed, and I had to install nodejs a little differently on debian: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
  5.  I accidently followed mysql instructions in step 5, (sudo -u git -H bundle install --without development test postgres --deployment),  and immediately realized it, then ran the postgres instructions. "Gems in the groups development, test, postgres and aws were not installed." Unfortunately, it saved the --without setting and excluded postgresql as well. That led to another error later on in the install. You can fix this by deleting the bundle I believe. http://stackoverflow.com/questions/17871229/rails-application-doesnt-recognize-postgres-gem http://stackoverflow.com/questions/4118055/rails-bundler-doesnt-install-gems-inside-a-group
  6. I got the error: unicorn.pid not writable directory for pid=/home/git/gitlab/tmp/pids/unicorn.pid not writable, but I just needed to chown that as it belonged to root.
  7. HTTP Push failed (SSH Push was fine), due to having the another ruby version. I changed a symlink to fix it: ln -fs /usr/local/bin/ruby /usr/bin/ruby https://github.com/gitlabhq/gitlab-shell/issues/223 https://github.com/gitlabhq/gitlab-shell/issues/211

Tuesday, 24 June 2014

1TB HDD turns to 31MB

The other day I transferred a bunch of files using Mageia to a drive which I believe was partitioned and formatted in Windows 8.1. A few days later, I noticed that Windows was reporting the drive to be 31MB in size. After a bit of research, I learned that there are some hidden areas on drives named HPA and DCO.

Of course, linux provided some handy tools to solve this issue. Using

hdparm -N /dev/sdb
I noted that HPA was enabled and only a fraction of the available sectors were indicated as available in max sectors. So, I set the max sectors equal to the available sectors using

hdparm -N p78165360 /dev/sdx
Please note that the numbers and drive identifiers are samples only (my drive didn't contain 78165360 sectors and I'm not sure it was sdb).

Credit is due to this post.

Saturday, 24 May 2014

Business Intelligence

I thought I would share my unsettling experience with Business Intelligence in Visual Studio.

When I first decided to install Business Intelligence templates, it was for Visual Studio 2012. At that time, I initially failed to have those templates installed correctly. After realizing that updates weren't applied, I was able to activate these templates.

Eventually I was interested in running these templates through Visual Studio 2013. I found out that the templates came out months after Visual Studio 2012 did, and that it would be the same for Visual Studio 2013. After a long wait, the templates came out. However, a few days later the templates were pulled back due some issues that were found.

After waiting for more than a month, the templates are finally out once again: http://www.microsoft.com/en-ca/download/details.aspx?id=42313

Tuesday, 24 September 2013

First Time: Roots Wordpress Theme Development

Bootstrap provides some powerful assistance when it comes to styling and responsive layouts. Combine this with the ease of developing a user-friendly and featured system with WordPress and the result is Roots.


A first experience with Roots

Roots provides a few directions on how to get started which I'm currently working through. The first thing you notice is that this is installed like many other themes. First you need to install WordPress by creating a database and running its installer. Using Apache I can create a virtual host:

Listen 8081

<VirtualHost *:8081>
 DocumentRoot /var/www/html3

Now that path on my Linux system is available at, or http://localhost:8081. After installing 'node.js' and grunt, I can drag the Roots theme into the WordPress templates folder, after which I can install the template from the administrator panel. Of course, I edited 'style.css' to reflect that this site was to be authored by myself.

Once I had activated the Roots theme, none of the default CSS styling was appearing. At first I thought I had run into a common Roots problem which was widely discussed on a few forums. My Apache logs showed that 404 Not Found errors were being generated for JavaScript and CSS files. My '.htaccess' file in the WordPress root folder indicated that certain URL paths should be rewritten to route to other paths on the webserver. It seemed these rewrites weren't occurring, so I thought perhaps mod_rewrite was missing from Apache. A quick phpinfo() found that Apache had rewrite as a loaded module.

To make a long story short I had to update my Apache virtual host configuration file and restart the server:

Listen 8081

<VirtualHost *:8081>
 DocumentRoot /var/www/html3
 <Directory /var/www/html3>
  AllowOverride All

I'll update this as I continue my peek into Roots.

Credit is due to: Online syntax highlighting

Wednesday, 28 August 2013

God Help Syria

With thousands dead and millions displaced, Syria's war is already a massive tragedy. I'm surely ignorant to the complexities of the conflict, but I wish it could have been avoided and I hope it won't spread into a wider conflict with international victims.

Instead of military intervention by NATO, which could draw in military opposition from Iran, Russia, and China, America could consider scaling back its support of rebels and work with Russia & China to find a diplomatic solution for Assad's removal. More public dialogue is necessary on non-violent solutions. Obviously one suggestion isn't a solution.

Who was the perpetrator of a probable chemical weapon attack this August? This is a debated question, with no obvious answer as of yet. Many suggest it was the Syrian government, while some suggest it was opposition forces, with different reasoning on both sides. Does anyone really know though? Has a possible third party been ruled out?

This isn't just a Syrian issue as nations worldwide increasingly vocalize vastly differing visions on the conflict.

If the question of who perpetrated the crime can be determined, does that mean the U.S. should intervene? One argument for intervention would be to avoid the distribution of chemical weapons to either victorious rebels, or other unknown groups. Another argument could include establishing a launching pad for an attack on Iran. Or perhaps natural gas interests are at play. Whatever the arguments, why should we trust the U.S. on this issue, either in its statements or in its actions? The U.S. is an unpredictable monster. Neither is the U.S. a good example of morals. Take for instance its past policies on climate change, it being one of the greatest laggards in the world.

I'm in favour of a deescalation of violence where possible. War is a major cause of the climate crisis, and we can rightfully question the morality of the U.S.'s military intentions based on the past.