Technical stuff

Requirements are like water. They're easier to build on when they're frozen.

Category Archives for: Quick and dirty

Howto delete a branch in git

07 March 2012 by Georgiana

Delete a branch that’s already fully merged in its upstream branch, or in HEAD if no upstream was set with –track or –set-upstream.
git branch -d feature/not-needed-anymore

If you don’t want to bother with the merge status of the branch simply use.
git branch -D feature/not-needed-anymore

Comments Off | Categories: Quick and dirty | Tags: , ,

MySQL install on Mac creates no user, how to get access as root

20 May 2011 by Georgiana

So, you installed mySql on your Mac and there’s no way to work with it, create DBs, and do any other task you need because it has no privileges?

You may either not be able to connect at all (even mysql -u root fails in your case) or you can connect, but your command-line mysql tells you something like:

mysql> use information_schema
Database changed
mysql> select * from USER_PRIVILEGES;
+----------------+---------------+----------------+--------------+
| GRANTEE        | TABLE_CATALOG | PRIVILEGE_TYPE | IS_GRANTABLE |
+----------------+---------------+----------------+--------------+
| ''@'localhost' | def           | USAGE          | NO           |
+----------------+---------------+----------------+--------------+
1 row in set (0.00 sec)

Let’s see what we can do to fix that and get you working on more important things.

1. If the mysqld server is already running on your Mac, stop it first with:

launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

2. Start the mysqld server with the following command which lets anyone log in with full permissions.

mysqld_safe --skip-grant-tables

3. Run mysql -u root to log in successfully without a password.

4. Reset all the root passwords. Make sure to replace ‘NewPassword’ with something more secure.

UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root'; FLUSH PRIVILEGES;

5. Because writing your scripts with root access is not a good practice, make yourself a favor and create a new user now, using a command like
grant all on *.* to 'your_username_here'@'localhost' identified by 'your_favorite_password_here';

6. Kill the running copy of mysqld_safe. sudo killall -9 mysqld Phew.

7. Start mysql again without the skip-grant-tables option:

8. You should be able to log in with mysql -u root -p and the new password you just set and also with the user that you created before.

That was simple, wasn’t it?

Comments Off | Categories: Computer setup, Quick and dirty

hCard brief introduction

19 November 2010 by Georgiana

Below you can find a brief list to get you started.

Comments Off | Categories: Quick and dirty, Resources | Tags: , , , ,

Migrating phone book from Nokia XpressMusic to Android using a Mac

13 December 2009 by Georgiana

Looks complicated, huh? Especially when people say there’s no real Mac-to-Android sync software.

But we’re all tekkies here, we solve stuff, and don’t complain about it ;-) And we’re using free software to do it, yummy!

All you need is PhoneDirector to get your Nokia agenda on the Mac. Just install it and follow the instructions, you should be just fine. After you get all this, export them into a .vcf file, we’ll need it in a moment.

Now, to get this info in the Android is really a piece of cake. Go to the Contacts settings in Gmail and import the .vcf file you generated with PhoneDirector. Then go to your Android phone and sync your contacts. Ta-da! Welcome to the Google world!

NB: if you’re having a hard time finding the Contacts in the Gmail app, like I did, look immediately under your labels list.

The above steps weren’t good for you? Then you might need to take a look at this.

3 comments | Categories: Quick and dirty | Tags: , , ,

How to restore your Mac settings

07 November 2009 by Georgiana

If you installed a program which took the horrible approach of rewriting your .profile settings file and you discover you don’t have access to the shortcuts from your terminal anymore, here’s how to fix it:

  • open a terminal window and make sure you navigate to the home directory
  • cd ~
  • open your profile settings using the full path to your editor (I use nano):
  • /usr/bin/nano .profile
  • make sure your PATH setting contains at least the following information:
  • export PATH=/usr/bin:/bin:
  • make the shell reload your profile
  • . ./.profile

Now we’re talking! You can ls and sudo again!

Comments Off | Categories: Quick and dirty | Tags: ,

← Older posts