Here is how to use spaces instead of TABs in the Eclipse IDE:
- Click Window -> Preferences.
- Expand Java -> Code Style.
- Click Formatter.
- Click the Edit button.
- Click the Indentation tab.
- Under General Settings, set Tab policy to: Spaces only.
- Click OK to apply the changes.
Tip from here.
Some funny GitHub commits:
What to do if shit happened.
You find an awesome music video and you want to play it in an infinite loop.
You need to re-format the youtube URL a bit. Sample:
Tip from here.
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 :(
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…
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.
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?
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 "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.