This is basically a check-list on pushing entire local repository, with all branches, tags and entire history to brand new remote repository and changing default remote setting in local repostiory from one to another. A compilation of this and this answers on Stack Overflow plus some own thoughts. Gogs and GitHub are quite similar to each other and all operations an made on command-line, so you can use this article as an aid in migrating one remote repository to another.
This article is unfinished and discontinued! It contains a lot of useful information, but will not lead you to the very end. The only reason, for which I wanted to install and use Gogs was the fact, that my programming model (Yii2-based) required me to have a really large number of private repositories (each for every component, that my applications are using). And storing them on GitHub was very expensive.
However, as of May 11, 2016 GitHub has announced an unlimited number of private repositories available for every paid plan. This rendered Gogs completely useless for me. But, in the same time, it was also a very relief for me, because even though a whole long year passed since I started writing this article, I have never actually even touched problem of reconfiguring Composer to use source other than GitHub (Gogs).
Feel free to use this article to learn more about Gogs and its installation on Windows, but keep in mind, that this artice is unfinished and pretty much likely will never be finished.
I was trying to get filesize of remote file, accessible via HTTP, using PHP’s wrappers. My attempt to do this has failed. I had all the configuration and settings correct, but still, I wasn’t able to read remote file size.
It turned out, that this is by design in PHP and there isn’t much you can do about this.Read More “Can’t get filesize when reading file over HTTP wrapper”
By an accident, I run into this question from December 2011 asking, if 4 MB of executable size for mobile devices is too much for a simple application. Even though it is over 3,5 years after asking this question, the general rule remains. I found my answer to this question quite interesting and thus I’m sharing it in here.
Root / power-user configuration on QNAP devices is a little bit different (quite weird) than this, what you can find on most Unix/ Linux systems. And sometimes you may be hit with error messages like “admin is not in the sudoers file. This incident will be reported“, “sudoers.so must be owned by uid 0” etc. Here are some tips on what to do in this case.
For second error, claiming that
sudoers.so file uid isn’t 0, first go to folder containing this file (
/opt/libexec/ on QNAP TS-210) and
ls -ls to check, who is current user of it. It should be
ls -ls chops names to 8 characters).
If it isn’t, change ownership of this file and
/opt/etc/sudoers folder, by executing:
chown admin:administrators /opt/libexec/sudoers.so chown admin:administrators /opt/etc/sudoers
As for first error, saying, that admin is not in the sudoers file, you may try to execute
sudo usermod -aG sudo,adm admin, but this will most likely fail on QNAP.
If it does, then fix this manually as described in here:
visudocommand to edit
- Scroll down contents of this file, until you reach
root ALL=(ALL) ALL.
- Hit Enter to add a new line below and write
admin ALL=(ALL) ALL.
- Hit Esc, enter
wqand hit Enter to save file and exit forsakend vi editor.
This is the only solution, that I found working on my QNAP TS-210.
All others, that required using GRUP, were impossible, as you don’t have access to GRUP during QNAP boot.
There are two (quite obvious) ways, how you can use Git on your QNAP TS-210 (or any other QNAP).
If you only want to be able to update local repositories (i.e. use QNAP as Git client) then this article is for you and all you need to do is to install Git on QNAP and generate proper SSH keys.
If, on the other hand, you would like to store on QNAP repositories, that other uses (i.e. use QNAP as Git server), then you need to search the Internet for some alternative solution, sorry.Read More “Bringing Git to QNAP TS-210”
matchCallback in AccessControlFilter in Yii2, an attempt to read
Yii::$app->controller->actionParams inside this callback fails, because these attributes are empty.
This is by design, because AccessControlFilter is executed at an earlier stage than parameters binding.
If you need to read action parameters inside
matchCallback (for example to judge, if user has access to particular action, basing on action’s parameters) then the only way is to read them from
Yii::$app->request->get(). More details here or here.