Последние обновления Страница 2 Показать/спрятать ветки комментариев | Горячие клавиши

  • manandbytes 12:43 on August 11, 2010 Постоянная ссылка |

    Мало разводятся? Упростим процедуру! А логика? 

    В Украине рекордно сократилось количество разводов:

    На протяжении первого полугодия 2010 года в Украине зарегистрировано рекордно низкое количество расторгнутых браков.

    На фоне этого упрощение процедуры развода выглядит нелогичным. Обозначенные сложности процедуры развода мне не кажутся не настолько существенными, чтобы это

    В целом, по словам министра юстиции, на протяжении последнего десятилетия в Украине наблюдается ежегодная тенденция к уменьшению количества расторгнутых браков.

    было верно хоть какое-то продолжительное время.

    Интересно, какой теперь смысл в штампе о браке в паспорте?

    Кроме того, отныне в паспорте можно не ставить штамп о разводе.

    До сих пор было просто:

    • есть штамп о браке — человек в браке
    • нет штампа о браке или есть штамп о разводе — человек не в браке

    А сейчас что? Или это часть общего маразма, когда президент России предлагает переименовать российскую милицию в полицию на фоне аховой ситуации с пожарами в стране, и наше МВД туда же?

  • manandbytes 19:00 on August 3, 2010 Постоянная ссылка |  

    Авка… ROTFL 

    Услышал от дочки про авку. Не, я не настолько дремучий, просто для прикола заглянул в викисловарь:


    1. гавкать

    Дети, используйте лучше оригинальное «аватар» 😉

  • manandbytes 22:55 on July 16, 2010 Постоянная ссылка |
    Метки: ,   

    Compare two branches on GitHub 

    Just found out that after pushing a new branch to a project hosted on GitHub you can see the diff between this branch and main integration branch:

    • push new branch
    • go to your home page and check out ‘Public Activity’ section
    • click on the link like ‘Compare trunk branch with master’

    This will show you new commits in the just created branch:

    It’s also possible to explicitly select branches to compare under ‘Source’ tab:

    • switch to the first branch with ‘Switch Branches’
    • go to ‘Branch List’ and select the second branch

  • manandbytes 10:25 on June 30, 2010 Постоянная ссылка |
    Метки: , jgit, netbeans   

    NBGit with the latest JGit 0.8.4 

    NBGit, a module for the NetBeans IDE that adds support for working with the Git version control system, still uses an age-old version of the JGit library. But now NBGit uses the latest JGit 0.8.4:

    • JGit’s JARs, license, credits etc were updated, all usages of org.spearce.jgit.* packages were changed to org.eclipse.jgit.*, two simple methods for test case were overrided, removed couple calls to org.eclipse.jgit.lib.Repository’s refreshFromDisk(). By the way, kudos to Shawn Pearce for great commit message😉
    • JCraft’s Jsch removed from the NBGit’s distribution because NetBeans 6.8+ provides ‘Java Secure Channel integration’ module that wraps up Jsch.

    I’ve pushed my changes to GitHub (yes, ‘build from the sources’ is the single option for now) and there are actually two changesets to be considered:

    Two screenshots of NBGit in action, on both NetBeans 6.8 and 6.9:

  • manandbytes 16:16 on June 17, 2010 Постоянная ссылка |

    Don’t ever customize a default face with custom-set-faces?! 

    A while back I spent some time trying to figure out why emacsclient under X Windows woun’t start new windows (AKA frames) any more with a cryptic error message:

    *ERROR*: Arithmetic error

    It turned out that the cause of this problem was… a default font’s customization. Emacs provides a standard way to customize it’s own configration via a bunch of customize-* functions and one of them is a customize-face function. As it provides a standard UI for changing font’s parameters why not using it? So I changed the default face‘s font and this customization was stored like

      '(default ((t (:family "Comic Sans MS" :foreground "pink" :weight bold)))))

    What parameters you’re trying to customize nor their actual values doesn’t matter. It just prevents emacsclient from starting a new window.

    There is another way to configure a default font using .Xresources file by adding something like emacs.font: Consolas-12. Or may be it’s even better to leave a default face alone and customize just fixed-pitch and variable-pitch faces?

  • manandbytes 14:30 on March 3, 2010 Постоянная ссылка |
    Метки: linux   

    Create a file with random content with a given size 

    On my $DAY_JOB my colleague had been developing a feature which should handle huge files. And in order to test this feature he required such a file. With any content. The only requirement — it has to be couple gigabytes in size. An obvious solution is just to ask others for a such file and send it over the wire. But it was inconvenient at the moment for some reasons and because we are using Linux, I suggested another solution:

    mn@notebook:~$ dd if=/dev/urandom of=dvd.iso bs=1 count=1M
    1048576+0 records in
    1048576+0 records out
    1048576 bytes (1.0 MB) copied, 8.38094 s, 125 kB/s

  • manandbytes 20:16 on November 1, 2009 Постоянная ссылка |
    Метки: , ,   

    Lessons learned contributing to EGit project 

    Now it’s possible to share a project using Git provider from any place in the workspace with only a keyboard. My contribution was finally accepted and there are some lessons I’ve learned:

    • Be careful with sources had been used on the way. You may be asked under what terms you received this material.
    • Your contribution may be accepted not with all speed. Don’t expect rapid feedback on your bugs, patches, e-mails etc.
    • Holes may be present in a contributor’s guide. Do you like nitpicking? Sometimes you may be forced to resubmit your patch due to a trivial style nit.
    • When users download your sources, they must always just build. Always. Build. Without a single failing unit test. Programs with failing unit tests are difficult to contribute to, because you cannot easily determine if any change you made improved the program or not.
    • Always open is a fundamental rule of open source, so internal conversations should be avoided at any cost. Unfortunately, right now you can’t reply to a comment posted via Gerrit using your e-mail client’s feature «reply to mailing list» so that it will be posted to the comment thread in Gerrit. I hope an incoming email gateway would be implemented in Google Gerrit, sooner or later.
    • Conversations must be conducted as close to the code as possible. Tools like git format-patch, git am and Google Gerrit make this a no-brainer task.
    • «Release early, release often» sounds as an easy goal but there is still no update site with a latest pre-build version(s) of EGit.
  • manandbytes 00:02 on October 20, 2009 Постоянная ссылка |
    Метки: , gnus   

    No more ‘J-j g J-s J-j’, just ‘g’ 

    I read my e-mail with Gnus and have enabled agent mode because it’s impractical to be connected to the internet in order to compose or reply and even to read e-mail. I like an idea to get quick access to my e-mail no matter if I’m online or not.

    Finally I have been tired pressing J-j g J-s J-j many times a day just to send and receive messages. Fortunately Emacs easily allows to reduce a number of key presses due to its great extensibility. What I needed is to tell Emacs which actions to run when a default keyboard shortcut g is pressed in the summary buffer.

    Ok, C-h f define-key shows how to define a keyboard shortcut. But how do I figure out what functions to use? C-h c followed by a single key or its combination gives a function behind any keyboard shortcut. So the solution is simple:

      gnus-group-mode-map (kbd "g") (lambda () (interactive)
       (gnus-agent-toggle-plugged t)
       (gnus-agent-toggle-plugged nil)))

    You don’t even have to know what does this lambda and interactive mean. Well, in most cases 😉

    … even more work for machines ©

  • manandbytes 00:20 on October 8, 2009 Постоянная ссылка |
    Метки: , ,   


    I use Emacs and Eclipse for several years but just recently realized that the Quick Access feature in Eclipse and M-x in Emacs are the same and it would be better to use the same keyboard shortcut for both. So what should I choose: Ctrl+3 or M-x?

  • manandbytes 20:45 on September 24, 2009 Постоянная ссылка |
    Метки: , ,   

    Share project using Git without touching your mouse: Eclipse Command Framework and Quick Access 

    I’ve just imported M2Eclipse with its almost 60 plugins into my workspace. And later I want to share one of currently open projects in the midst of my current workflow using Git provider. What should I do?

    Well, in most cases it is about reaching out for my mouse, moving it, pointing it to something and clicking. I’ve to switch to Package Explorer or Projects view to achieve my task. When using Package Explorer I found myself buried under several levels of folders to where my currently edited file is located because Package Explorer is a ‘good citizen’ who obeys Eclipse User Interface Guidelines and supports the ‘Link with Editor’ feature. But what if the target project is not in the active working set? Or not active in Mylyn’s context? Yes, there are even more extra clicks ahead. I have to admit that Projects view behaves much better in this case.

    Ok, I’ve finally selected the project I want to share and am able to use its context menu. Task completed but I feel myself a bit tired 😉 The main problem with this obvious way of doing things is that I’m forced to interrupt my current task and to lose focus finding my mouse and switching between different views etc.

    Are there any other ways? Are you one of those developers who try to get as much done as possible without lifting your fingers from the keyboard like me? Keep reading.

    Back in 2007 Eclipse 3.3 introduced a new feature called Quick Access. With Quick Access, UI elements such as commands, views, wizards, preference pages etc. can be quickly listed, filtered through, selected and executed without even knowing the keyboard shortcuts to be pressed. It’s the first part of the solution. The second one is Platform Command Framework.

    The combination of Quick Access and Command Framework allows us to implement solutions for tasks like the ones I described quite easily. My implementation was inspired by Eclipse Tips: Keyboard accessibility thru Command Framework, one of awesome articles about using Command Framework by Prakash G.R.

    With this enhancement it is possible to share a single project using Git provider from almost any place in the workspace with only a keyboard:


  • activating Quick Access (which is bound to Ctrl+3 by default) and typing SWG (which means ‘share with Git’) will provide you with a list of all currently open projects not connected to any provider
  • after selecting a project share it using Configure Git Repository dialog
cоздать новую запись
следующая запись/комментарий
предыдущая запись/комментарий
показать/скрыть комментарии
перейти наверх
Go to login
Показать/Скрыть помощь
shift + esc