Archive

Archive for the ‘Uncategorized’ Category

[Eclipse] use spaces instead of TABs

March 18, 2017 Leave a comment

Here is how to use spaces instead of TABs in the Eclipse IDE:

  1. Click Window -> Preferences.
  2. Expand Java -> Code Style.
  3. Click Formatter.
  4. Click the Edit button.
  5. Click the Indentation tab.
  6. Under General Settings, set Tab policy to: Spaces only.
  7. Click OK to apply the changes.

Tip from here.

Categories: Uncategorized Tags: , ,

Some IMDb alternatives

March 10, 2017 Leave a comment

IMDb shut down its message boards in February, 2017. Read more here. This is a shame. When I watched a movie, I loved to read the opinions of other people on this forum. It was a very stupid decision from IMDb and I’m sure I’ll visit their site much less.

Here are some alternatives:

Unfortunately, these sites won’t replace the good old message boards…

Project idea: write a script that takes the title of a movie and opens these sites in tabs. The sites in the tabs show the selected movie.

funny git commits

February 19, 2017 Leave a comment

Some funny GitHub commits:

Found here.

What to do if shit happened.

Categories: Uncategorized Tags: , , , ,

loop a youtube video

January 28, 2017 Leave a comment

Problem
You find an awesome music video and you want to play it in an infinite loop.

Solution
You need to re-format the youtube URL a bit. Sample:

Input: https://www.youtube.com/watch?v=VIDEO_ID

Output: http://www.youtube.com/v/VIDEO_ID?version=3&loop=1&playlist=VIDEO_ID

Concrete example: input, output.

Tip from here.

cleaning a laser mouse

January 12, 2017 2 comments

Problem
I have a laser mouse that worked very well. However, about a week ago the cursor started to move erratically. It was not moving smoothly.

Solution
The optical eye is dirty and needs some cleaning. Put a little alcohol (I used pálinka) on the tip of a Q-tip, and clean the optical eye gently. It solved the issue for me.

Here is a video of the cleaning process. The relevant part starts at 2:25.

Dropbox: .html files in your Public folder are no longer rendered in the browser

October 4, 2016 Leave a comment

Problem
Until now I’ve stored a lot of teaching material in my Dropbox’s Public folder that I shared with my students. Here I had a generated index.html file in each folder that one could render in the browser. This way, you could have a static HTML site in your Public folder that you could share easily, and any changes to it were synced automatically.

However, Dropbox changed his mind:

Dropbox Basic (free) users: Beginning October 3, 2016, you can no longer use shared links to render HTML content in a web browser. If you created a website that directly displays HTML content from your Dropbox, it will no longer render in the browser. The HTML content itself will still remain in your Dropbox and can be shared. Learn more.

Dropbox Pro and Business users: Beginning September 1, 2017, you can no longer render HTML content.” (source)

The good times are over :(

Solution
I faced this problem this morning and I started to look for an alternative. A friend of mine, Füli, suggested that I should move to github.io. And that’s what I did :) In an hour the migration was done. Here is the result: https://github.com/jabbalaci/teaching-assets.

Congratulations, Dropbox, you managed to kill one of your most attractive features…

Categories: Uncategorized Tags: , ,

Bitbucket: create SSH key, upload SSH key

August 4, 2016 Leave a comment

GitHub is very good for open source projects, I also use it. However, if you want to work on a private project alone or with some of your friends and you don’t want to share the code, then Bitbucket could be a better choice since it allows you to create unlimited number of private repositories.

Problem
You are at a new machine of yours. You create a new repository, clone it on your localhost, make some changes, and when you try to push the changes to the repo, you get an error message that you should upload your SSH key. How to do that?

Solution
Check if you have an SSH key:

$ cat ~/.ssh/id_rsa.pub

If you don’t have an SSH key, create one:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Accept the default file location and provide a passphrase.

Then copy the content of “~/.ssh/id_rsa.pub” to the clipboard and add it to your account by following these steps.

Categories: Uncategorized Tags: ,