Update SourceTree password after remote change

After changing my password on the remote, I could not get Sourcetree to log in no matter what. I tried editing and deleting my accounts, deleting and re-adding the repo, nothing was working – Authentication failed every time.

Finally this solution worked for me:

navigating to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and removing (or renaming) the passwd file.

Once this file is removed, restart SourceTree and execute a fetch or something else that requires access to the repo in question. SourceTree will then prompt you for your password, rewriting the cached credentials.

Posted in Uncategorized | Leave a comment

Free Site Sucker with Recursive wget

It may be useful to get an entire website recursively like such:

wget --recursive --page-requisites www.domain.com

More details can be found here about doing this for offline windows use and with no-clobber and other options I wasn’t concerned with.

Posted in Uncategorized | Leave a comment

CentOS 7 PHP Install : mcrypt.h not found

Received the error while installing PHP:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.

Resolved it with this:
yum install epel-release
yum install libmcrypt-devel

Posted in Uncategorized | Leave a comment

Google Authenticator on Android, Invalid PIN

2FA is pretty cool, especially when you don’t have to get a text message or email. Google Authenticator generates codes that expire after 30 seconds, so I figured it’s a good option for 2FA. I tried installing it on my Samsung Android and it said it was installing for over 24 hours. Finally I gave in and connected to wifi at which point it installed in a minute or less.

Next issue was invalid PIN. No matter what I tried my PIN was invalid! Then a colleague suggested it’s because my phone’s time is off by a few minutes. Under Settings – System – Date and time – I found that “Automatic date and time” was unchecked. After checking that, my time updated and my Authenticator codes worked right away!

Posted in Uncategorized | Leave a comment

MongoDB Startup Warnings /sys/kernel/mm/transparent_hugepage/enabled is ‘always’

This happens every time and I need to look for the solution. Posting here to save time going forward.

“startupWarnings”: {
“totalLinesWritten”: 9,
“log”: [
“2015-08-21T18:47:29.634+0000 I CONTROL [initandlisten] “,
“2015-08-21T18:47:29.634+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is ‘always’.”,
“2015-08-21T18:47:29.634+0000 I CONTROL [initandlisten] ** We suggest setting it to ‘never'”,
“2015-08-21T18:47:29.634+0000 I CONTROL [initandlisten] “,
“2015-08-21T18:47:29.634+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is ‘always’.”,
“2015-08-21T18:47:29.634+0000 I CONTROL [initandlisten] ** We suggest setting it to ‘never'”,

http://docs.mongodb.org/master/tutorial/transparent-huge-pages/

Create the following file at /etc/init.d/disable-transparent-hugepages:

#!/bin/sh
### BEGIN INIT INFO
# Provides: disable-transparent-hugepages
# Required-Start: $local_fs
# Required-Stop:
# X-Start-Before: mongod mongodb-mms-automation-agent
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Disable Linux transparent huge pages
# Description: Disable Linux transparent huge pages, to improve
# database performance.
### END INIT INFO

case $1 in
start)
if [ -d /sys/kernel/mm/transparent_hugepage ]; then
thp_path=/sys/kernel/mm/transparent_hugepage
elif [ -d /sys/kernel/mm/redhat_transparent_hugepage ]; then
thp_path=/sys/kernel/mm/redhat_transparent_hugepage
else
return 0
fi

echo 'never' > ${thp_path}/enabled
echo 'never' > ${thp_path}/defrag

unset thp_path
;;
esac

2
Make it executable.
Run the following command to ensure that the init script can be used:
sudo chmod 755 /etc/init.d/disable-transparent-hugepages

3
Configure your operating system to run it on boot.
Use the appropriate command to configure the new init script on your Linux distribution.

Distribution Command
Ubuntu and Debian
sudo update-rc.d disable-transparent-hugepages defaults

Posted in Uncategorized | Leave a comment

Remove Mongodb mms automation agent

I can edit the port in the config file, but automation agent wipes that change out. How the heck does one change the port in cloud manager? I’m going to try removing and reinstalling the agent to see if that does it.

They don’t seem to want to tell you how to remove it!

On Ubuntu, dpkg -r mongodb-mms-automation-agent-manager removes it.

Posted in Uncategorized | 1 Comment

Mount Drobo 5n from Ubuntu 14

Had to do some searching to figure this out, so I’m noting it here for future reference. Even though smbclient -L works just fine, mounting with smbmount or mount -t was just not working.

apt-get install cifs-utils
mount.cifs -vv //192.168.0.3/backup /mnt/drobo/ -o user=Admin

it prompts for Admin’s password, then voila.

Posted in Uncategorized | Leave a comment

WordPress permalinks in nginx subfolder

Was having some trouble hosting a wordpress site from a subfolder of the domain, ‘/blog’. The permalinks just would not work until I found this solution:

I only had to adapt it slightly for my situation:

location /blog/ {
try_files $uri $uri/ /blog/index.php?$args;
}

I had tried several other solutions but they had results such as losing the css. This worked for me!

Posted in Uncategorized | Leave a comment

Just another wordpress child theme instruction / white page of death cure

Carelessly following these instructions, I got a WPOD.
Turns out the reason was I was copying two sections where I really only needed the second.
For the not-so-faint-of-heart;
make your child folder, such as ‘twentyten-child’ (2010, old-school, I know!)
Then you need two files to get started; style.css and functions.php as follows:

style.css
/*
Theme Name: TwentyTen Child
Theme URI: http://example.com/twenty-ten-child/
Description: TwentyTen Child Theme
Author: Joe T
Author URI: http://www.omniweb.com/wordpress
Template: twentyten
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: Blargh, light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-ten-child
*/

and functions.php

Then add any other files you need to customize and you’re safe from the upgrade destruction monster. Just good idea to keep an eye on when the parent theme is updated, what files are updated and make concurrent changes in any customized files (scary! but do it anyway you lazy lug [to myself]) -bye

Posted in Uncategorized | Leave a comment

Can’t upload as different user with VSFTP

Running vsftpd on CentOS, a user was unable to upload a file to a folder for which the user had group permissions.

Thanks to this post here, I was able to figure it out.

Needed to edit vsftpd.conf and update to include the following lines:

local_umask=002
file_open_mode=0777
anon_upload_enable=YES
anon_mkdir_write_enable=YES

After restarting vsftpd and making sure the relevant folders are group-writable, it works!

Posted in Uncategorized | Leave a comment