The process is nicely explained here: http://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository/7244456#7244456 .
A week ago I returned to vim, more precisely to neovim.
Here is my story…
When I started the university (geez, that was 20 years ago) we got an account to a Unix server. On the first week I logged in and launched Midnight Commander. I wanted to check out the content of a file in my HOME folder so I pressed F3 (view) on it. However, the default editor was “vi” :) I had no idea how to quit this program so I had to ask a senior student in the lab to help me. He was kind and showed me the trick: “
:q<Enter>“. So this is how I met vi and after this I avoided it for 3 years. Then I had a Java class where there was a guy who was a big zero in programming. One day he was sitting next to me and he was using Vim! And I was using Joe. He had nice syntax highlighting and he showed me some vim tricks. And I thought “WTF? If this guy could learn it, then I can learn it too.” I asked him about it and he told me that he started it with the command “
vimtutor“. I went home and that very afternoon I went through the vimtutor too. I made some notes but I couldn’t memorize all those keyboard shortcuts. In the next few days I went through the tutorial two more times. Then I forced myself to use vim for all my text editing works and I got to like it. When I needed something I looked up how to do it with vim. The commands were logical and soon it was a pain to use any other editor.
Several years passed and I was very satisfied with Vim. I wasn’t a guru and I didn’t use many plugins, but I could solve all my problems with it. Then 2 years ago I heard that Emacs can be vimmified with the Evil plugin. I gave it a try and it was like a “better vim”. It had a nice GUI, I liked its default color scheme, it had a plugin manager, etc. I spent two weeks with its configuration and I could reproduce the majority of my vim settings. It was good.
I have several machines (desktops, laptops) and I used Emacs+Evil everywhere. I keep my settings in Dropbox, so I have the same configuration on all my computers. However, on my older machines Emacs started very slowly. Sometimes I had to wait 20 seconds! So when I wanted to edit a little script, I just launched vim. And it happened more and more often…
And now it’s present time. Two weeks ago I read about Neovim and I liked its features: a modernized vim, async job control, built-in terminal. I decided to give it a try. I created an empty
init.vim file (it’s Neovim’s
.vimrc equivalent) and transferred from
.vimrc the necessary things. It turned out that my
.vimrc had lots of obsolete settings that I could drop. On the forums I looked after the popular plugins. I even started learning vimscript :) Now my settings are better than my old Vim settings. I like Neovim and I am going to use it from now on.
If you are interested, then here is my
init.vim configuration file for Neovim. It’s a work in progress but it’s already usable.
Expect some (neo)vim posts in the future :)
If you are a peasant like me living outside of the US but you still want to listen to Pandora Radio, which is only available in the center of world (USA), then what can you do?
There is a very simple solution now. Opera offers free VPN, built directly in the browser. You can choose between German, Canadian or American VPNs. Currently this feature is only available in the development version of Opera. So here are the steps:
- install Opera (development version)
- install Flash player for Opera (Pandora is a Flash-based website)
- visit pandora.com just to see that you are kicked out
- enable VPN: with Alt+P you can access the Settings, go to Privacy & security, then enable VPN
- Open an arbitrary site. On the left side of the URL bar you’ll see that VPN is activated. Click on it and select United States.
- Visit pandora.com again. Strangely, you are let in this time…
This article (https://freedom-to-tinker.com/blog/vitaly/gone-in-six-characters-short-urls-considered-harmful-for-cloud-services/) just gave me an excellent idea…
In a nutshell: these URLs are so short that you can explore a lot of them with a simple brute force approach. Just generate a random hash and there is a high chance that it points to somewhere.
Example: with bit.ly I generated a link:
http://bit.ly/1bNGJd3 . I tried to modify some characters in the hash and in most cases it pointed to somewhere…
At http://planetb.ca/syntax-highlight-word you can find a nice syntax highlighter. It supports Python, HTML, Java, and several other languages. The rendered output can be copy-pasted to a Word document and it’ll look the same and remains editable in Word. Pretty cool.
It’s also useful if you want to make a screenshot of the syntax highlighted code. Here is an example:
Thanks to Peter F. for the link.
I have a Digital Ocean virtual private server (VPS) where I want to run a Python-Flask project of mine. The application works well on localhost, so it’s time to make it public.
However, it’s very likely that I will have to customize it a bit on the server, and thus I would like to get those changes on my localhost too. And vice versa, if I do some changes on localhost, I want to upload the new version to the server too. Copying everything via FTP for instance is out of the question. How to do it then?
Let’s use Git. Bitbucket offers free private repositories, so let’s profit of that :) I want to use that repo similarly to SVN: it’s the central repo, it must contain the latest version.
Let “client A” be the VPS and “client B” my home machine (see the figure). When I modify something on localhost, upload the changes to the central repo, log in to the server and download the latest edition. If I modify something on the server, upload the changes to the central repo, and download them on my localhost. This way the two clients are nicely synchronized.
How to upload?
Upload your local changes to the central repo:
$ git status $ git add -A . $ git commit -m "your commit message" $ git push $ git status
How to download?
Download changes from the central repo (update your local copy):
#!/usr/bin/env bash # git_down_from_central_repo.sh git fetch git pull git status
But… it’s SVN like this!
Works for me :)
The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.
Here's an excerpt:
The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 140,000 times in 2015. If it were an exhibit at the Louvre Museum, it would take about 6 days for that many people to see it.