Archive

Archive for the ‘Uncategorized’ Category

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: ,

show my position on the map

June 21, 2016 Leave a comment

The site http://ipinfo.io/ gives you back not only your IP address, but your geolocation too. Example (with a fake IP):

$ curl http://ipinfo.io/
{
  "ip": "734.675.653.542",
  "hostname": "No Hostname",
  "city": "Debrecen",
  "region": "Debrecen",
  "country": "HU",
  "loc": "47.5333,21.6333",
  "org": "...",
  "postal": "..."
}

Let’s visualize my location:

<img src="https://maps.googleapis.com/maps/api/staticmap?center=47.5333,21.6333&zoom=9&size=480x240&sensor=false">


Debrecen, Hungary, center of the world :)

Categories: Uncategorized Tags: , , ,

How to update a GitHub forked repository?

Categories: Uncategorized Tags: , , ,