[{"content":"Software projects have the tendency to always grow out of proportion and most often become hard to manage because of all the other tickets. While this Jira automation is not a replacement for regular clean-ups and refinements of your tickets, it definitely helped us to keep the clutter in the project low.\nA very common visualization of this clutter taking place can be seen in the following created vs resolved graph, taken froma real open source project.\nMillions of POs and TPMs will likely be able to tell you, that this is not an observation that is limited to open source or due to sloppy engineers, it\u0026rsquo;s simply one of the constant battles of project management. I have seen it happen over and over in the last 25+ years. Follow these steps to implement this neat little ticket cleanup automation.\nAssuming your team name is bubbles, in a project called BBLS.\nCreate a rule with the name \u0026ldquo;Bubbles Deprecation\u0026rdquo; Set the JQL to something like: updated \u0026lt;= 183d AND project = BBLS AND status not in (Closed, Done) AND component in (Bubbles, Test)\nNote that you might exclude Epics from above\u0026rsquo;s JQL in case you never want to automatically close those - or maybe bugs? Your mileage may vary\u0026hellip;\nAdd a step \u0026ldquo;Edit issue fields\u0026rdquo; and only set \u0026ldquo;additional fields\u0026rdquo; to\n{ \u0026#34;update\u0026#34;: { \u0026#34;labels\u0026#34;: [ { \u0026#34;add\u0026#34;: \u0026#34;BBLS_Deprecation_{{now.jqlDate}}\u0026#34; } ] } } Add an action to add a comment, for instance:\nThis ticket has not been changed over the last 183 days and is therefore being rejected. If you believe this ticket still needs to be done, please lay out the case and reopen.\nAdd an action to transition the issue to Closed\n","permalink":"https://www.nesono.com/blog/jira_deprecation_automation/","summary":"\u003cp\u003eSoftware projects have the tendency to always grow out of proportion and most often\nbecome hard to manage because of all the other tickets.\nWhile this Jira automation is not a replacement for regular clean-ups and\nrefinements of your tickets, it definitely helped us to keep the clutter in the\nproject low.\u003c/p\u003e","title":"Jira Deprecation Automation"},{"content":"by jochen issing\nIntroduction In every company I worked for, every engineer on every level had to write a self-review about their performance at least once a year. These self-reviews are not just a formality but a crucial part of the performance evaluation and promotion process. They allow engineers to reflect on their achievements, demonstrate their value to the company, and advance their careers.\nWhile the task of self-reflection may not be a favorite among many engineers, it is a powerful tool that can significantly enhance your career growth. By mastering the art of writing effective self-reviews, you not only learn to present your achievements in a way that is easier for others to comprehend, but you also gain a deeper understanding of your professional journey. This self-awareness is a rare but crucial skill in engineering.\nThe first thing that you need to remind yourself of before you start writing, especially if you are European (Americans are usually really good with this):\nSelf-reviews are not the time to be modest. It\u0026rsquo;s the time to brag and show off.\nRelated Work A great technique often promoted for interviews is the STAR method. The \u0026lsquo;S\u0026rsquo; stands for the situation, so you should describe the problem before your accomplishments. \u0026lsquo;T\u0026rsquo; stands for the task you had at hand, \u0026lsquo;A\u0026rsquo; stands for the action you decided to take. And \u0026lsquo;R\u0026rsquo; describes the results, or better, the actual outcome of your actions. This method provides a clear structure for presenting your achievements and their impact, making it easier for others to understand and appreciate your contributions.\nMy Proposed Three-Step-Model I often simplify it to only three steps (Problem, Output, Impact - POI):\nWhat problem did we have? (P) What actions did I take, or what was my output? (O) What difference did I make, and what was the actual outcome and impact on the company? (I) Writing a Great Self-Review Collect the Data This section describes likely the most painful but most helpful part of the self-review for the individual engineer because you have to go back in time and reimagine what the world was like before implementing all those improvements, then work your way back to the present day.\nHow you collect your data highly depends on your work. Think about all the artifacts you created, the plans you made, the pull requests you landed, the design docs you wrote, and the projects you contributed to, and note them all down. This is when I curse my past self if I fail to take notes and track my work and the improvements I have made. Adding descriptions and acceptance criteria to tickets and writing down my decisions helps to avoid such conflicts with myself.\nRemember, your self-review is not just about your contributions but also about the collaborative efforts that have led to your achievements. Consider the artifacts you\u0026rsquo;ve delivered, the projects you\u0026rsquo;ve contributed to, and the ways you\u0026rsquo;ve enabled others to succeed. Your ability to foster collaboration, make compromises, and make sacrifices is equally essential. As you progress in your career, the value of teamwork and cooperation only increases.\nWriting the Self Review Once you have the data, you should see some logical clusters or \u0026ldquo;projects\u0026rdquo; you worked on. Use these clusters to create a little story for each one.\nEvery story goes through the three steps outlined above (POI). I usually create an outline with bullet points to structure my review, but the technique you use is really up to you.\nMost of the self-review time, I work only with that outline.\nSome recommendations for writing the content:\nOnly use abbreviations if you define and explain them in the document where necessary. Even within Engineering, deciphering abbreviations can be cumbersome, and the promotion committee\u0026rsquo;s members must go through dozens or even hundreds of them. Write your self-review for the least technical person farthest away from your current level and area of expertise in your company that you can imagine. The people who assess your performance cannot consider points they need help understanding. It\u0026rsquo;s on you to describe it comprehensively. Keep in mind that the performance review is not a dialogue. Nobody will reach out to you and ask what you meant by this and that. Describe the hard work you did and focus on the outcomes. Remember that there are only two universal currencies: time and money. Your CFO and the rest of the company will love you if you save tons of both. When describing the impact of your work, consider the tangible benefits it brought to the company, such as increased efficiency, cost savings, or improved product performance. Remember, you\u0026rsquo;re not alone in this process. Don\u0026rsquo;t hesitate to seek support from your manager and colleagues. They can help you recall your achievements, offer a different perspective on your work, and highlight the broader impact of your contributions. This collaborative approach strengthens your self-review and fosters a sense of support and camaraderie within your team. Keep your self-review short. As mentioned above, your readers have limited time, and the more redundant your text is, the worse your impression will be. Please don\u0026rsquo;t make it too short either, and ensure you know the length of the company standard self-review. Keep your self-review concise, focus on the most significant achievements and their impact, and avoid unnecessary details or repetition. Don\u0026rsquo;t fall for an ego trip. Reviewers wanted convincing signs of collaboration and teamwork in all the companies I worked with in the self-review. Achievements, where you formed the team and the culture, are of higher importance the higher your level is. Special Note on Promotion-Cases Promotion cases need to be very well-written self-reviews. You need to master all the sections of this article and put extra effort into making it the best self-review you have ever written.\nIn every company I worked in, there was some form of committee that decided which promotion cases were accepted or rejected and with which reasoning. Those folks usually had to assess engineers in very different areas of expertise.\nThese facts put more pressure on you to get more support from others in your organization. Including potential promotion committee members in the writing process is highly beneficial. They can provide valuable insights and help you present your achievements in the best light. However, be mindful of the potential for politics to influence the process.\nClosing Note I have shared my experiences with reading and writing self-reviews for performance review cycles, including promotion cases. If you follow the recommendations thoroughly and have significant contributions to draw from, the self-review can be fun and is excellent training for growing as an engineer.\nBottom line, my recommendation always is:\nDon\u0026rsquo;t waste much time arguing why certain processes are useless, but make them useful to you, your colleagues, and your company.\nSelf-reflection and building a solid reputation are worth the effort.\nGood luck with your next self-review!\njochen\n","permalink":"https://www.nesono.com/blog/performance_review_guidelines/","summary":"\u003cp\u003eby jochen issing\u003c/p\u003e\n\u003ch2 id=\"introduction\"\u003eIntroduction\u003c/h2\u003e\n\u003cp\u003eIn every company I worked for, every engineer on every level had to write a self-review about their performance at least once a year. These self-reviews are not just a formality but a crucial part of the performance evaluation and promotion process. They allow engineers to reflect on their achievements, demonstrate their value to the company, and advance their careers.\u003c/p\u003e\n\u003cp\u003eWhile the task of self-reflection may not be a favorite among many engineers, it is a powerful tool that can significantly enhance your career growth. By mastering the art of writing effective self-reviews, you not only learn to present your achievements in a way that is easier for others to comprehend, but you also gain a deeper understanding of your professional journey. This self-awareness is a rare but crucial skill in engineering.\u003c/p\u003e","title":"Guidelines for Writing Great Self-Reviews"},{"content":"Encouraged by a tweet, intrigued by the homepage, and this blog, I started playing around with the fish shell. Reading through the tutorial and documentation, I often felt that the right choices were done, even though sometimes a little brave (e.g. with changing \u0026amp;\u0026amp; to ; and).\nI have been using zsh for a while now after being a bash user for a long time and work on macOS, Linux, and FreeBSD and I fancy a nice prompt, in particular including repository status, number of background jobs, last commands error code, etc.\nI gave fish a shot and came up with the configuration in the following listing, which is small, simple to set up and feels like a somewhat clean configuration. The reason for that might be that the git prompt is a first class citizen in fish and that fish\u0026rsquo;s scripting language seems well designed.\n# Fish git prompt set __fish_git_prompt_showdirtystate \u0026#39;yes\u0026#39; set __fish_git_prompt_showstashstate \u0026#39;yes\u0026#39; set __fish_git_prompt_showuntrackedfiles \u0026#39;yes\u0026#39; set __fish_git_prompt_showupstream \u0026#39;yes\u0026#39; set __fish_git_prompt_color -b grey set __fish_git_prompt_color_branch -b grey yellow set __fish_git_prompt_color_upstream_ahead -b grey green set __fish_git_prompt_color_upstream_behind -b grey red set __fish_git_prompt_show_informative_status \u0026#39;yes\u0026#39; # Status Chars set __fish_git_prompt_char_upstream_prefix \u0026#39;:\u0026#39; set __fish_git_prompt_char_upstream_ahead \u0026#39;A\u0026#39; set __fish_git_prompt_char_upstream_behind \u0026#39;B\u0026#39; set __fish_git_prompt_char_stateseparator \u0026#39;.\u0026#39; set __fish_git_prompt_char_dirtystate \u0026#39;m\u0026#39; set __fish_git_prompt_char_invalidstate \u0026#39;x\u0026#39; set __fish_git_prompt_char_stagedstate \u0026#39;M\u0026#39; set __fish_git_prompt_char_untrackedfiles \u0026#39;?\u0026#39; set __fish_git_prompt_char_cleanstate \u0026#39;\u0026#39; set __fish_git_prompt_char_stashstate \u0026#39;^\u0026#39; set __fish_git_prompt_describe_style \u0026#39;branch\u0026#39; function fish_prompt set -l last_status $status if not test $last_status -eq 0 set_color -b $fish_color_error white printf \u0026#39; %s \u0026#39; (echo $last_status) set_color normal end set -l jobcount (jobs | wc -l) printf \u0026#39;[%d]\u0026#39; $jobcount printf \u0026#39;%s \u0026#39; (__fish_git_prompt) printf \u0026#39;%s \u0026#39; (date \u0026#34;+%y-%m-%d %H:%M:%S\u0026#34;) set_color green printf \u0026#39;%s\\n\u0026#39; (hostname) set_color $fish_color_cwd printf \u0026#39;%s\\n\u0026gt; \u0026#39; (prompt_pwd) set_color normal end The first two paragraphs are configuration settings of the git prompt, while the \u0026lsquo;actual work\u0026rsquo; is done in the function fish_prompt. It contains the last command\u0026rsquo;s return code with red background (if non-zero), the number of jobs in the background, a detailed git status prompt, the date and time when the prompt was printed, the hostname and in the next line the working directory.\nVery compact, very nice. Cheers,\niss\n","permalink":"https://www.nesono.com/blog/friendly-interactive-shell/","summary":"","title":"A friendly interactive shell"},{"content":"Lately I had to realise that the OwnCloud support for SQLite is literally only for testing, even if you have a single user, despite what I have read out of the documentation (which states you could use SQLite for few user sites).\nI had several issues with my calendars as well as my contacts (failed to sync, failed to import, etc.), which all vanished when I migrated/converted the database to MySQL. Luckily, OwnCloud has support for exactly that use case. Just invoke the following (given you have setup php correctly).\nNB: it might be wise to put the server into maintenance mode and/or stop the web server while doing the conversion.\nsudo -u www php occ db:convert-type --all-apps mysql \u0026lt;username\u0026gt; \u0026lt;host\u0026gt; \u0026lt;databasename\u0026gt; That\u0026rsquo;s it again. Cheers,\niss\n","permalink":"https://www.nesono.com/blog/owncloud-sqlite-only-testing/","summary":"","title":"OwnCloud SQLite is Only for Testing"},{"content":"I just wanted to delete all tags set in my Applications folder on OS X and had to look up how to accomplish that in the Terminal since it a) is quite cumbersome to do it in Finder and b) it did not quite work somehow.\nThe tags seem to be saved in the extended attributes com.apple.FinderInfo and com.apple.metadata:_kMDItemUserTags. For completeness, here is my complete \u0026ldquo;script\u0026rdquo;:\ncd /Applications for file in *; do echo $file; sudo xattr -d com.apple.metadata:_kMDItemUserTags \u0026#34;$file\u0026#34;; sudo xattr -d com.apple.FinderInfo \u0026#34;$file\u0026#34;; done That\u0026rsquo;s it and Cheers,\niss\n","permalink":"https://www.nesono.com/blog/batch-remove-tags-os-x-terminal/","summary":"\u003cp\u003eI just wanted to delete all tags set in my Applications folder on OS X and had to look up how to accomplish that in the Terminal since it a) is quite cumbersome to do it in Finder and b) it did not quite work somehow.\u003c/p\u003e\n\u003cp\u003eThe tags seem to be saved in the extended attributes \u003ccode\u003ecom.apple.FinderInfo\u003c/code\u003e and \u003ccode\u003ecom.apple.metadata:_kMDItemUserTags\u003c/code\u003e. For completeness, here is my complete \u0026ldquo;script\u0026rdquo;:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /Applications\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e file in *; \u003cspan style=\"color:#66d9ef\"\u003edo\u003c/span\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  echo $file; \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  sudo xattr -d com.apple.metadata:_kMDItemUserTags \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e$file\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e; \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  sudo xattr -d com.apple.FinderInfo \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e$file\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e; \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edone\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThat\u0026rsquo;s it and Cheers,\u003c/p\u003e","title":"Batch Remove Tags in OS X Terminal"},{"content":"My Disqus module did not seem to work any longer (the comments no longer showed up in the blog posts). I fixed it hopefully by reinstalling the Disqus module, updating the Libraries API module to version 2.x (and then reconfiguring the Disqus module).\nThe error message in my http error log was:\nCall to undefined function libraries_detect() Should work again now. That\u0026rsquo;s it again\niss\n","permalink":"https://www.nesono.com/blog/disqus-module-broken/","summary":"\u003cp\u003eMy Disqus module did not seem to work any longer (the comments no longer showed up in the blog posts).\nI fixed it hopefully by reinstalling the Disqus module, updating the \u003cem\u003eLibraries API\u003c/em\u003e module to version 2.x (and then reconfiguring the Disqus module).\u003c/p\u003e\n\u003cp\u003eThe error message in my http error log was:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-php\" data-lang=\"php\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#a6e22e\"\u003eCall\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eto\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eundefined\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003efunction\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003elibraries_detect\u003c/span\u003e()\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eShould work again now. That\u0026rsquo;s it again\u003cbr\u003e\niss\u003c/p\u003e","title":"Disqus Module Broken"},{"content":"I just fixed an issue that kept the OS X Contacts.app from synchronising with OwnCloud when running behind a reverse proxy. For those who wonder, a reverse proxy is useful if you have a gateway http server that forwards http requests for web servers in a private network.\nFirst some details on my issue: I have several web servers running in (FreeBSD) jails that listen on loopback network devices. The request coming into the host are forwarded by an nginx instance on the host to the specific jail (identified by the hostname).\nFor OS X Contacts, there are some redirects stated in the .htaccess file shipped with OwnCloud. However, a redirect in the jail somehow inserts the loopback address into the HTTP request and since it\u0026rsquo;s not a public accessible URL, the request failed.\nThe only viable solution for me was to move the redirects into the reverse proxy (nginx) so I ended up adding these statements to the site\u0026rsquo;s reverse proxy configuration:\n# rewrite rules are not working in the jail rewrite ^/test$ /index.php last; rewrite ^/\\.well-known/host-meta$ /public.php?service=host-meta last; rewrite ^/\\.well-known/host-meta\\.json$ /public.php?service=host-meta-json last; rewrite ^/\\.well-known/carddav$ /remote.php/carddav/ last; rewrite ^/\\.well-known/caldav$ /remote.php/caldav/ last; rewrite ^/apps/calendar/caldav\\.php$ remote.php/caldav/ last; rewrite ^/apps/contacts/carddav\\.php$ remote.php/carddav/ last; rewrite ^/remote/(.*)$ remote.php last; rewrite ^/(build|tests|config|lib|3rdparty|templates)/.*$ - last; rewrite ^/(\\.|autotest|occ|issue|indie|db_|console).*$ - last; Note that you might have the proxy listening to both port 443 and port 8443 so you have to make sure it\u0026rsquo;s active in both sections.\nThat\u0026rsquo;s it again and cheers,\niss\n","permalink":"https://www.nesono.com/blog/fix-redirects-owncloud-behind-reverse-proxy-server/","summary":"\u003cp\u003eI just fixed an issue that kept the OS X Contacts.app from synchronising with OwnCloud when running behind a reverse proxy.\nFor those who wonder, a reverse proxy is useful if you have a gateway http server that forwards http requests for web servers in a private network.\u003c/p\u003e\n\u003cp\u003eFirst some details on my issue: I have several web servers running in (FreeBSD) jails that listen on loopback network devices.\nThe request coming into the host are forwarded by an nginx instance on the host to the specific jail (identified by the hostname).\u003c/p\u003e","title":"Fix Redirects of OwnCloud Behind a Reverse Proxy Server"},{"content":"After I upgraded OwnCloud, I got the following error message when trying to enable the Calendar or Contacts plugins:\ncURL error 60: SSL certificate problem: unable to get local issuer certificate The only way to get around this was to download the zip files from the OwnCloud App Server and enable them in the GUI or using the php occ command.\nThat\u0026rsquo;s it again\niss\n","permalink":"https://www.nesono.com/blog/issues-installing-calendar-and-contacts-after-owncloud-upgrade/","summary":"\u003cp\u003eAfter I upgraded OwnCloud, I got the following error message when trying to enable the Calendar or Contacts plugins:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-console\" data-lang=\"console\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecURL error 60: SSL certificate problem: unable to get local issuer certificate\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThe only way to get around this was to download the zip files from the \u003ca href=\"https://apps.owncloud.com\" title=\"OwnCloud App Server\"\u003eOwnCloud App Server\u003c/a\u003e and enable them in the GUI or using the \u003ccode\u003ephp occ\u003c/code\u003e command.\u003c/p\u003e\n\u003cp\u003eThat\u0026rsquo;s it again\u003cbr\u003e\niss\u003c/p\u003e","title":"Issues Installing Calendar and Contacts after OwnCloud Upgrade"},{"content":"Just like in my previous post I need to jot down some useful commands for Lldb because I need to look them up so often. It contains standard breakpoint handling and running - just the very simple basics I should never forget. Note that this document will grow over time, hopefully.\nFirst of all, do not forget to prepend xcrun to lldb, that makes it much more useable:\nxcrun lldb \u0026lt;executable\u0026gt; Depending on the task you might find those commands useful:\ncommand description example br s -M set breakpoint at method br s -M *Symbolname* br l list breakpoints br l br del delete breakpoints br del / br del 5 / br del 1.4 r go / run application r thread until N run application until a certain line thread until 100 That\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/lldb-breakpoint-stuff/","summary":"","title":"Lldb Breakpoint Stuff"},{"content":"For my future self, I jot down some useful WinDbg commands here. It contains standard breakpoint handling and running - just the very simple basics I should never forget. First of all, make sure you are using workspaces if you want to save the session (breakpoints, executable, etc.). Note that this document will grow over time, hopefully.\nDepending on the task you might find those commands useful:\ncommand description example bm set breakpoint at symbol bm YourApplication.exe!*Symbolname* (supports wildcards) bl list breakpoints bl bc clear breakpoints bc * / bc 5-28 / bc 1 4 6 g go / run application g .reload reload application .reload /f That\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/windbg-breakpoint-stuff/","summary":"","title":"WinDbg breakpoint stuff"},{"content":"I just patched the installation of Collectd Graph Panel to make it work together with Collectd version 4.10 on FreeBSD 10.1. The value string in the Collectd Graph Panel did no longer match the (old) Collectd rrd data.\nI used the attached patch to fix it. You can simply download the patch file and run the following command in your checked out version of the Collectd Graph Panel:\ngit apply collect.patch That\u0026rsquo;s it again and cheers,\niss\n","permalink":"https://www.nesono.com/blog/make-collectd-graph-panel-show-apache-records-freebsd-101/","summary":"","title":"Make Collectd Graph Panel show Apache records on FreeBSD 10.1"},{"content":"I did not find anything on the web I thought I\u0026rsquo;d paste this here for anyone else running into this issue. I had to change the stored credentials for a git server and starting the OS X keychain failed with a strange error message that the stored password was bound to a specific user (which I naively assumed was me).\nIf you run into the same issue, you might want to erase all saved git credentials using the following command:\ngit-credential-osxkeychain erase After that, you can enter your new/old credentials again after being prompted by git.\nThat\u0026rsquo;s it again,\niss\n","permalink":"https://www.nesono.com/blog/flush-saved-git-credentials-os-x/","summary":"","title":"Flush Saved Git Credentials on OS X"},{"content":"After editing Packet Filter rules you might want to verify what you just edited before enabling the rules. Here is what I usually do on my server to not screw up the whole installation and being able to quickly get back to my previous configuration.\nFirst of all, I change pf_enable in /etc/pf.conf to NO. This makes it easier to disable the packet filter in case you lock yourself out of the server due to a bad rule. To disable it, I just have to reboot, which is possible through my providers web interface.\nNext, I let pfctl parse and print the rules as it understands them. I use the following command to do that:\npfctl -nvvvf /etc/pf.conf Note that your packet filter configuration file might have a different name. Cheers,\niss\n","permalink":"https://www.nesono.com/blog/validating-packet-filter-rules/","summary":"","title":"Validating Packet Filter rules"},{"content":"Another reminder of my classics. Sometimes, when you reduce data in a data frame some levels of categories are no longer contained in the observations after filtering but the factors still contain them in their levels.\nTo clean these up use the following command:\ncleanfactor \u0026lt;- as.factor(as.character(oldfactor)) That\u0026rsquo;s it again. Cheers,\niss\n","permalink":"https://www.nesono.com/blog/clean-and-reorder-factorscategories-r/","summary":"\u003cp\u003eAnother reminder of my classics. Sometimes, when you reduce data in a data frame some levels of categories are no longer contained in the observations after filtering but the factors still contain them in their levels.\u003c/p\u003e\n\u003cp\u003eTo clean these up use the following command:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-r\" data-lang=\"r\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecleanfactor \u003cspan style=\"color:#f92672\"\u003e\u0026lt;-\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eas.factor\u003c/span\u003e(\u003cspan style=\"color:#a6e22e\"\u003eas.character\u003c/span\u003e(oldfactor))\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThat\u0026rsquo;s it again. Cheers,\u003cbr\u003e\niss\u003c/p\u003e","title":"Clean up and Reorder Factors/Categories in R"},{"content":"The default boot delay under FreeBSD is 10 seconds. This can drive you crazy if your server is down.\nTo disable any autobot delay, you can use either an autobot_delay value of \u0026quot;0\u0026quot; to disable delay, or \u0026quot;-1\u0026quot; to even make it impossible for the user to interrupt autoboot. I am using the following setting in /boot/loader.conf:\nautoboot_delay=\u0026#34;0\u0026#34; That\u0026rsquo;s it. Cheers,\niss\n","permalink":"https://www.nesono.com/blog/reduce-freebsd-boot-time/","summary":"","title":"Reduce FreeBSD boot time"},{"content":"This is a classic in R and I tend to forget it every once in a while. So I write it down as a note for my future me.\nThis line creates a gray scale with len steps:\ngrey(1:len/len) This line creates a color scale going through hue, saturation, and value (luminance):\nhsv(1:len/len) This line creates a color scale using the hue, chroma, luminance space:\nhcl(1:360/len) That\u0026rsquo;s it again.\nCheers, iss\n","permalink":"https://www.nesono.com/blog/create-color-maps-r/","summary":"\u003cp\u003eThis is a classic in R and I tend to forget it every once in a while. So I write it down as  a note for my future me.\u003c/p\u003e\n\u003cp\u003eThis line creates a gray scale with \u003ccode\u003elen\u003c/code\u003e steps:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-R\" data-lang=\"R\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#a6e22e\"\u003egrey\u003c/span\u003e(\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003elen\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003elen)\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThis line creates a color scale going through hue, saturation, and value (luminance):\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-R\" data-lang=\"R\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#a6e22e\"\u003ehsv\u003c/span\u003e(\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003elen\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003elen)\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThis line creates a color scale using the hue, chroma, luminance space:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-R\" data-lang=\"R\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#a6e22e\"\u003ehcl\u003c/span\u003e(\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e360\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003elen)\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThat\u0026rsquo;s it again.\u003cbr\u003e\nCheers, iss\u003c/p\u003e","title":"Create Color Maps in R"},{"content":"This one is extremely useful if you want to create a quick histogram or stem plot in R.\n# makes line ends round (0) / butt (1) / square (2) par(las=2) That\u0026rsquo;s it\niss\n","permalink":"https://www.nesono.com/blog/change_line_endings_r_plot/","summary":"\u003cp\u003eThis one is extremely useful if you want to create a quick histogram or stem plot in R.\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-r\" data-lang=\"r\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# makes line ends round (0) / butt (1) / square (2)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#a6e22e\"\u003epar\u003c/span\u003e(las\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e2\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThat\u0026rsquo;s it\u003cbr\u003e\niss\u003c/p\u003e","title":"Change line endings in an R plot"},{"content":"To create a stem plot, barplot (with filled bars), or a histogram, there is a simple method in R which provides a flexible alternative to the full blown barplot and histogram plots. It\u0026rsquo;s even easier when it comes to composing multiple graphs in one plot.\nSimply use the type h to create a stem plot:\nplot( type=\u0026#39;h\u0026#39;, ... ) In case you want to have a barplot or histogram it\u0026rsquo;s wise to use square line endings and change the line width (requires tweaking):\nplot( type=\u0026#39;h\u0026#39;, lend=2, lwd=30 ) That\u0026rsquo;s it\niss\n","permalink":"https://www.nesono.com/blog/histogram_braplot_r/","summary":"","title":"Create set plots or an alternative histogram or barplot with R"},{"content":"Yesterday I had to remind myself on how to remove the row names in a data.frame. Row names are usually added by filtering steps such as subset, etc.\nAssume we want to remove the row names of the data.frame called data, we can type:\nrownames(data) \u0026lt;- c() That\u0026rsquo;s it\niss\n","permalink":"https://www.nesono.com/blog/remove-row-names-r/","summary":"\u003cp\u003eYesterday I had to remind myself on how to remove the row names in a \u003ccode\u003edata.frame\u003c/code\u003e.\nRow names are usually added by filtering steps such as \u003ccode\u003esubset\u003c/code\u003e, etc.\u003c/p\u003e\n\u003cp\u003eAssume we want to remove the row names of the \u003ccode\u003edata.frame\u003c/code\u003e called \u003ccode\u003edata\u003c/code\u003e, we can type:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-r\" data-lang=\"r\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#a6e22e\"\u003erownames\u003c/span\u003e(data) \u003cspan style=\"color:#f92672\"\u003e\u0026lt;-\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003ec\u003c/span\u003e()\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThat\u0026rsquo;s it\u003cbr\u003e\niss\u003c/p\u003e","title":"Get rid of row names in R"},{"content":"If you happen to lock yourself out of your own remote system with no hardware access to the server you mind end up in the same panic as me tonight. Since it took me surprisingly long, I thought it might be helpful to write the steps down to get a zpool mounted on a rescue (FreeBSD) system.\nI found the solution - surprise, surprise - in the FreeBSD handbook. I was reluctant to believe the handbook, since it did not require me to actually provide any drive name/id.\nFirst, I had to start the ZFS service.\nservice zfs onestart Then, I could import the pool, even though I had to force the import since the pool was previously used by another machine (my server) without exporting it.\nzpool import -f Note that your root will be exchanged to contain the zpool contents unless you change the mount point of the pool. I didn\u0026rsquo;t change it and it worked fine, but your mileage may vary. Just remember to change the mount point back before you reboot.\nThat\u0026rsquo;s it\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/mount_zfs_freebsd_rescue/","summary":"","title":"Mounting a ZFS ZPool (RaidZ) from a FreeBSD Rescue System"},{"content":"Since I happen to forget this every once in a while and end up in trying to debug in the command line but no symbols and no source is found, I drop a message for my future me:\n\u0026ldquo;Run lldb inside the xcrun enviroment:\u0026rdquo;\nxcrun lldb [binary] This seems to work fine for Xcode, Unix Makefiles (gmake), as well as ninja projects (created with CMake). Cheers,\niss\n","permalink":"https://www.nesono.com/blog/debugging_os_x_lldb/","summary":"","title":"Debugging in the Terminal on OS X with LLDB"},{"content":"Note that this page will be part of a documentation about setting up a server using FreeBSD with similar features to the existing server documentation. Also note that this page is still work in progress\nTo use EzJail on a FreeBSD host, e.g. to sandbox different services, you need to add a loopback network interface and add some aliases to it. Jails networking seems to require a dedicated network and loopback aliases can not run on the external interface. Follow the next paragraphs to add one loopback interface including three aliases.\nFirst, create the loopback interface in rc.conf:\ncloned_interfaces=\u0026#34;lo1\u0026#34; Then, add some aliases to the loopback interface in rc.conf:\nifconfig_lo1_alias0=\u0026#34;inet 10.1.1.1 netmask 255.255.255.0\u0026#34; ifconfig_lo1_alias1=\u0026#34;inet 10.1.1.2 netmask 255.255.255.0\u0026#34; ifconfig_lo1_alias1=\u0026#34;inet 10.1.1.3 netmask 255.255.255.0\u0026#34; If you happen to add an alias to an already running server, you might want to avoid rebooting and therefore also invoke the following command to add the alias while keeping the system running:\nifconfig lo1 alias 10.1.1.3 netmask 255.255.255.0 That\u0026rsquo;s it.\niss\n","permalink":"https://www.nesono.com/blog/loopback-network-with-alias-freebsd/","summary":"","title":"Add Loopback Network Interface with Alias on FreeBSD"},{"content":"If one of your hard drives dies on your FreeBSD server, you need to format the new hard disk in the exactly same layout as the existing/previous disk was formatted. Last time when one of my hard drives started failing, I used the following steps to match up the partition layout between the new and the old (still working) hard drive.\nFirst I figured out the layout of the existing hard disk (in this case ada1)\ngpart show ada1 =\u0026gt; 34 3907029101 ada1 GPT (1.8T) 34 6 - free - (3.0K) 40 128 1 freebsd-boot (64K) 168 8388608 2 freebsd-swap (4.0G) 8388776 3898640352 3 freebsd-zfs (1.8T) 3907029128 7 - free - (3.5K) Then I created the GPT on the new disk (ada0):\ngpart create -s gpt ada0 Add the boot section:\ngpart add -b 40 -s 128 -t freebsd-boot ada0 Set the boot code:\ngpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 Create the swap partition:\ngpart add -s 8388608 -t freebsd-swap -l swap10 ada0 Add the ZFS partition:\ngpart add -t freebsd-zfs -l disk10 ada0 Then take the disk online:\nzpool online tank /dev/ada0p3 And finally start resilvering:\nzpool replace tank /dev/ada0p3 That\u0026rsquo;s it.\niss\n","permalink":"https://www.nesono.com/blog/exchange-broken-drive-in-zfs/","summary":"","title":"Exchange a broken hard drive in a running ZFS pool"},{"content":"Today I found out some features of the Skype chat that must have sneaked in in the last versions, since nobody has posted about it yet. I was having a hard time when pasting text into the chat which contained character that were easily misinterpreted as emoticons, e.g. (0) as well as using basic text formatting like bold, italic or strikethrough.\nSo here are my findings, I also posted on SuperUser:\nStyle Example bold This is *bold* text italic This is _italic_ text strikethrough This is ~strikethrough~ text plain text inline Use this for inline {code}no text formatting, no emoticons, monospaced text{code} or like this: ```no text formatting, no emoticons, monospaced text``` plain text full !! no text formatting, no emoticons, monospaced text no text formatting @@ *no text formatting* but emoticons :D NB: Use Shift+Return if you want to insert a carriage return instead of sending the message (thanks to Mr Lister).\nThanks to Shrek for the two options (@@, and {code}).\nThanks to Michael Balanov for the hint about using three backticks (```) instead of {code}.\nThat\u0026rsquo;s it again,\niss\n","permalink":"https://www.nesono.com/blog/formatting-text-in-skype/","summary":"","title":"Formatting Text in Skype"},{"content":"Often I found myself starting an extra vimdiff session while I am actually working in another vim session. Finally, I took the time to search for a solution and I came up with the following two lines in my .vimrc:\nnnoremap \u0026amp;lt;leader\u0026amp;gt;dt :windo diffthis\u0026lt;cr\u0026gt; nnoremap \u0026amp;lt;leader\u0026amp;gt;do :windo diffo\u0026lt;cr\u0026gt; They blindly go through all windows in the current view and enables or disable vimdiff, so use them with caution if you are a split view junky.\nThat\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/vimdiff_open_files/","summary":"\u003cp\u003eOften I found myself starting an extra vimdiff session while I am actually working in another \u003ca href=\"http://www.vim.org\" title=\"Vi IMproved\"\u003evim\u003c/a\u003e session. Finally, I took the time to search for a solution and I came up with the following two lines in my \u003ccode\u003e.vimrc\u003c/code\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-vim\" data-lang=\"vim\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#a6e22e\"\u003ennoremap\u003c/span\u003e \u0026amp;\u003cspan style=\"color:#a6e22e\"\u003elt\u003c/span\u003e;\u003cspan style=\"color:#a6e22e\"\u003eleader\u003c/span\u003e\u0026amp;\u003cspan style=\"color:#a6e22e\"\u003egt\u003c/span\u003e;\u003cspan style=\"color:#a6e22e\"\u003edt\u003c/span\u003e :\u003cspan style=\"color:#a6e22e\"\u003ewindo\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003ediffthis\u003c/span\u003e\u0026lt;\u003cspan style=\"color:#a6e22e\"\u003ecr\u003c/span\u003e\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#a6e22e\"\u003ennoremap\u003c/span\u003e \u0026amp;\u003cspan style=\"color:#a6e22e\"\u003elt\u003c/span\u003e;\u003cspan style=\"color:#a6e22e\"\u003eleader\u003c/span\u003e\u0026amp;\u003cspan style=\"color:#a6e22e\"\u003egt\u003c/span\u003e;\u003cspan style=\"color:#a6e22e\"\u003edo\u003c/span\u003e :\u003cspan style=\"color:#a6e22e\"\u003ewindo\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003ediffo\u003c/span\u003e\u0026lt;\u003cspan style=\"color:#a6e22e\"\u003ecr\u003c/span\u003e\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThey blindly go through all windows in the current view and enables or disable vimdiff, so use them with caution if you are a split view junky.\u003c/p\u003e","title":"Change to Vimdiff mode with two files open in a split view in vim"},{"content":"Today I was working with a colleague and reasoned about some code over chat. We sent filename and line number frequently and I got the impression that this is another perfect candidate for automation.\nHence, I came up with the following solution, which can also be found on my .vimrc on github. Note that you need to check for the system vim is running on (linux/mac) or just pick the one line that matches your system.\n\u0026#34; mac version nnoremap \u0026amp;lt;leader\u0026amp;gt;cfn :let @*=expand(\u0026#34;%\u0026#34;).\u0026#34;:\u0026#34;.line(\u0026#34;.\u0026#34;) \u0026#34; linux version\u0026lt;CR\u0026gt; nnoremap \u0026amp;lt;leader\u0026amp;gt;cfn :let @+=expand(\u0026#34;%\u0026#34;).\u0026#34;:\u0026#34;.line(\u0026#34;.\u0026#34;)\u0026lt;CR\u0026gt; That\u0026rsquo;s it again,\niss\n","permalink":"https://www.nesono.com/blog/vim_copy_filename/","summary":"\u003cp\u003eToday I was working with a colleague and reasoned about some code over chat.\nWe sent filename and line number frequently and I got the impression that this is another perfect candidate for automation.\u003c/p\u003e\n\u003cp\u003eHence, I came up with the following solution, which can also be found on my .vimrc on \u003ca href=\"https://github.com/nesono/nesono-bin/blob/master/vimrc\"\u003egithub\u003c/a\u003e.\nNote that you need to check for the system vim is running on (linux/mac) or just pick the one line that matches your system.\u003c/p\u003e","title":"Copy Current Filename and Line Number to Clipboard With Vim"},{"content":"Since some weeks, I am almost completely using tig for my work with git repositories. It requires a unix shell and git to be installed (I have not tried to install it on windows) and I have found that the keyboard shortcuts need some tweaking.\nThe shortcuts are easy to remember and are particularly easy to use on a US layout keyboard (i.e., where |, {}, [], etc. are easily avaialble).\nStandard Tasks = adds/removes files/changes from the index. - discards changes in tracked file. x deletes untracked files. \u0026lt; fetches the current state from the origin. \u0026gt; pushes to the origin. ` ` { branches off (prompts for branch name) } merges (prompts for branch to merge) c commits verbosely (shows changes in editor) + amends to last commit ^ pushes to stash v pops from stash [ decrease diff context ] increase diff context p cherry-pick a selected commit Standard Views 1 main view 2 status view 3 view log 4 tree view 5 stash view 6 grep view l list branches (generic) Small Helpers l graphical log for selected file (tree view only) r git ls-remote P fetch all and prune y copy truncated hash to clipboard Y copy full hash to clipboard c checkout branch (branch view only) There are some small additional settings as well as some sensible defaults. Check them using the h key.\nThe full tigrc file can also be found on github.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/tig-start/","summary":"","title":"TIG - Git Curses Interface"},{"content":"If you see strange symbols in iTerm when using vim, especially with the NERD Tree and Undo Tree, or in tig, a super fast and flexible curses-based git interface, or simply when typing non ASCII characters in iTerm, you might want to add this to your shell config file (e.g., ~/.bashrc, ~/.zshrc, \u0026hellip;):\nexport LC_ALL=en_US.UTF-8\nDo not forget to restart your shell!\nThat\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/utf-8-graphics-in-iterm/","summary":"","title":"UTF-8 Graphics in iTerm"},{"content":"Today I wanted to download the right kernel source code and found this helping blog post. However, I got the feeling that the url can be built automatically to avoid fetching the wrong URL. Use the following command instead and it should always fetch the appropriate sources according to your currently running machine:\nfetch ftp://ftp.freebsd.org/pub/`uname -s`/releases/`uname -m`/`uname -r`/src.txz I hope this was at least a little helpful ;)\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/download-corresponding-freebsd-kernel-source-code/","summary":"\u003cp\u003eToday I wanted to download the right kernel source code and found \u003ca href=\"http://www.netroby.com/view.php?id=3595#.U0xJbuaSxQ4\"\u003ethis helping blog post\u003c/a\u003e.\nHowever, I got the feeling that the url can be built automatically to avoid fetching the wrong URL.\nUse the following command instead and it should always fetch the appropriate sources according to your currently running machine:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efetch ftp://ftp.freebsd.org/pub/\u003cspan style=\"color:#e6db74\"\u003e`\u003c/span\u003euname -s\u003cspan style=\"color:#e6db74\"\u003e`\u003c/span\u003e/releases/\u003cspan style=\"color:#e6db74\"\u003e`\u003c/span\u003euname -m\u003cspan style=\"color:#e6db74\"\u003e`\u003c/span\u003e/\u003cspan style=\"color:#e6db74\"\u003e`\u003c/span\u003euname -r\u003cspan style=\"color:#e6db74\"\u003e`\u003c/span\u003e/src.txz\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eI hope this was at least a little helpful ;)\u003cbr\u003e\nCheers,\u003cbr\u003e\niss\u003c/p\u003e","title":"Download the Right FreeBSD Kernel Source Code"},{"content":"A trick to reduce the memory usage of LaTeX (instead or in addition to increase LaTeX\u0026rsquo;s memory as shown in my previous post) and to reduce build times for large documents with many tikz figures is to use tikzexternalize. I add the following lines to my document definition:\n\\usepackage{tikz} % all my graphs and some hand tikz\u0026#39;d \\usetikzlibrary{patterns} \\usetikzlibrary{external} \\tikzexternalize[prefix=./] Note that now many packets need to be wrapped into code that disables and re-enables externalising again, e.g., the todo package:\n\\newcommand{\\xtodo}[2][]{\\tikzexternaldisable\\todo[#1]{#2}\\tikzexternalenable} or the missing figure command of the same package:\n\\newcommand{\\xmissingfigure}[2][]{\\tikzexternaldisable\\missingfigure[#1]{#2}\\tikzexternalenable} Due to this side effect I would only recommend to use tikzexternalize when in urgent need, i.e., the document build times are unbearable.\nThat\u0026rsquo;s it again!\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/latex-tikzexternalize/","summary":"","title":"LaTeX tikz externalize to reduce memory usage and cache figures"},{"content":"Today I had to increase the main memory of my LaTeX installation yet another time and it required quite a while to collect the information again. Therefore, I am pasting my steps here as a future reference.\nFirst of all, this is the error message I try to get rid of:\n! TeX capacity exceeded, sorry [main memory size=5000000]. It is caused by my tikz figures that have been created using the tikzDevice package for R.\nI fixed my problem using the following steps:\nOpen the specific texmf.cnf and go to line 697: sudo vim /usr/local/texlive/2013/texmf-dist/web2c/texmf.cnf +697 Change the value main_memory to 9000000 (was enough for me). Run fmutil helper script: sudo fmtutil-sys --all After that LaTeX ran fine again.\nThat\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/tikx_memory_issues/","summary":"","title":"LaTeX tikz main_memory problems on OS X"},{"content":"The last update of R\u0026rsquo;s tikzdevice (0.7.0) broke all my manually tuned graphs and now I have way too large margins, symbols and text sizes, etc. Even though this update was actually a fix to the previously broken tikzdevice (it simply needed insane amount of margins compared to the other output devices due to fishy metrics), I had workarounds in each graph which I had to fix now - again - manually.\nI knew I needed to rebuild all tex files from the corresponding R files and so was able run a simple but awesome script that accelerated the whole process a lot. It boils down to the tip I got from Munky Morgy, which finally made xargs on OS X work for me:\nfind . -regex \u0026#39;.*/[^_].*\\.R\u0026#39; -print0 | xargs -0 -P 16 -I {} ./_callR.sh {} This searches for all files ending with .R and not starting with an underscore below the current directory. Files starting with underscore are include or helper files in my project, so I do not want to process those.\nThe script _callR.sh is simple as that:\nRscript $1 ${1%%.R}.tex And in each R file, I use the first argument as my output file. What a relief - now latexmk should take the leap and parallelise building of the tex sources. ;)\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/xargs_osx_tikzdevice/","summary":"","title":"Using xargs on OS X to rebuild all my tikzdevice images with Rscript"},{"content":"For some weeks I had to cope with a monochrome vim in MSYS/MinGW, which turned out to be a really horrible experience to be honest and I avoided vim as often as I could. Searching on the web did not help much, therefore I want to share the little thing with you\nThe problem was that I was setting the TERM system environment variable in mintty (using the settings in the upper left corner) to xterm-256colors.\nThe solution was to reset the TERM system environment variable to xterm.\nThe colors instantly came back I was able to use my full dotfiles repository (except for UltiSnips due to the dependency on python) in MinGW - I seem to have a working system again after all this time\u0026hellip;\nThat\u0026rsquo;s it, cheers!\niss\n","permalink":"https://www.nesono.com/blog/vim-missing-colors-mingw-mintty/","summary":"","title":"Vim is missing colors in MinGW when using mintty"},{"content":"After reading an article on quadpoint.org I have been configured my IRSSI irc client with a highlight window as suggested by the author. Since I am running IRSSI in a screen/tmux environment, I only need to restart it when my (virtual) machine has been restarted, which is rarely the case. However, after restart, the highlight window is rarely in the right place.\nTo work around that, I am using the following steps to regain original window layout. I am sharing them with you as it might either help you getting your layout back or you might help us finding a better solution.\nFirst of all, I switch to the highlight window using the escape key. Then, I am invoking the following commands:\n/wc /window new split /window size 16 /hilight nesono Do not forget to change nesono to your username instead.\nHappy IRSSI\u0026rsquo;ng,\niss\n","permalink":"https://www.nesono.com/blog/highlight_irssi_fix/","summary":"","title":"Fixing the highlight window in IRSSI after restart"},{"content":"After my last trials with OmniCppComplete, exuberant-ctags, and similar vim plugins or packages I was really reluctant to restart this endeavor again and again with disappointment in the end.\nWhile IDEs like Eclipse, Visual Studio, and XCode were getting stronger, my vim usage has degraded to plain text and short task single file editing where fewer magic was sufficient and the universal powers of vim most appropriate. Even then, I was often drawn to editors like Sublime Text 2 due to features like multi cursor and plugins like emmet.\nFinally, my journey might have found an end! After reading this blog about Vim autocomplete on the web and watching a screencast on youtube, I charged enough energy to give it another try.\nI basically followed mostly mentioned blog with the exception that I am using ultisnips instead of snip-mate because it simply worked better for me. I installed the bundles using the excellent pathogen, which also fits nicely with my dotfiles in my github repo.\nIn the end, I added the following bundles:\nclang_complete SuperTab UltiSnips Syntastic I am using these extensions now for quite a while and except for highly sophisticated tasks and huge projects, everything runs fine out of the box. UltiSnips is actually turned out to be a killer feature - and is highly customisable. The only flaw I have found is that clang_complete fails if the file path contains a white space character.\nThat\u0026rsquo;s it again and cheers!\niss\n","permalink":"https://www.nesono.com/blog/vim_cxx_almost/","summary":"","title":"Vim Packages for C/C++ Programming finally working - almost"},{"content":"Today I installed clang_complete using Pathogen (i.e., I installed it as a submodule of my dotfiles git repository aka nesono-bin. I tried to be smart and went into the submodule\u0026rsquo;s directory and invoked make install. That nicely built the vimball and installed itself - but whenever I tried to open a cpp-file I got the following error:\n\u0026#34;/tmp/sample.cpp\u0026#34; 10L, 144C Error detected while processing function \u0026lt;SNR\u0026gt;15_ClangCompleteInit..\u0026lt;SNR\u0026gt;15_initClangCompletePython: line 29: Traceback (most recent call last): File \u0026#34;\u0026lt;string\u0026gt;\u0026#34;, line 1, in \u0026lt;module\u0026gt; File \u0026#34;/Users/iss/nesono-bin/vim/bundle/clang_complete/plugin/libclang.py\u0026#34;, line 63, in initClangComplete Config.set_compatibility_check(False) File \u0026#34;/Users/iss/nesono-bin/vim/plugin/clang/cindex.py\u0026#34;, line 3126, in set_compatibility_check raise Exception(\u0026#34;compatibility_check must be set before before \u0026#34; \\ Exception: compatibility_check must be set before before using any other functionalities in libclang. line 30: E121: Undefined variable: l:res E15: Invalid expression: l:res == 0 The error message was caused by the fact, that vim was loading clang_complete twice, as it was now installed in the bundle directory and in the plugin directory.\nTo fix this issue, I deleted all clang_complete related files:\nbin/ doc/clang_complete.txt doc/tags plugin/clang/ plugin/clang_complete.vim plugin/libclang.py plugin/snippets/ Everything worked pretty fine from now on.\nThat\u0026rsquo;s it again\niss\n","permalink":"https://www.nesono.com/blog/install-clang_complete/","summary":"","title":"Installing clang_complete using Pathogen"},{"content":"While my dotfile repository nesono-bin has been changed to run fine on Cygwin recently, I suddenly had severe problems using Win32 gvim. Looking at the symptoms it became soon obvious that they were caused by the Cygwin-style symbolic link that was created by the nesono-bin installer script under Cygwin.\nThe sad truth is that symbolic links from Cygwin are by no means file system level symbolic links but need to be expanded by the Cygwin shell to handle them correctly. The only solution I have found is to install the LinkShellExtension (LSE), manually remove the Cygwin symbolic links (i.e., ~/.vimrc and ~/.vim/), and manually create the links pointing from %HOME%\\.vimrc to %HOME%\\nesono-bin\\vimrc as well as from %HOME%\\.vim to %HOME%\\nesono-bin\\vim. Apart from that, I also had to do some additional checks in .vimrc, but then: No more errors at startup like unreadable settings files - what a relieve!\nLSE seems to support some more fancy stuff like Junctions, etc. so it\u0026rsquo;s definitely worth a look. So much for today,\niss\n","permalink":"https://www.nesono.com/blog/win32-symlinks-vim/","summary":"","title":"Getting Win32 Vim Running with symbolic links for .vimrc and .vim/"},{"content":"After doing some background upgrading for my dot-files project - also called nesono-bin as there are many helper scripts in there - I though it might be good to list the new features in one list, since the features mostly creeped in over the last weeks:\nCygwin/MinGW support (yes, I need to use Windows sometimes now) FreeBDS support (yes, I still try to be cool) Supporting different installation directory than $HOME vim configuration stuff (bundles, themes, plugin handling, etc.) mercurial (hg) support in prompt Cheerio,\niss\n","permalink":"https://www.nesono.com/blog/nesono-bin-recent-updates/","summary":"","title":"nesono-bin recent updates"},{"content":"A long while ago, I re-wrote the transfer stack for the shell in Python. The transfer stack is the counterpart to the directory dtack, which is known by the commands pushd, popd, and dirs. The corresponding tools of the transfer stack are pusht, popt, and transfers, all of which can be found in my github repository.\nWhile the directory stack is extremely useful for changing directories back and forth, the transfer stack has its strength when many files from different places should be collected in one or more destination directory. The directory stack thereby supports both copying and moving files or directories from any source into any destination, as long as there exists a path. It\u0026rsquo;s functionality is very similar to the drop stack of Path Finder\nWith pusht, you can add files or directories to the stack, which should be moved or copied into some destination directory:\npusht mv fileA.txt cp dirA fileB.txt cd some/where/else/ pusht cp fileC.txt dirB The transfers command shows the contents of the Transfer Stack including information, if the file/directory should be moved or copied.\ntransfers And with popt you can apply single or all stack actions or discard single or all stack actions.\npopt -a Before the re-write I had two versions of the transfer stack for bash and zsh, of which the zsh variant showed problems on OS X lately. The new version is cleaner, simpler and should run on all unixes with Python (tested under 2.7) and in all shells, hopefully ;)\nBut check it out your self!\n","permalink":"https://www.nesono.com/blog/transferstack_python/","summary":"","title":"Transferstack rewrite in Python"},{"content":"Since my current job forces me to work on Windows most of the time, I desperately tried to get any shell/terminal on Windows shell to the same level as all other *nix shells in the 20th century. It turned out to be an endeavour but with a decently working bash in the end.\nAfter trying MinGW, Cygwin, MKS ToolKit, and supplementary terminal emulators like Console2 and ConEmu, I finally stuck with Cygwin. The best terminal emulator (the application that runs the shell) for me is the mintty.exe that is shipped with Cygwin. It supports copy paste (even though through weird short cuts), window resizing (yay!), terminal colors, and different terminal fonts - you see I became pretty frugal over time.\nThe key for me were the following steps:\nMake minimal Cygwin setup and install additional stuff separately (i.e., git, subversion, cmake, etc.)\nWhy? Because installing both the Cygwin version and the separate installer causes strange problems Setup keyboard short cuts etc. in mintty.exe\nWhy? Because short cuts are the ohly way to stay sane, even if you copy using Ctrl-Ins and paste using Shift-Ins Add additional stuff to system\u0026rsquo;s PATH variable\nWhy? Because I want to use the installed stuff from within Cygwin Create startup batch scripts (see below)\nWhy? Because I wanted to develop or at least build from within Cygwin Install SP1 of VS2010\nWhy? Because otherwise environment variables tmp and TMP make problems among other things Clone and install nesono-bin from github\n*Why? Because then I have colors, a good prompt, useful setup of bash and zsh (if I really want this), all my helper tools, history search backwards using PageUp, etc.) And actually, that\u0026rsquo;s it. So if you come from Linux, Mac or some other *nix system and you want to have a useful shell on Windows, don\u0026rsquo;t search around like me. It will safe several years of your life just to stick with Cygwin and get it work on a minimal level.\nStartup batch scripts The startup batch which is shipped with Cygwin script is located in C:\\cygwin\\Cygwin.bat if you used the default location for your installation and contains the following content:\n@echo off C: chdir C:\\cygwin\\bin bash --login -i To have access to Visual Studio tools you need to create another batch script that loads the environment in Windows cmd.exe and then start your mintty session from there.\nI am using the following construct for Visual Studio 2010 (which also includes the Azure SDK):\n@echo off echo \u0026#34;Loading Visual Studio environment...\u0026#34; call \u0026#34;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat\u0026#34; echo \u0026#34;...finished\u0026#34; echo \u0026#34;Loading Azure environment...\u0026#34; call \u0026#34;C:\\Program Files\\Microsoft SDKs\\Windows Azure\\.NET SDK\\2012-10\\bin\\setenv.cmd\u0026#34; echo \u0026#34;...finished\u0026#34; set CC=cl set CXX=cl echo \u0026#34;Starting mintty...\u0026#34; start C:\\cygwin\\bin\\mintty.exe -i /Cygwin-Terminal.ico - echo \u0026#34;...finished! Over and out :)\u0026#34; Note that I also add CC and CXX environment variables. I found this useful for some build systems, but may be optional and you decide to include them on your own :)\nNow you should add start links e.g. in C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Cygwin that point to the newly created batch files. I create the links by copying and modifying the existing Cygwin link and renaming it.\nThat\u0026rsquo;s it again,\niss\n","permalink":"https://www.nesono.com/blog/cygwin_usable/","summary":"\u003cp\u003eSince my current job forces me to work on Windows most of the time, I desperately tried to get any shell/terminal on Windows shell to the same level as all other *nix shells in the 20th century.\nIt turned out to be an endeavour but with a decently working bash in the end.\u003c/p\u003e\n\u003cp\u003eAfter trying \u003ca href=\"http://www.mingw.org/\"\u003eMinGW\u003c/a\u003e, \u003ca href=\"http://www.cygwin.com/\"\u003eCygwin\u003c/a\u003e, \u003ca href=\"http://www.mkssoftware.com/products/\"\u003eMKS ToolKit\u003c/a\u003e, and supplementary terminal emulators like \u003ca href=\"http://sourceforge.net/projects/console/\"\u003eConsole2\u003c/a\u003e and \u003ca href=\"https://code.google.com/p/conemu-maximus5/\"\u003eConEmu\u003c/a\u003e, I finally stuck with Cygwin.\nThe best terminal emulator (the application that runs the shell) for me is the \u003ccode\u003emintty.exe\u003c/code\u003e that is shipped with Cygwin.\nIt supports copy paste (even though through weird short cuts), window resizing (yay!), terminal colors, and different terminal fonts - you see I became pretty frugal over time.\u003c/p\u003e","title":"Configure Cygwin to be usable"},{"content":"I have to add this here also, as all other information I found on the internet was misleading: Just open the user\u0026rsquo;s environment variables dialog and add a user environment variable HOME pointing to your home directory - e.g. C:\\Users\\username.\nThat\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/cygwin-change-home-folder/","summary":"\u003cp\u003eI have to add this here also, as all other information I found on the internet was misleading:\nJust open the user\u0026rsquo;s environment variables dialog and add a user environment variable \u003ccode\u003eHOME\u003c/code\u003e pointing to your home directory - e.g. \u003ccode\u003eC:\\Users\\username\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eThat\u0026rsquo;s it,\u003cbr\u003e\niss\u003c/p\u003e","title":"Cygwin Change Home Folder"},{"content":"While working with unfamiliar and large svn trees I was wondering how I can get all svn externals within the source tree on the command line. As almost always, stackoverflow has the answer:\nsvn pg svn:externals -R That\u0026rsquo;s it again and cheers!\niss\n","permalink":"https://www.nesono.com/blog/list-svn-externals/","summary":"","title":"List all svn externals in an SVN tree"},{"content":"Check out the recent update on my mail server documentation here. After years of using my mail server actively, I finally changed to an ISP that blocks port 25, so I had to add the two ports from the head line to the postfix ports. However, the solution did not turn out to be straight forward but involved iptables rules.\nJust follow above link and read on.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/postfix_listen_465_and_587/","summary":"","title":"Let Postfix 'listen' on 465 and 587"},{"content":"As I could not convince postfix to listen to different ports than 25 for local mail delivery AND use dovecote as the LDA, I decided to add iptables rules to forward all incoming connections to standard ports 465 and 587 to my primary port 25. Note that port 587 makes TLS mandatory and due to the fact that I suppress non-TLS I don\u0026rsquo;t run into problems here.\nAs far as google nows, Ubuntu has no default configuration file for iptable rules. Therefore, I decided to add the rule set from scratch by hand (which was not difficult anyway). I simply added the following script to a new file /etc/init.d/iptables:\n#!/usr/bin/env bash # add redirect rules for ports 465 and 587 (to let postfix run on different ports) iptables -t nat -A PREROUTING -p tcp --dport 465 -j REDIRECT --to-ports 25 iptables -t nat -A PREROUTING -p tcp --dport 587 -j REDIRECT --to-ports 25 Then, make the script executable:\nsudo chmod 755 /etc/init.d/iptables And finally add it to the startup rules:\ncd /etc/rcS.d ln -s ../init.d/iptables S60iptables If you want to enable the rules without rebooting, simply call\n/etc/init.d/iptables That\u0026rsquo;s it again.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/iptables_postfix/","summary":"","title":"Add iptables Rules for Postfix to Support Ports 465 and 587"},{"content":"Today I finally got rid of my iTunes Match endless loop. The solution was to delete the cache, which can be accomplished using by a hidden menu entry:\nHold down ⌥ while selecting Store -\u0026gt; Turn Off iTunes Match\nOh, what a relief and special thanks to apple discussions Cheers,\niss\n","permalink":"https://www.nesono.com/blog/itunes_match_endless_loop/","summary":"","title":"iTunes Match Endless Loop"},{"content":"Today I had to check in into CVS after millions of years having passed since I last invoked cvs in a terminal. I was really surprised how much I forgot about the tool I was using on a daily basis, several million years ago. As I converted towards using Git mostly and need to use SVN occasionally I decided to make my own little SCM Matrix here, to remember just the basics. Of course, CVS, SVN, and Git work completely different and creating a repository in CVS has very little in common with creating a repository in Git. However, I assume the reader knows the basic concept of the three SCMs and just needs to remember the correct syntax to get the things done. Here we go:\nCVS SVN Git init cvs -d /path/to/repo init svnadmin create /path/to/repo git init import cd /path/to/sourcescvs -d ... import projectname dev beta svn import /path/to/sources file:///path/to/repo cp -r /path/to/sources/* .git add .git commit add cvs add filename svn add filename git add filename commit cvs commit svn commit git commit update cvs up svn up git fetchgit merge More details can be found in the man pages or using the command line help of the specific tool. Hope you find this one useful!\niss\n","permalink":"https://www.nesono.com/blog/scm_oversimplified/","summary":"","title":"Source Code Management Matrix - A CVS, Subversion, and Git Reference Table"},{"content":"As I need to call Matlab scripts from the command, e.g., for running Matlab scripts in a batch, every once in a while, I post a little reminder for my self here. Keep in mind that the called Matlab command needs to have an exit at the end, otherwise Matlab will keep running, waiting for input.\nIn this example I am calling myscript and forward bash options $1 and $2 to it. Furthermore I am suppressing the GUI (-nodisplay), the Java Virtual Machine (-nojvm), the splash screen (-nosplash) and the Matlab Desktop (-nodesktop). Anyhow, the latte two options might be implied by suppressing the GUI already - but I\u0026rsquo;m not taking chances ;).\nNote that you need to adjust your path to the matlab binary as well as change the script (myscript(...)) you want to call, if you simply copy \u0026amp; paste the line below. And here\u0026rsquo;s the command line:\n/Applications/MATLAB_R2007b/bin/matlab -nodisplay -nojvm -nosplash -nodesktop -r \u0026#39;myscript($var1,$var2); exit\u0026#39; That\u0026rsquo;s it again,\niss\n","permalink":"https://www.nesono.com/blog/calling-matlab-from-command-line/","summary":"\u003cp\u003eAs I need to call Matlab scripts from the command, e.g., for running Matlab scripts in a batch, every once in a while, I post a little reminder for my self here.\nKeep in mind that the called Matlab command needs to have an exit at the end, otherwise Matlab will keep running, waiting for input.\u003c/p\u003e\n\u003cp\u003eIn this example I am calling \u003ccode\u003emyscript\u003c/code\u003e and forward bash options \u003ccode\u003e$1\u003c/code\u003e and \u003ccode\u003e$2\u003c/code\u003e to it.\nFurthermore I am suppressing the GUI (\u003ccode\u003e-nodisplay\u003c/code\u003e), the Java Virtual Machine (\u003ccode\u003e-nojvm\u003c/code\u003e), the splash screen (\u003ccode\u003e-nosplash\u003c/code\u003e) and the Matlab Desktop (\u003ccode\u003e-nodesktop\u003c/code\u003e).\nAnyhow, the latte two options might be implied by suppressing the GUI already - but I\u0026rsquo;m not taking chances ;).\u003c/p\u003e","title":"Calling Matlab Scripts from the Command Line"},{"content":"Again, as a reminder for myself I am posting a table of shell control \u0026amp; escape sequences to navigate and use a misconfigured, non-configured shell or just for bragging purposes.\nFor sure this table is not comprehensive. Please drop a comment if there is a sequence, which needs to be added and will gladly add a line!\nSequence Description Ctrl-A Beginning of line Ctrl-E End of line Ctrl-U Clear line Ctrl-K Clear line from cursor Ctrl-W Delete last word Esc-D Delete next word Ctrl-R Incremental history back search Ctrl-G Cancel history search Best,\niss\n","permalink":"https://www.nesono.com/blog/shell-control-and-escape-sequences/","summary":"","title":"Shell Control \u0026 Escape Sequences for the Wilderness"},{"content":"Latex provides a wide variety of additional packages to extend it\u0026rsquo;s functionality or simply to make some things more convenient, automatic, and simpler to maintain.The following table gives an overview of the packages I use in a daily fashion for scientific publications (apart from the standard packages).\nmicrotype This is a very subtile but nice package that optimizes the typography of the paper on micro-level, e.g. by character protrusion and font-expansion. Just add the package to the preamble and see the difference - best recognized using an updating PDF viewer like Skim.\nxfrac When in text mode (not equations), xfrac enables you to create nice fractions in both text mode and math mode. xfrac defines the command \\sfrac, which can be used as in \\sfrac{1}{2}.\nsiunitx Package for nice formatted (si-)units in a consistent way. To show 48000 kHz, you can say: \\SI{48000}{\\kilo\\hertz}. It not only formats the units nicely but also inserts thousands separators if desired and is heavily customizable. Anyhow, I am drifting away from using it these days, as it\u0026rsquo;s a lot to write something like \\SI{128}{\\kilo\\bit\\per\\second} in contrast to just $128\\,$kbps.\ntodonotes Package for inserting TODO statements in nice colorful boxes - so that you won\u0026rsquo;t forget to fix/remove them. To add a todo statement, use something like \\todo{Find better wording here}.\nsubfigure Every once in a while, you might need subfigures in a paper. This package provides a nice solution for it, including enumeration of subfigures and references support. To add a subfigure, use something like this:\n\\begin{figure}% \\centering \\subfigure[First.]{...}\\qquad \\subfigure[Second figure.]{...}\\\\ \\subfigure[Third.]{\\label{3figs-c}...}% \\caption{Three subfigures.} \\label{3figs} \\end{figure} tikz THE drawing markup for latex. It\u0026rsquo;s easier than most other markups I have seen so far and important if you want to use R\u0026rsquo;s tikz device (as described later). The figures generated with tikz integrate nicely into the document and look like being set with LaTeX. An example Markov Chain:\n\\begin{tikzpicture}[node distance=20mm, state/.style={ % The shape: circle,minimum size=8mm,rounded corners=3mm, % The rest draw=black}] % draw the nodes \\path (0,0) node (A) [state] {A} (4,0) node (B) [state] {B} (2,1) node (D) [state] {D} (2,-1) node (M) [state] {M}; % draw the transitions \\draw [-\u0026gt;] (A) to [bend left=15] (D); \\draw [-\u0026gt;] (D) to [bend left=15] (A); \\draw [-\u0026gt;] (D) to [bend left=15] (B); \\draw [-\u0026gt;] (B) to [bend left=15] (D); \\draw [-\u0026gt;] (B) to [bend left=15] (M); \\draw [-\u0026gt;] (M) to [bend left=15] (B); \\draw [-\u0026gt;] (M) to [bend left=15] (A); \\draw [-\u0026gt;] (A) to [bend left=15] (M); \\end{tikzpicture} algorithm2e Not the easiest algorithm package, but maybe the most powerful. Strange syntax, really, but nice for Pseudocode. An example taken from the manual:\n\\begin{algorithm}[H] \\SetAlgoLined \\KwData{this text} \\KwResult{how to write algorithm with \\LaTeX2e } initialization\\; \\While{not at end of this document}{ read current\\; \\eIf{understand}{ go to next section\\; current section becomes this one\\; }{ go back to the beginning of current section\\; } } \\caption{How to write algorithms} \\end{algorithm} listings Package for code listings supporting different programming languages, like C/C++, Ruby, Octave, Python, etc. An example from the manual:\n\\begin{lstlisting} if (i\u0026lt;=0) then i := 1; if (i\u0026gt;=0) then i := 0; if (i\u0026lt;\u0026gt;0) then i := 0; \\end{lstlisting} booktabs Very nice table formatting. Note that you might want to change the arraystretch for tables using \\renewcommand{\\arraystretch}{1.2} in your preamble. The package also adds new rules (i.e., horizontal lines) for top, bottom, and mid separators. The following listing shows a simple example for a table using the booktabs package:\n\\begin{tabular}{@{}llr@{}} \\toprule \\multicolumn{2}{c}{Item} \\\\ \\cmidrule(r){1-2} Animal \u0026amp; Description \u0026amp; Price (\\$) \\\\ \\midrule Gnat \u0026amp; per gram \u0026amp; 13.65 \\\\ \u0026amp; each \u0026amp; 0.01 \\\\ Gnu \u0026amp; stuffed \u0026amp; 92.50 \\\\ Emu \u0026amp; stuffed \u0026amp; 33.33 \\\\ Armadillo \u0026amp; frozen \u0026amp; 8.99 \\\\ \\bottomrule \\end{tabular} hyphenat A package I use mostly for suppressing hyphenation in certain words. Can do more, as I\u0026rsquo;ve heard, but I don\u0026rsquo;t use it. For example, to suppress hyphenation of the word curiosity use \\nohyphens{curiosity}\nbalance Balances the columns (in a two column page) on the last page, so that they appear of equal length. Taken from the package manual:\n[Balancing two column layouts] is done with the command \\balance, which should be issued somewhere in the text of what would be the first column of the last page without balanced columns. If it is issued too late, i.e., in the second column, then a warning message is printed that balancing may not take place.\nnatbib Another nice package, useful for advanced bibliography stuff is natbib, which supports different types of references i.e., \\citep for a parenthetical citation and \\citet for a textual one.\nacronym When writing scientific papers, one often has to deal with tons of acronyms. Apart from simply writing down these acronyms in running text, there are several things to keep track of, i.e., using short or long form of acronym, writing it in full form (long and short) at first occurrence, not introducing typos, changing a custom acronym etc. To ease this pain, the acronym package can be used to define acronyms and refer to those using keys which will be expanded to the actual acronym in short, long (at first occurrence) or whatever desired form. For example, I define some acronyms in the beginning of my document (after \\begin{document}) like this:\n\\acrodef{voip}[VoIP]{Voice over IP} \\acrodef{mos}[MOS]{Mean Opinion Score} Which can then be used in the text, e.g.:\n...was not reflected in the \\ac{MOS}, leading to... You can explicitly use the short form and long form like this:\nwas not reflected in the \\acs{MOS}, leading to Example LaTeX file The following listing just concatenates all packages above and adds some configuration candy to it into the well-known preamble. You could use it as a template for new latex papers, etc.\n% specify your documentclass here [report|article|...] \\documentclass[a4paper,final]{article} % \\documentclass[a4paper,draft]{article} % for nicer tables \\usepackage{booktabs} % use package \\usepackage{graphicx} \\usepackage{microtype} \\usepackage{balance} % version 1 of siunitx package %\\usepackage{siunitx} %\\sisetup{per=fraction,fraction=nice,alsoload=binary,obeyall} % version 2 of siunitx package \\usepackage{siunitx} \\usepackage{xfrac} \\sisetup{per-mode=fraction,fraction-function=\\sfrac,alsoload=binary,detect-all} \\usepackage{hyphenat} \\usepackage{todonotes} \\usepackage{subfigure} \\usepackage{listings} \\usepackage[ruled,vlined,linesnumbered]{algorithm2e} \\usepackage[sort\u0026amp;compress]{natbib} \\usepackage{acronym} \\usepackage{tikz} \\usetikzlibrary{ calc,trees,positioning,arrows,chains,shapes.geometric,% decorations.pathreplacing,decorations.pathmorphing,shapes,% matrix,shapes.symbols} % objectstyle1, objectstyle2, and important line are defined by personal preference \\tikzset{% objectstyle1/.style={rectangle,minimum size=6mm,% rounded corners=1mm, draw=black, very thick, text centered},% objectsyle2/.style={rectangle,minimum size=4mm,% rounded corners=1mm, draw=black, thick, text centered},% important line/.style={thick}% } % some settings for nicer tables \\renewcommand{\\arraystretch}{1.2} The main matter of the document could then continue like that:\n\\title{And Now for Something Completely Different} \\author{Eric Idle} \\begin{document} \\maketitle Is your wife a...``goer''... eh? Know what I mean? Know what I mean? Nudge nudge. Nudge nudge! Know what I mean? Say no more...Know what I mean? \\end{document} Very small, very non-sense. To get an idea of how LaTeX works, simply copy above two sections into a text file and save it with the extension .tex into a new folder, we will also refer to as the project folder.\nRead on for further detail!\n","permalink":"https://www.nesono.com/blog/usefule-packages-in-latex-preemble/","summary":"","title":"Useful Packages in the Preemble"},{"content":"This is a follow up post of a previous one just using Matlab instead of Python. In the following paragraphs, I will show my way of reading and writing CSV files using Matlab. If you happen to know a better or more elegant solution, please drop a comment!\nReading CSV Files with Matlab The following Matlab function reads a CSV file with the header as a string vector and the data as numeric matrix. Note that non-numerical data returns NaN.\nfunction [h,m] = csvreadh( filename, delim ) %CSVREADH Read a comma separated value file with header. % [H,M] = CSVREADH(\u0026#39;FILENAME\u0026#39;) reads a comma separated value formatted file % FILENAME. The result data is returned in M, the header in H. % The file can only contain numeric values as data and a string for % the header. % Validate input args if nargin==0 error(nargchk(1,1,nargin,\u0026#39;struct\u0026#39;)); end % Get Filename if ~ischar(filename) error(\u0026#39;csvreadh:FileNameMustBeString\u0026#39;, ... \u0026#39;Filename must be a string.\u0026#39;); end % Make sure file exists if exist(filename,\u0026#39;file\u0026#39;) ~= 2 error(\u0026#39;csvreadh:FileNotFound\u0026#39;,... \u0026#39;File not found.\u0026#39;); end if nargin==1 delim = \u0026#39;,\u0026#39;; end % open input file file = fopen( filename ); line = fgetl( file ); h = regexp( line, delim, \u0026#39;split\u0026#39; ); m = []; % this is not quick for sure, but works while 1 line = fgetl( file ); if ~ischar(line), break, end m = [m; str2double(regexp( line, \u0026#39;,\u0026#39;, \u0026#39;split\u0026#39; ))]; end fclose(file); Writing CSV Files with Matlab The following snippet provides a function to write a csv file in Matlab:\nfunction csvwriteh( filename, data, header ) %CVSWRITEH write matrix to a csv file with header % CVSWRITEH( FILENAME, DATA, HEADER ) % function to write a csvfile with a header % input parameters: % FILENAME: filename for csv output file % DATA: matrix with data for csv file % HEADER: cell array with names per column %% check parameters % filename parameter if exist( \u0026#39;filename\u0026#39;, \u0026#39;var\u0026#39; ) if ~ischar( filename ) error(\u0026#39;filename not char\u0026#39;) end else error(\u0026#39;filename does not exists\u0026#39;) end % data parameter if exist( \u0026#39;data\u0026#39;, \u0026#39;var\u0026#39; ) if ~isnumeric( data ) error(\u0026#39;data not numeric\u0026#39;) end else error(\u0026#39;data does not exist\u0026#39;) end % header parameter if exist( \u0026#39;header\u0026#39;, \u0026#39;var\u0026#39; ) if ~iscellstr( header ) error(\u0026#39;header no cell str\u0026#39;) end else error(\u0026#39;header does not exist\u0026#39;) end % check dimensions of data and header [drow dcol] = size (data); [hrow hcol] = size (header); if hcol ~= dcol error( \u0026#39;header not of same length as data (columns)\u0026#39; ) end % open file outid = fopen (filename, \u0026#39;w+\u0026#39;); % write header for idx = 1:hcol fprintf (outid, \u0026#39;%s\u0026#39;, header{idx}); if idx ~= hcol fprintf (outid, \u0026#39;,\u0026#39;); else fprintf (outid, \u0026#39;\\n\u0026#39; ); end end % close file fclose(outid); % write data dlmwrite (filename, data, \u0026#39;-append\u0026#39; ); That\u0026rsquo;s it again.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/csv_rw_matlab/","summary":"\u003cp\u003eThis is a follow up post of a previous \u003ca href=\"https://www.nesono.com/node/414\" title=\"Read and Write CSV files with Python\"\u003eone\u003c/a\u003e just using Matlab instead of Python.\nIn the following paragraphs, I will show my way of reading and writing CSV files using Matlab.\nIf you happen to know a better or more elegant solution, please drop a comment!\u003c/p\u003e\n\u003ch2 id=\"reading-csv-files-with-matlab\"\u003eReading CSV Files with Matlab\u003c/h2\u003e\n\u003cp\u003eThe following Matlab function reads a CSV file with the header as a string vector and the data as numeric matrix. Note that non-numerical data returns NaN.\u003c/p\u003e","title":"Read and Write CSV Files with Matlab with Headers"},{"content":"Another reminder for myself:\ngit push origin master pushes the local branch master into remote repository origin.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/push_git/","summary":"","title":"Push GIT branch to upstream"},{"content":"Since CSV (comma-separated-values) files are supported by almost every statistics and/or math tool, I sticked to use the format for all my data collections.\nIf you need further evidence, check out the (incomplete) list of natively CSV supporting applications:\nGnu/R KNIME MS Excel LibreOffice Calc \u0026hellip; Apart from those, a major benefit of CSV files is that you can edit them with any editor, as they are plain text files. Unfortunately, some applications have poor support for such files, e.g. Matlab and Python. Fortunately, as the file structure is so easy, you can add CSV support pretty easily. In the following I will show you my solution for Python.\nReading CSV Files with Python The following snippet imports the CSV module and reads a CSV file including its header and data.\nimport csv # open csv file csvfile = open( \u0026#34;inputfile.csv\u0026#34;, \u0026#34;rb\u0026#34; ) # sniff into 10KB of the file to check its dialect dialect = csv.Sniffer().sniff( csvfile.read( 10*1024 ) ) csvfile.seek(0) # read csv file according to dialect reader = csv.reader( csvfile, dialect ) # read header header = reader.next() # read data into memory data = [row for row in reader] # close input file csvfile.close() Writing CSV Files with Python The following snippet writes a CSV file including its header and data.\n# open output file outfile = open( options.outfile, \u0026#34;wb\u0026#34; ) # get a csv writer writer = csv.writer( outfile ) # write header writer.writerow(header) # write data [ writer.writerow(x) for x in data ] # close file outfile.close() That\u0026rsquo;s it for now :)\niss\n","permalink":"https://www.nesono.com/blog/csv_rw_python/","summary":"\u003cp\u003eSince CSV (comma-separated-values) files are supported by almost every statistics and/or math tool, I sticked to use the format for all my data collections.\u003c/p\u003e\n\u003cp\u003eIf you need further evidence, check out the (incomplete) list of natively CSV supporting applications:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.r-project.org\" title=\"The R Project for Statistical Computing\"\u003eGnu/R\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://www.knime.org\" title=\"Konstanz Information Miner\"\u003eKNIME\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://office.microsoft.com/en-us/excel/\" title=\"Microsoft Excel\"\u003eMS Excel\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://www.libreoffice.org/features/\" title=\"LibreOffice Calc\"\u003eLibreOffice Calc\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u0026hellip;\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eApart from those, a major benefit of CSV files is that you can edit them with any editor, as they are plain text files.\nUnfortunately, some applications have poor support for such files, e.g. Matlab and Python.\nFortunately, as the file structure is so easy, you can add CSV support pretty easily.\nIn the following I will show you my solution for Python.\u003c/p\u003e","title":"Read and Write CSV files with Python"},{"content":"This is actually just a copy of an article from ubuntu.com, but they tend to move things around and I like to have short search times. Apart from that, this works for FreeBSD and even for Windows (tested with Windows 7) as well. Sorry for this this blatant plagiarism, but it might be also to your advantage ;)\nOne more note: If you want to create a bootable USB stick to be used on a Mac/OS X, do not forget to format the stick with Disk Utility to HFS+ with a GUID partition table.\nIn case you want to create a bootable USB stick for OS X Mavericks / OS X Yosemite, there exists a shortcut command (note to change the target disk folder accordingly):\nsudo /Applications/Install\\ OS\\ X\\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\\ OS\\ X\\ Mavericks.app --nointeraction To create an USB stick for general usage:\nDownload the ISO image in question\nwget http://somewhere.org/input.iso Convert the ISO image using hdiutil\nhdiutil convert -format UDRW -o output input.iso Check the device number of your USB stick, e.g. by\ndiskutil list Unmount the key without ejecting it with\ndiskutil unmountDisk /dev/diskN , where N is the device number acquired previously\nMove the image onto the key using\nsudo dd if=output.dmg of=/dev/rdiskN bs=1m Note that using /dev/rdiskN might be faster than /dev/diskN and bs=1m is required since dd would otherwise block forever.\nEject the key with\ndiskutil eject /dev/diskN Mind the small changes from the original ;) If you now want to start from the bootable USB key, leave it plugged in your Mac, reboot and press Alt/Option (⌥) before the Apple logo occurs.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/bootable_usb_stick_osx/","summary":"\u003cp\u003eThis is actually just a copy of an article from ubuntu.com, but they tend to move things around and I like to have short search times. Apart from that, this works for FreeBSD and even for Windows (tested with Windows 7) as well. Sorry for this this blatant plagiarism, but it might be also to your advantage ;)\u003c/p\u003e\n\u003cp\u003eOne more note: If you want to create a bootable USB stick to be \u003cstrong\u003eused on a Mac/OS X\u003c/strong\u003e, do not forget to format the stick with Disk Utility to \u003ccode\u003eHFS+\u003c/code\u003e with a \u003ccode\u003eGUID\u003c/code\u003e partition table.\u003c/p\u003e","title":"Creating a bootable USB Stick on Mac OS X from an ISO Image"},{"content":"Again a nice post on stackoverflow - here\u0026rsquo;s how to set the tracking or upstream branch upstream from remote name origin for a local branch master:\ngit branch --set-upstream master origin/upstream Cheerio,\niss\n","permalink":"https://www.nesono.com/blog/git-set-upstream/","summary":"","title":"Git set upstream/tracking branch"},{"content":"I just cleaned up my home brew cellar and had problems reinstalling R. I got the old well-known error message:\nbrew install r ==\u0026gt; Downloading http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz Already downloaded: /Library/Caches/Homebrew/r-2.15.1.tar.gz Error: This formula requires a fortran compiler,... Reinstalling gfortran (which was actually installed already) did not help and so I decided to trick home brew until the problem is fixed, with the following:\nexport FC=`which gfortran` brew install r Surprise surprise, it worked! :]\n[Update:] The bug I filed was almost fixed immediately. So the post remains just as a reminder for the future ;)\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/brew_install_r_fails/","summary":"\u003cp\u003eI just cleaned up my home brew cellar and had problems reinstalling R.\nI got the old well-known error message:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ebrew install r\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e==\u003c/span\u003e\u0026gt; Downloading http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAlready downloaded: /Library/Caches/Homebrew/r-2.15.1.tar.gz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eError: This formula requires a fortran compiler,...\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eReinstalling gfortran (which was actually installed already) did not help and so I decided to trick home brew until the problem is fixed, with the following:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eexport FC\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e`\u003c/span\u003ewhich gfortran\u003cspan style=\"color:#e6db74\"\u003e`\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ebrew install r\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eSurprise surprise, it worked! :]\u003c/p\u003e","title":"Brew install R fails - Updated right away"},{"content":"This was actually a Comment in another post of mine, but I\u0026rsquo;ll paste it here since the migration to Disqus and it\u0026rsquo;s worth a post anyway:\niss replied on Mon, 2011-07-04 10:31:\nI just found a nice site about Octave debugging. It told me about the following two functions, which are very nice for debugging, which is a pretty pitty in Octave in contrast to Matlab :/\ndebug_on_warning(1) debug_on_error(1) If you want to add a breakpoint to your function at a speciﬁc line, use the following statement\ndbstop('yourfunctionname',1) Then you can use the dbxxx commands to debug your code:\ndbstep dbcont dbnext ... Happy debugging!\niss\n","permalink":"https://www.nesono.com/blog/octave_debugging/","summary":"","title":"Octave Debugging"},{"content":"You can specify git repositories in different ways, depending on the protocol you use.\nFile System /path/to/repo.git file:///path/to/repo.git Git native protocol git://example.com/path/to/repo.git git://example.com/~user/path/to/repo.git SSH connection ssh://[user@]example.com[:port]/path/to/repo.git ssh://[user@]example.com/path/to/repo.git ssh://[user@]example.com/~user2/path/to/repo.git ssh://[user@]example.com/~/path/to/repo.git SSH (short form - no port support) [user@]example.com:/path/to/repo.git [user@]example.com:~user/path/to/repo.git [user@]example.com:path/to/repo.git HTTP and HTTPS URL variants http://example.com/path/to/repo.git https://example.com/path/to/repo.git rsync protocol (highly discouraged) rsync://example.com/path/to/repo.git For more information read the book Version Control with Git ;)\nBest,\niss\n","permalink":"https://www.nesono.com/blog/git_remote_repos/","summary":"","title":"Referring to Git Remote Repositories"},{"content":"Last week I wanted to change some figures in a presentation I once made with R\u0026rsquo;s tikzDevice and was faced with the fact that the package has been moved to CRAN\u0026rsquo;s archive.\nMy mail to the authors was quickly replied and offered a workaround:\n\u0026hellip; The development build of tikzDevice 0.7 haven\u0026rsquo;t gone through all the testing required for a CRAN release, but it should be free of any major bugs. You can install from R-Forge thusly: install.packages(\u0026rsquo;tikzDevice\u0026rsquo;, repos=\u0026lsquo;http://r-forge.r-project.org\u0026rsquo;)\nHowever, I got the following error (stripped version):\nERROR: dependency ‘filehash’ is not available for package ‘tikzDevice’ installation of package ‘tikzDevice’ had non-zero exit status Thus, I installed the filehash package:\ninstall.packages( \u0026#39;filehash\u0026#39; ) And ran the install command for the tikzDevice again:\ninstall.packages(\u0026#39;tikzDevice\u0026#39;, repos=\u0026#39;http://r-forge.r-project.org\u0026#39;) That\u0026rsquo;s it,\niss\nUpdate: Thanks to Ben, you can also use this one liner:\ninstall.packages( \u0026#39;tikzDevice\u0026#39;, repos=c(\u0026#39;http://r-forge.r-project.org\u0026#39;,getOption(\u0026#34;repos\u0026#34;)) ) ","permalink":"https://www.nesono.com/blog/tikz_moved_cran/","summary":"","title":"R tikzDevice Package Moved to Archive on CRAN"},{"content":"What a nice post on Stackoverflow! Just paste the following lines into your .ssh/config file and let SSH redirect to ssh.github.com\nHost github.com User YourUserName Port 443 Hostname ssh.github.com And I was actually struggling with https all the time\u0026hellip;\npfffffffff,\niss\n","permalink":"https://www.nesono.com/blog/github_behind_walls/","summary":"","title":"Github Behind Walls"},{"content":"After I had to upgrade the X11 support on OS X 10.8 (Mountain Lion), I got an annoying dialog asking for some strange application called OroborOSX every time I wanted to start Matlab. After a quick look into the launch script, I found a solution and it seems to be aligned with Mathworks - the company behind Matlab.\nSimply open the file /Applications/MATLAB_R2007b/bin/maci/StartMATLAB.app/Contents/launch_matlab.sh in your favorite editor and go to line 8, where you should find something like the following listing:\nif [ \u0026quot;$?\u0026quot; != \u0026quot;0\u0026quot; ]; then # The MathWorks does not officially support OroborOSX # anymore, but since we used to, we will try to open it # here for our MATLAB 6.5 users. osascript -e 'tell application \u0026quot;OroborOSX\u0026quot; to activate' fi And just comment out all these lines, so that all are preceeded by a #:\n#if [ \u0026quot;$?\u0026quot; != \u0026quot;0\u0026quot; ]; then # # The MathWorks does not officially support OroborOSX # # anymore, but since we used to, we will try to open it # # here for our MATLAB 6.5 users. # osascript -e 'tell application \u0026quot;OroborOSX\u0026quot; to activate' #fi That\u0026rsquo;s it, save and close the file and start Matlab again without the annoying dialog. If you read the comment, you should be relieved by the fact, that we disabled starting an actually already abandoned service in this script.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/matlab_7_5_quartz/","summary":"","title":"Matlab 7.5 (R2007b) \u0026 XQuartz 2.7.2"},{"content":"What a bad surprise, trying to build the Makefile-based project and got the response: make not found!\nLucky for us, it has just moved into the XCode package - the logical place according to Apple\u0026rsquo;s rules, though not automatically in the PATH environment variable :/\nJust add the following path to your PATH variable:\n/Applications/Xcode.app/Contents/Developer/usr/bin\n[Update:] It\u0026rsquo;s actually much easier, though a little hidden: Just install the Command Line Tools from Preferences -\u0026gt; Downloads :]\nCheerio,\niss\n","permalink":"https://www.nesono.com/blog/gnumake_moved_os_x/","summary":"","title":"GNU/Make moved in OS X 10.8 Mountain Lion -- Updated"},{"content":"I just added a workaround for DAViCal with Apple\u0026rsquo;s Address Book application. Since my update to 10.7.4, I was no longer able to add a contact to the server and the card stopped the whole server communication to fail completely.\nLooking at the apache logs showed me the following error:\n[Mon Jul 23 11:54:16 2012] [error] [client 153.96.214.20] davical: LOG: :Response status 500 for POST /caldav.php/username/contacts/1101e8b5-071b-4b40-8293-b74d35264665.vcf\nAfter some additional research, I found this thread on the DAViCal list/forum - beware of the flame war side effects. Fortunately, Andrew himself answered and gave a neat patch - even though spread over different posts. So I\u0026rsquo;d like to sum up the solution here.\nFirst, I opened the file /usr/share/davical/inc/DAVResource.php, jumped to line 1641 and added the following line\ncase \u0026#39;DAV::add-member\u0026#39;: if ( ! $this-\u0026gt;_is_collection ) return false; if ( isset($c-\u0026gt;post_add_member) \u0026amp;\u0026amp; $c-\u0026gt;post_add_member === false ) return false; $reply-\u0026gt;DAVElement( $prop, \u0026#39;add-member\u0026#39;, $reply-\u0026gt;href(ConstructURL(DeconstructURL($this-\u0026gt;url())).\u0026#39;?add-member\u0026#39;) ); break; Then, you should add the following line to your /etc/davical/calendar.example.com-conf.php\n// post member work around for Mac 10.7.4 - patch is in /usr/share/davical/inc/DAVResource.php:1641 $c-\u0026gt;post_add_member = false; And that\u0026rsquo;s it. Cheers,\niss\n","permalink":"https://www.nesono.com/blog/davical_problems_apple_address_book/","summary":"","title":"Davical Problems due to Apple Address Book Bug"},{"content":"As written in a post before, I customized the Drupal RSS feed icon by replacing it with my own PNG icon. Unfortunately, the PNG icon should be designed well and is never scalable when using pixels. Therefore, I wanted to change it to a font based (vector) icon using again free fonts from font squirrel.\nI chose the \u0026lsquo;Web Symbols\u0026rsquo; font, which includes several other nice icons, I\u0026rsquo;d probably use in the future. For the RSS feed icon, there exist two icons, the positive ( B ) and the negative ( r ) one.\nI decided to use the negative one, which is addressed by the character r. Therefore, I change the function nesono_feed_icon as follows:\nfunction nesono_feed_icon($variables) { $text = t('Subscribe to @feed-title', array('@feed-title' =\u0026gt; $variables['title'])); if ($image = theme('image', array('path' =\u0026gt; drupal_get_path('theme', 'nesono') . '/misc/feed.png', 'width' =\u0026gt; 16, 'height' =\u0026gt; 16, 'alt' =\u0026gt; $text))) { return l('r', $variables['url'], array('html' =\u0026gt; TRUE, 'attributes' =\u0026gt; array('class' =\u0026gt; array('feed-icon'), 'title' =\u0026gt; $text))); } } Then, I downloaded the @font-face kit from Font Squirrel and added the definition to my CSS (simply compiled the contents of the shipped CSS file into my main CSS).\nThen, I changed the font-family of the feed character surrounding tag to WebSymbols and that\u0026rsquo;s it again :)\nBest,\niss\n","permalink":"https://www.nesono.com/blog/font-rss-feed-icon-in-drupal-7/","summary":"","title":"RSS Feed Icon from Font Instead of Image (PNG) with Drupal 7"},{"content":"I just added a page to my Mailserver documentation. I finally found the time to setup per user spam filtering for all accounts just based on the contents of a folder. Very easy to use for everybody indeed.\nI hope you\u0026rsquo;ll enjoy reading :)\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/new-mailserver-documentation-virtual-user-spam-filtering/","summary":"","title":"New Mailserver Documentation Part for Per Virtual User Spam Filtering"},{"content":"After obvious spam has been rejected before queuing using the Spamass-Milter, we can now proceed to check for spam specifically for each user. The automation is based on each mail account having a Junk folder in its top directory - just as most mail clients already prepare at first start. Note that the name of the folder is case-sensitive and you need the capital \u0026lsquo;J\u0026rsquo; if you use the following scripts and configuration entries.\nFirst of all, we need to maintain a separate spam database for each mail account. I create a directory tree and populate the bayes database using the following script, saved as spam_learn_mail_cron.sh inside /etc/cron.daily.\n#!/bin/sh # script to create a directory under /vhome/users for each mail account, # populate the spam db with sa-learn, and fix the dir's permissions. # get all mail accounts for dir in /var/spool/postfix/virtual/*; do mailaccount=${dir##*/} echo \u0026quot;creating dir for $mailaccount\u0026quot; spamdbpath=/vhome/users/${mailaccount}/spamassassin/ mkdir -p ${spamdbpath} junkfolder=${dir}/.Junk if [ -d ${junkfolder} ]; then echo \u0026quot;learning spam from ${junkfolder} for user ${mailaccount}\u0026quot; sa-learn --spam --dbpath ${spamdbpath}/bayes --progress ${junkfolder} sa-learn --sync else echo \u0026quot;no Junk folder in top level - skipping\u0026quot; fi hamfolder=${dir}/.Archive if [ -d ${hamfolder} ]; then echo \u0026quot;learning ham from ${hamfolder} for user ${mailaccount}\u0026quot; sa-learn --ham --dbpath ${spamdbpath}/bayes --progress ${hamfolder} sa-learn --sync else echo \u0026quot;no Archive folder in top level - skipping\u0026quot; fi done echo \u0026quot;fix permissions for whole vhome\u0026quot; chown -R vmail:mail /vhome chmod -R 700 /vhome This script is automatically run every day, which should be frequent enough for most purposes.\nThen, we need to configure spamd, which is done in the file /etc/default/spamassassin. I simply change the OPTIONS variable to the following line.\nOPTIONS=\u0026quot;--create-prefs --max-children 5 --helper-home-dir --virtual-config-dir=/vhome/users/%u/spamassassin -x -u vmail\u0026quot; The option virtual-config-dir tells spamd to check for user databases in the virtual home directory tree instead of real user home directories. The x and u options are mandatory for setting the virtual-config-dir and I set them to the appropriate values.\nNow we need to tell postfix to use spamc and specify the name of the mail account for spamc invokation. Therefore, I change the delivery agent line in /etc/postfix/master.cf to:\n# Dovecot LDA dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/bin/spamc -u ${recipient} -e /usr/lib/dovecot/deliver -f ${sender} -d ${recipient} Then don\u0026rsquo;t forget to reload spamassassin, dovecot and postfix to enable the changes to the configuration files:\n/etc/init.d/spamassassin restart /etc/init.d/dovecot restart /etc/init.d/postfix restart That\u0026rsquo;s it again :)\nIf you are unsure whether your setup really works, you should check the log using tail -f /var/log/mail.info and send yourself a message.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/spamassassin-filter-per-user-with-automatic-spam-learning/","summary":"","title":"Spamassassin Filter Customized Per User With Automatic SPAM Learning"},{"content":"or how to get rid of:\np11-kit: couldn't load module: /usr/lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so\nAfter I moved my ubuntu desktop to kubuntu, the gnome-keyring always was started at every login, asking for my password. Besides the fact, that gnome-keyring does not feel native when working on KDE, every time I invoked svn in the terminal, I saw the error message from the subtitle. The solution was pretty tedious to find, so I hope to save you and myself some time if this will happen again.\nFirst of all, I tried to get some more information about this p11-kit stuff and thus installed p11-kit (which might already be installed on your site).\nsudo aptitude install p11-kit I called p11-kit -v -l to get some information about what\u0026rsquo;s actually happening in the background and got the message that the bad configuration file has the name /etc/pkcs11/modules/gnome-keyring-module. It is part of the package gnome-keyring (surprise, surprise):\napt-file search /etc/pkcs11/modules/gnome-keyring-module gnome-keyring: /etc/pkcs11/modules/gnome-keyring-module Obviously, I had to purge the configuration files from gnome-keyring to get rid of the configuration file and shared object.\nsudo aptitude purge gnome-keyring Unfortunately, subversion now crashes randomly but frequently with a core dump. I removed the gnome keyring configuration, kde wallet and subversion configuration files.\nrm -r ~/.gnome2/keyrings rm -r ~/.subversion find ~/.kde -iname \\*wallet\\* -exec rm -r {} \\; Which is basically a good idea, but did not solve the SEGFAULT. Finally, I installed gnome-keyring (again), and purged it (again), which seems to have taken away all my pain and now everything is fine - until the end\u0026hellip;\nsudo aptitude install gnome-keyring sudo aptitude purge gnome-keyring Cheers,\niss\n","permalink":"https://www.nesono.com/blog/gnome_keyring_disable/","summary":"","title":"Disable GNOME Keyring When Moving From GNOME to KDE"},{"content":"After reading this article, I decided to change my RSS feed icon as well. However, the article does not cover Drupal 7 and so I explain the necessary steps here.\nFirst, you should create your template.php, if zen has not created it for you, yet. Then, you need to decide, where to put the feed icon and how to name it. I simply use the same as Drupal: The image is feed.png and stored within the misc folder within my theme folder.\nI followed the hint given in the original post and checked the Drupal API for the original function name (theme_feed_icon) and implementation. I just changed the image path from the original implementation (misc/feed.png) to drupal_get_path('theme', 'nesono') . '/misc/feed.png'.\nNote that if you want to use this for yourself, you need to change nesono in the function\u0026rsquo;s name to your theme\u0026rsquo;s name!\nfunction nesono_feed_icon($variables) { $text = t(\u0026#39;Subscribe to @feed-title\u0026#39;, array(\u0026#39;@feed-title\u0026#39; =\u0026gt; $variables[\u0026#39;title\u0026#39;])); if ($image = theme(\u0026#39;image\u0026#39;, array(\u0026#39;path\u0026#39; =\u0026gt; drupal_get_path(\u0026#39;theme\u0026#39;, \u0026#39;nesono\u0026#39;) . \u0026#39;/misc/feed.png\u0026#39;, \u0026#39;width\u0026#39; =\u0026gt; 16, \u0026#39;height\u0026#39; =\u0026gt; 16, \u0026#39;alt\u0026#39; =\u0026gt; $text))) { return l($image, $variables[\u0026#39;url\u0026#39;], array(\u0026#39;html\u0026#39; =\u0026gt; TRUE, \u0026#39;attributes\u0026#39; =\u0026gt; array(\u0026#39;class\u0026#39; =\u0026gt; array(\u0026#39;feed-icon\u0026#39;), \u0026#39;title\u0026#39; =\u0026gt; $text))); } } That\u0026rsquo;s it again\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/change-rss-feed-icon-with-drupal-7/","summary":"\u003cp\u003eAfter reading this \u003ca href=\"http://mydrupalblog.lhmdesign.com/overriding-drupals-default-rss-feed-icon\" title=\"overriding drupals rss feed icon\"\u003earticle\u003c/a\u003e, I decided to change my RSS feed icon as well. However, the article does not cover \u003ca href=\"http://drupal.org\" title=\"Drupal Home Page\"\u003eDrupal\u003c/a\u003e 7 and so I explain the necessary steps here.\u003c/p\u003e\n\u003cp\u003eFirst, you should create your \u003ccode\u003etemplate.php\u003c/code\u003e, if \u003ca href=\"http://drupal.org/project/zen/\" title=\"Zen Starting Theme\"\u003ezen\u003c/a\u003e has not created it for you, yet.\nThen, you need to decide, where to put the feed icon and how to name it.\nI simply use the same as Drupal: The image is \u003ccode\u003efeed.png\u003c/code\u003e and stored within the \u003ccode\u003emisc\u003c/code\u003e folder within my theme folder.\u003c/p\u003e","title":"Change RSS Feed Icon with Drupal 7"},{"content":"Some time ago, I wanted to x-out all constant C-strings (characters within \u0026quot;) in a C-file and wondered how to do that with Vim. E.g. when you want to cross out every character of a Hello World String like this:\n/* before */ printf( \u0026quot;Hello World\\n\u0026quot; ); /* after */ printf( \u0026quot;XXXXXXXXXXXXX\u0026quot; ); Finally, also with the help of the Vim IRC channel we came to this regex:\ns/\u0026quot;\\([^\u0026quot;]*\\)\u0026quot;/\\='\u0026quot;' . substitute(submatch(1),\u0026quot;.\u0026quot;,\u0026quot;X\u0026quot;,\u0026quot;g\u0026quot;) . '\u0026quot;'/gc Pretty Funny, by mostly useless.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/x-out-string-vim/","summary":"","title":"X-out a String in C/C++ Using Vim"},{"content":"Yesterday evening I decided to move from dynamic http/https switching to SSL (https) only mode. I decided to do so because I want everybody to feel free to take down her tin foil hats when visiting my site.\nFor migration to SSL, I simply inserted the following rewrite rule into the apache configuration of the site:\nRewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} However, I ran into several problems: First of all, Disqus had problems to view the comments under https. The only solution that worked for me was disabling the 2012 features of Disqus and therefore changing to the old fashioned interface.\nMore problems occur with the Chrome Browser, which checks each SSL site for using non-SSL links or content. Unfortunately, Disqus Comments use non-SSL contents and therefore you\u0026rsquo;ll get a warning each time you visit nesono.com. If you choose Load Anyway in the dialog, you\u0026rsquo;ll get to see the comment numbers on the frontpage, if you choose Don\u0026rsquo;t Load (Recommended), you will not be able to read or write any comments here - and that\u0026rsquo;s a pity!\nAnyway, I hope this problem will be fixed soon - I think it has to be fixed in the Drupal Disqus module so that everything works as a charm again.\nBest,\niss\n","permalink":"https://www.nesono.com/blog/move-to-https/","summary":"","title":"Moved to https Completely With Disqus and Chrome Issues"},{"content":"As I promised a while ago, I will discover some details of the current nesono Drupal 7 theme. It has been optimized towards readability and is inspired by services like pocket (read it later), readability, and the reading plugins for several browsers.\nIn this post, I will explain the font settings as specified in the CSS files of this site\u0026rsquo;s theme.\nAs a big fan of LaTeX type setting and the Palatino font, I was searching for an open or free look-alike on the web (because web fonts should not suffer from copyright issues). Finally, I found the font TeX Gyre Pagella on fontsquirrel. I downloaded the @font-face kit for highest convenience.\nThe kit includes the following font formats:\nTTF - Works in most browsers except IE and iPhone. EOT - IE only. WOFF - Compressed, emerging standard. SVG - iPhone/iPad. I recognized that Mobile Safari uses SVG font files, which was new to me. Don\u0026rsquo;t forget to choose the subset of the font to the languages you like to support.\nThen, after downloading just copy the package into your theme folder and insert the modified version of stylesheet.css into normalize.css. I have changed the font\u0026rsquo;s name to be the same (font-family: 'TeXGyrePagella') in every specification. This makes bold an italic font files to be automatically chosen. Besides that, I removed some useless font-weight and font-style statements and fixed the path to the font.\n@font-face { font-family: 'TeXGyrePagella'; src: url('../fonts/texgyrepagella-regular-webfont.eot'); src: url('../fonts/texgyrepagella-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/texgyrepagella-regular-webfont.woff') format('woff'), url('../fonts/texgyrepagella-regular-webfont.ttf') format('truetype'), url('../fonts/texgyrepagella-regular-webfont.svg#TeXGyrePagellaRegular') format('svg'); } @font-face { font-family: 'TeXGyrePagella'; src: url('../fonts/texgyrepagella-italic-webfont.eot'); src: url('../fonts/texgyrepagella-italic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/texgyrepagella-italic-webfont.woff') format('woff'), url('../fonts/texgyrepagella-italic-webfont.ttf') format('truetype'), url('../fonts/texgyrepagella-italic-webfont.svg#TeXGyrePagellaItalic') format('svg'); font-style: italic; } @font-face { font-family: 'TeXGyrePagella'; src: url('../fonts/texgyrepagella-bold-webfont.eot'); src: url('../fonts/texgyrepagella-bold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/texgyrepagella-bold-webfont.woff') format('woff'), url('../fonts/texgyrepagella-bold-webfont.ttf') format('truetype'), url('../fonts/texgyrepagella-bold-webfont.svg#TeXGyrePagellaBold') format('svg'); font-weight: bold; } @font-face { font-family: 'TeXGyrePagella'; src: url('../fonts/texgyrepagella-bolditalic-webfont.eot'); src: url('../fonts/texgyrepagella-bolditalic-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/texgyrepagella-bolditalic-webfont.woff') format('woff'), url('../fonts/texgyrepagella-bolditalic-webfont.ttf') format('truetype'), url('../fonts/texgyrepagella-bolditalic-webfont.svg#TeXGyrePagellaBoldItalic') format('svg'); font-weight: bold; font-style: italic; } That way, I can simply specify the font using:\nfont-family: 'TeXGyrePagella', Palatino, Georgia, \u0026quot;DejaVu Serif\u0026quot;, serif; If you have any questions, or if this is also available as a browser plug-in, don\u0026rsquo;t hesitate to correct me! :)\nThat\u0026rsquo;s it again and cheers,\niss\n","permalink":"https://www.nesono.com/blog/using-font-face-for-clean-fixed-fonts/","summary":"","title":"Using @font-face for Clean Fixed Fonts On Any Platform"},{"content":"I always forget how to configure siunitx correctly in the preemble of a LaTeX document. What makes it worse it that newer TeX distributions deliver version 2 while older distributions still use version 1 and both use different configuration variables. If you use version 1, you\u0026rsquo;d probably want to use the following configuration:\n% version 1 of siunitx package \\usepackage{siunitx} \\sisetup{per=fraction,fraction=nice,alsoload=binary,obeyall} The setup configures fraction units to be printed using a fraction dash with superscript for nominator and subscript for denominator. The binary sub package loads bits and bytes units and obeyall makes inserted units inherit the font weight and font style of the context.\nThe same configuration for version 2 is as follows:\n% version 2 of siunitx package \\usepackage{siunitx} \\sisetup{per-mode=symbol,detect-all} \\usepackage{xfrac} \\sisetup{per-mode=fraction,fraction-function=\\sfrac,alsoload=binary} As a result of this mess I always insert both specifications and comment out the unused.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/latex_siunitx/","summary":"","title":"Using LaTeX 'siunitx' Package With Version 1 and 2"},{"content":"Today I visited one of these web pages that try to increase your security by prohibiting pasting the password from the clipboard. As I use a password generator and like to have large passwords, typing the password by hand three times was no option for me. I searched the web for a solution and found nothing. Maybe I was just asking the wrong questions, but I don\u0026rsquo;t mind. Here\u0026rsquo;s my solution.\nWith the web form opened in a modern browser (i.e. Chrome, Safari or Firefox) and an inspection tool installed (built-in with Chrome/Safari, provided with Firebug for Firefox), I was able to simply disable the pseudo security annoyance:\nWith the focus in the password text input, right click and choose Inspect Element. Then simply edit the appearing HTML and change onpaste=\u0026quot;return false;\u0026quot; to onpaste=\u0026quot;\u0026quot;. Be sure to repeat this for every entry element, but in general, there are no more than two of them.\nThat\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/paste_into_webform/","summary":"","title":"When You Can Not Paste Your Password into the Webform"},{"content":"For doing native FreeBSD stuff, I decided to install FreeBSD besides an existing Ubuntu installation. However, the Grub settings did not turned out to be as easy as the installation process.\nI installed the system on partition 3 of a SDD, which is /dev/sda1 on my the Ubuntu machine and connected to the first SATA slot. Here are the lines I added to /etc/grub.d/40_custom:\nmenuentry \u0026quot;FreeBSD\u0026quot; --class freebsd --class bsd --class os { insmod ufs2 set root='(hd0,2)' chainloader +1 } And that\u0026rsquo;s it, again :)\n","permalink":"https://www.nesono.com/blog/grub_configuration_freebsd/","summary":"","title":"Grub Configuration Booting FreeBSD on Existing Ubuntu"},{"content":"Some weeks ago I had to run a simulation for my research which has been very elaborate and involved externally invoked scripts on remote machines (so-called Wuchtbrummen). These external calls were dispatched by a central main script, that was running on my local PC. To avoid a complete SSH session setup and teardown every time a new call should be invoked on a Wuchtbrumme, I wanted to have a persistent SSH connection, where all subsequent commands can be tunneled through.\nI was pretty surpised when I saw this available using standard OpenSSH options. I also posted this on serverfault, even though I was a bit late to get the \u0026lsquo;best answer badge\u0026rsquo;. I just post the necessary steps here to share it with you and to have it quickly searchable at hand.\nThe main option to set is the ControlMaster option. To enable it, I add the following line to ~/.ssh/ssh_config\nControlMaster auto Then, I added the following line to the Host Section in ~/.ssh/ssh_config\nHost * ControlPath ~/.ssh/master-%r@%h:%p Now start a master session in the background, which all subsequent SSH sessions will reuse using the following command (substitute remote.host with your remote machine or Wuchtbrumme):\nssh -MNf remotehost And that\u0026rsquo;s it again!\nCheers, iss\n","permalink":"https://www.nesono.com/blog/reusing_ssh_connections/","summary":"","title":"Reusing Persistent SSH Connections for Performance Reasons"},{"content":"Here is my new zen theme based on drupal 7 - to which I upgraded my old site. The theme has been completely redesigned towards good readability. Its design is encouraged by applications like Instapaper, Read it Later or browser extensions like Safari\u0026rsquo;s Reader or Chrome\u0026rsquo;s iReader.\nIf you are curious about details of the theme, you can find it online on github. Anyhow, I will post some details about the upgrade process and some information about the theme in the near future, so stay tuned!\nApart from the updates, I removed several pages which were outdated or simply none of your business ;) I hope you like the new look of nesono.com and come back soon to check for new posts (if you don\u0026rsquo;t like polling, you can subscribe to the RSS feed at the bottom).\nCheers,\nadmin\n","permalink":"https://www.nesono.com/blog/site_clean_up_theme_upgrade/","summary":"","title":"Another Site Clean-Up and Theme Upgrade"},{"content":"Yesterday I wanted to start using the Eclipse extension PyDev, because I was tired of using the pdb module. Even more sophisticated debugging modules like pudb did not satisfy my need for intuitive and comfortable python debugging. Even though I heard of the PyDev extension quite a while ago, I never gave it a try, as I was reluctant using the Eclipse Framework for Python.\nAs already said, yesterday I took comfort and installed PyDev in my local Eclipse installation using Install New Software... from the Help menu. The installation process was finished in a wink and I could start my application right away using the Run button.\nHowever, when trying to debug (using the bug symbol in the toolbar), I got the following error:\nImportError: dlopen( /System/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/lib-dynload/math.so, 2): Symbol not found: __PyLong_AsScaledDouble After consulting the all-knowing, all-seeing Trash Heap I found the bug mentioned on StackExchange and thought it might be worth sharing this information with you.\nHere is how I fixed the problem: Open the Eclipse-Preferences (⌘-,), advance to PyDev -\u0026gt; Interpreter Python and remove the one configuration in the upper list of python interpreters. Then, install python from home brew (or another source of choice) using:\nbrew install python and add the brew interpreter to Eclipse PyDev using the location /usr/local/bin/python and a name of your choice. For home brew\u0026rsquo;s Python you might need to add /usr/local/bin before the occurrence of /usr/bin in your PATH variable as well as /usr/local/share/python.\nAfter the proper installation of an alternative Python and it\u0026rsquo;s addition to PyDev as the default interpreter, I was able to use PyDev smoothly and get back to work finally.\nThat\u0026rsquo;s it!\niss\n","permalink":"https://www.nesono.com/blog/ecplise-with-pydev-osx/","summary":"","title":"Eclipse with PyDev under OS X Lion"},{"content":"","permalink":"https://www.nesono.com/blog/matlab-crash-fix/","summary":"","title":"Late Update for Mathworks' Matlab Java Crash Solution"},{"content":"I recently updated the shell add-on for OS X, that overloads rm to not remove the items, but move them into trash instead. Before the update, a for loop moved every single item given in the command line into trash using one osascript (Apple Script) call per item. This caused a blocking shell with one \u0026lsquo;flupp\u0026rsquo; sound effect for each moved item, which can be quite tedious, when removing many items, even if they are small. Now, after the update, a item list is created and filled with all given items to remove and in the end passed to one osascript call.\nThe change is committed to my github repo, as usual.\nBest,\niss\n","permalink":"https://www.nesono.com/blog/postbox_settings/","summary":"","title":"rm2trash for OS X update"},{"content":"I recently updated the shell add-on for OS X, that overloads rm to not remove the items, but move them into trash instead. Before the update, a for loop moved every single item given in the command line into trash using one osascript (Apple Script) call per item. This caused a blocking shell with one \u0026lsquo;flupp\u0026rsquo; sound effect for each moved item, which can be quite tedious, when removing many items, even if they are small. Now, after the update, a item list is created and filled with all given items to remove and in the end passed to one osascript call.\nThe change is committed to my github repo, as usual.\nBest,\niss\n","permalink":"https://www.nesono.com/blog/rm2trash_update/","summary":"","title":"rm2trash for OS X update"},{"content":"","permalink":"https://www.nesono.com/blog/site-cleanup/","summary":"","title":"Site Clean-Up"},{"content":"As I always forget the exact syntax and am too chicken-hearted to fool around, I note down the command to add one\u0026rsquo;s public key to the authorized keys on the remote machine (to login using pub/private key pair only) here. Use the following command (id_rsa.pub might be id_dsa.pub on your site).\ncat ~/.ssh/id_rsa.pub | ssh user@site.com \u0026#34;cat - \u0026gt;\u0026gt; ~/.ssh/authorized_keys\u0026#34; That\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/ssh-copy-id/","summary":"","title":"Add SSH Public Key With One Command"},{"content":"To parse a gzipped xml file using the minidom parser in Python, one has two options: Either hand over the file object pointing to the xml file or hand over the full content as a string. As I thought it would be the more powerful variant in terms of efficiency, I chose to use the file object, given by gzip.open(). This works for the SAX parser, but fails for the minidom parser somehow. This is for sure a bug, but it persists over many versions and many operating systems (tried Linux and Mac).\nThus, I changed my code to read the content of the file completely into memory first and parse the string afterwards. See also the following listing.\nimport gzip from xml.dom.minidom import parse, parseString # open and read gzipped xml file infile = gzip.open( options.infile ) content = infile.read() # parse xml file content dom = parseString( content ) That\u0026rsquo;s it!\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/python-minidom-parse-xml-gz/","summary":"","title":"Python minidom parse xml.gz File"},{"content":"I just figured out once more, that vim works as expected. If you need to insert the output (e.g., stdout) from a command into the open buffer, e.g. to insert a certain type of files into something like .gitignore, svn::ignore, .cvsignore, you can simply type\n:r !ls *.aux In command mode and the text will be inserted at the cursor position.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/insert-output-from-command-line-in-vim/","summary":"","title":"Insert Output from Command Line in Vim"},{"content":" ","permalink":"https://www.nesono.com/blog/os_x_lion_tedious/","summary":"\u003c!-- raw HTML omitted --\u003e","title":"OS X Lion Tedious Installation"},{"content":"It\u0026rsquo;s a bit tricky, but today I fixed a small problem of an obsolete shortcut in OS X Lion. I used to have Cmd-Right on Exposé and Cmd-Middle on Spaces, to have both functions short at hand. After I upgraded to Lion from Snow Leopard, Spaces and Exposé are merged into Mission Control, which was a wise decision, but my mouse shortcuts were migrated BOTH to Mission Control. Great not to loose the shortcuts, but bad not to be able to change them again - Cmd-Middle has been vanished from System Preferences and only Cmd-Right showed up as a shortcut for Mission Control.\nAn now for the solution: Lucky me, my other Mac was still on Snow Leopard and I could check which file contains the Cmd-Middle shortcut. I did this by using fseventer, a tool to display file system events recorded by OS X. It showed me, that ~/Library/Preferences/com.apple.hotkeyshortcut.plist was the file in charge. I then made a copy of the old file and disabled the shortcut temporarily. Then I checked, what changed in the file by using FileMerge (comes with XCode IIRC) and using this additional trick. The result is given in the picture.\nThe file was renamed for Lion however and is called com.apple.symbolichotkeys.plist now. Then, I edited the file using my favourite editor (vim), but before I had to convert it to xml format using the following line\nplutil -convert xml1 com.apple.symbolichotkeys.plist After fixing the lines for key 87 and key 88, I converted the file back using:\nplutil -convert binary1 com.apple.symbolichotkeys.plist And that\u0026rsquo;s it again,\ncheers!\niss\n","permalink":"https://www.nesono.com/blog/remove_cmd_middle/","summary":"","title":"Remove Old Snow Leopard Shortcut For Spaces - Cmd-Middle Button"},{"content":"While trying Postbox under Mac, I soon realized it\u0026rsquo;s a thunderbird derivative. However, using Thunderbird I was able to use the \u0026lsquo;N\u0026rsquo; short cut to switch to next unread message no matter in which folder it resides. After senseless searches in the virtual Postbox documentation, I searched for it at Mozilla and found the result instantly. However, you need to edit the configuration by hand, which seems a bit nerdy for a comfortable Mac Application.\nTherefore, open Postbox\u0026rsquo; preferences and switch to Advanced-\u0026gt;General, press Config Editor\u0026hellip; at the bottom and insert nav in the search field after pledging to be carefull. Then only one line should be left in the list below, labeled mailnews.nav_crosses_folders. Change it\u0026rsquo;s value to 1 and that\u0026rsquo;s it.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/change_folder_for_next_unread_postbox/","summary":"\u003cp\u003eWhile trying \u003ca href=\"http://www.postbox-inc.com/\"\u003ePostbox\u003c/a\u003e under Mac, I soon realized it\u0026rsquo;s a thunderbird derivative. However, using Thunderbird I was able to use the \u0026lsquo;N\u0026rsquo; short cut to switch to next unread message no matter in which folder it resides. After senseless searches in the virtual Postbox documentation, I searched for it at Mozilla and found the result instantly. However, you need to edit the configuration by hand, which seems a bit nerdy for a comfortable Mac Application.\u003c/p\u003e","title":"Change Folder When Proceeding to Next Unread Message in Postbox"},{"content":"I am just wondering who sees this effect as well: Chrome delays the sleep for 20 seconds on any mac. It seems to be an open issue. However, I would have never imagined that a browser could be so intriguing :D\nCheer,\niss\n","permalink":"https://www.nesono.com/blog/chrome-delay-system-sleep-by-20-seconds/","summary":"\u003cp\u003eI am just wondering who sees this effect as well: Chrome delays the sleep for 20 seconds on any mac. It seems to be an open \u003ca href=\"http://www.google.com/support/forum/p/Chrome/thread?tid=7b1799e346b50273\u0026amp;hl=en\"\u003eissue\u003c/a\u003e. However, I would have never imagined that a browser could be so intriguing :D\u003c/p\u003e\n\u003cp\u003eCheer,\u003cbr\u003e\niss\u003c/p\u003e","title":"Chrome Delays System Sleep by 20 Seconds"},{"content":"","permalink":"https://www.nesono.com/blog/matlab_crashes_java_update/","summary":"","title":"Matlab R2007b Crashes after Java Update Solution"},{"content":" ","permalink":"https://www.nesono.com/blog/rm2trash/","summary":"\u003c!-- raw HTML omitted --\u003e","title":"Nesono-Bin Bashtils RM to Trash Now with Put Back Support"},{"content":"Some days ago I found a nice GUI for R: RStudio! It works as it should always have been: with a workspace/data browser, script editor (with source on save), documentation viewer, file browser, and a plot view. If you already feel familar with R, you should definately check it out, it will probably second your workflow as hell. At least it did for me\u0026hellip;\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/rstudio/","summary":"","title":"A usable R-GUI under (Windows), Mac OS X, and Linux"},{"content":"To install GNU Octave, an Open Source Matlab clone under Mac OS X, you will need to install fltk and GraphicsMagick as specific versions first. To do so, install both using the following commands:\nbrew install --HEAD fltk brew install --with-magick-plus-plus GraphicsMagick Then, after installation has finished, you can proceed with the installation of GNU Octave as follows:\nbrew install octave After that, I installed gnuplot as well (no, it\u0026rsquo;s not in the dependency list), because fltk was somehow no longer available in octave after my last reboot. Just invoke the following to get gnuplot (takes a while):\nbrew install gnuplot That\u0026rsquo;s it again.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/install_octave/","summary":"","title":"Install Octave with Home Brew under Mac OS X"},{"content":"After some years as a MacPorts user I decided to give home brew a try, which are advertising their package manager with the sentence \u0026ldquo;Homebrew — MacPorts driving you to drink? Try Homebrew!\u0026rdquo;. The idea is not to build everything from scratch and create another software micro cosmos but to reuse existing Mac OS X abilities and save some space (as well as [cpu] time for updates). Sounds promising I thought and installed it according to the website\u0026rsquo;s description.\nOne of the first things I wanted to install was \u0026ldquo;The R Project for Statistical Computing\u0026rdquo;. Anyhow, since home brew requires people to think a bit, it was not as straight forward as some MacPorts rules. For R, we need to have a fortran compiler installed. I did this using the following command:\nbrew install gfortran Brew would complain otherwise that no fortran compiler is installed and R installation would fail. After that, everything is ready already and we can proceed using:\nbrew install R NB! You need to run this command first if you are on a recent OS X:\nbrew tap homebrew/science That\u0026rsquo;s it - no rocket science but nice to know in advance\u0026hellip;\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/install_r_home_brew/","summary":"","title":"Install R with Home Brew under Mac OS X"},{"content":"After being somewhat unhappy with the Apple Terminal application since the very beginning, I found a very nice alternative in iTerm2! Everything seems to work fine from tabbing, splitting horizontally and vertically, cursor observation to fancy growl support.\nThe only pain were misconfigured Home and End keys. The approriate information on the iTerm2 homepage did not really give me the solution right out of the box, so I paste it here.\nMake sure that your TERM variable is the same as set in your iTerm2 profile (in preferences) and add the following two esape sequences to your key configuration:\nButton Escape Sequence Home Esc + [1~ End Esc + [4~ It should work right after adding the sequences!\nThat\u0026rsquo;s it,\nCheers!\niss\n","permalink":"https://www.nesono.com/blog/iterm2_home_end/","summary":"","title":"iTerm2 Home and End Buttons"},{"content":"I know it\u0026rsquo;s almost common sense, but today I had to refix the slow GUI for Matlab yet another time. As the information seems to start vanishing from the web, I want to perpetuate it here.\nGo into directory /Applications/MATLAB_R2007b/bin/maci (or wherever your installation resides) and create a file called java.opts with the following content.\n-Dapple.awt.graphics.UseQuartz=true Cheers,\niss\n","permalink":"https://www.nesono.com/blog/slow_gui_matlab/","summary":"","title":"Matlab 7.5 GUI Slow Under Mac OS X"},{"content":"As I am doing some of my evaluations in Matlab, I was curious if I can emulate the behaviour of unsigned int, unsigned short C-variables in Matlab. However, they behave quite different! If you have a uint16 variable, which has the value 65535 (the maximum it can take) and increment it, it remains at 65535. No wrap around :/\nBesides that, I gave diff( uint16() ), which shows a serious bug. To reproduce: enter the following into your Matlab terminal:\next_seq = diff( uint16( [65530:65535, 0:5] ) ) And you will get:\nans = 1 1 1 1 1 0 1 1 1 1 1 This means, that Matlab takes care of the wrap around, just in a wrong manner. The same \u0026ldquo;bug\u0026rdquo; occurred for me with uint32 and made me wonder, what Matlab is insinuating with this behavior. If you should know, please drop a note here!\nTo get standard behavior at least where only one wrap around occurs, I simply wrote a for loop now with two variables, one containing the last seq-entry and the other containing the current seq-entry. If the difference is smaller than -(2^16)/2, then I add 65535 to the result.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/matlab_integer_classes/","summary":"","title":"Matlab uint16 and uint32 Classes"},{"content":"If you experience the same errors like me:\nError: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed Then, you might have the wrong gcc active. You can use my script to switch your gcc back to the system\u0026rsquo;s standard, which is gcc-4.2 in my case.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/macports_selfupdate_problem/","summary":"","title":"MacPorts Selfupdate Problems"},{"content":"Today I read about an DAViCal update, which is supposed to support the CardDav protocol, the native Apple Address Book protocol. I started by creating an \u0026ldquo;Addressbook Principal\u0026rdquo; by Hand using the DAViCal web interface, as also explained in the DAViCal Wiki and set its name to \u0026lsquo;contacts\u0026rsquo;. The point is, that I can add a contact either on my phone or desktop and it syncs automatically. No more need to synchronize devices by hand!\nAdding the address book to the iPhone was no problem at all. I started Settings -\u0026gt; Add Account... and under Other I have chosen CardDAV account using the following settings:\nServer: calendar.example.com:443/caldav.php/username/contacts/ User Name: username Password: secret Description: some description The most important field is the server setting with the port and path inline. And please don\u0026rsquo;t forget to use your server name instead as well as your user name and password ;)\nTo fill the address book, I configured the Apple Address Book on my stationary Mac using the following settings:\nServer: https://calendar.example.com:443/caldav.php/username/contacts/ User Name: username Password: secret Description: some description Again, substitute the server name, user name and password with your data (and skip the error message). Now, you can fill your server hosted address book by drag \u0026amp; drop from your local address book.\nThat\u0026rsquo;s it,\niss\n","permalink":"https://www.nesono.com/blog/ical_address_book_server/","summary":"","title":"Linux Server for iCal and Apple Address Book"},{"content":"Since ever, I was searching for a solution for nice C++-aware code navigation for vim. The solution described here is based on\nctags omnicppcomplete Just install the omnicppcomplete plugin in vim and call ctags.\nctags -R --c++-kinds=+p --fields=+iaS --extra=+q ./ Invoke this call from the upmost working directory inside your project or give an appropriate path at the end of the command.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/intellisense_with_vim/","summary":"","title":"Intellisense with vim"},{"content":"If you want to update nesono-bin, I would recommend you to use the following command inside the nesono-bin directory (especially if you made some editing):\nIf you encounter conflicts, you will need to solve them first to continue the rebase, of course.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/update_nesono_bin/","summary":"","title":"Updating Nesono-Bin"},{"content":"If you want to get rid of messages with this subject sent by the amavis installation of your mailserver, you need to edit /etc/amavis/conf.d/20-debian_defaults\n$final_banned_destiny = D_REJECT; Don\u0026rsquo;t forget to restart you amavis service using\nsudo /etc/init.d/amavis restart That\u0026rsquo;s it! Cheers,\niss\n","permalink":"https://www.nesono.com/blog/disable-considered-onsolicited-bulk-mail/","summary":"\u003cp\u003eIf you want to get rid of messages with this subject sent by the amavis installation of your mailserver, you need to edit \u003ccode\u003e/etc/amavis/conf.d/20-debian_defaults\u003c/code\u003e\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-perl\" data-lang=\"perl\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$final_banned_destiny \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e D_REJECT;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eDon\u0026rsquo;t forget to restart you amavis service using\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo /etc/init.d/amavis restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThat\u0026rsquo;s it! Cheers,\u003cbr\u003e\niss\u003c/p\u003e","title":"Disable 'Considered UNSOLICITED BULK EMAIL, apparently from you'"},{"content":"From time to time, my software RAID 1 behaves ugly. After sleep periods for instance, it ejects and is no longer in sync. Today, I read an article from Apple, which seems to address my problem. They are using diskutil on the command line and it seems to provide more information about the RAID\u0026rsquo;s status than the Disk Utility GUI. It presents information like this.\nsudo diskutil checkRAID AppleRAID sets (1 found) ==================================================================== Name: Backup Unique ID: 0F11E679-27C7-4F05-BA57-1C7410EC048F Type: Mirror Status: Online Size: 749.7 GB (749678166016 Bytes) Rebuild: automatic Device Node: disk4 -------------------------------------------------------------------- # Device Node UUID Status -------------------------------------------------------------------- 0 disk3s2 D560FCB5-14FE-4838-8D97-A03CA6B387B9 Online - disk1s2 859CAE06-A75C-426C-944A-BBA5E28F6FDA Spare ==================================================================== Note, that this output was produced after I cleaned up some stuff. I had a non existent third disk for example, which was identified to be in the RAID set - the UUID was similar to the one of device disk1s2. The entry Rebuild was set to manual before I invoked:\nsudo diskutil appleRAID update AutoRebuild 1 disk4 The fact, that disk1s2 has the status Spare still bugged me. Hence, I removed the disk from the RAID set again using the following command:\ndiskutil appleRAID remove BD91D31E-E311-4980-B756-1E9343F6CEA7 0F11E679-27C7-4F05-BA57-1C7410EC048F Then, I re-added the disk using the following command - note that you can no longer use the UUID, as the drive lost it:\ndiskutil appleRAID add member disk1s2 0F11E679-27C7-4F05-BA57-1C7410EC048F Now, a three hour rebuild process has been initiated, for which end I am still waiting now ;)\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/software-raid-osx/","summary":"","title":"Software RAID Problems under Mac OS X"},{"content":"Today I needed to merge and encrypt multiple PDF files into one and thought to remember it to be an easy task. Well, it is actually, but with some things to keep in mind and hence this post. So, if you want to merge PDF files in Mac OS X, you can do the following:\nOpen all PDF files, either one by one, or all at once Drag and drop Single pages (using the side bar) or Full Documents (using the proxy icon from the window title) Drop them into the side bar page preview If you drop on the upper half, the contents are prepended If you drop on the lower half, the contents are appended. This might seem complex, but it is pretty intuitive, as long as you keep in mind to drop the page on top of the other. That\u0026rsquo;s it again.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/pdf_files_os_x/","summary":"","title":"Merging and Encrypting Multiple PDF Files under Mac OS X (Snow Leopard)"},{"content":"Today I wanted to get all macro definitions from gcc - including those defined internally. I knew it some tim ago, but forgot the command again, so I paste it in here for all of you.\ngcc -dM -E - \u0026lt; /dev/null | sort That\u0026rsquo;s it and cheers,\niss\n","permalink":"https://www.nesono.com/blog/gcc_preproc_dump/","summary":"","title":"Dump gcc Preprocessor Macro Definitions"},{"content":"Yesterday, I needed to start spellchecking my latest paper and gave :help spell a try in vim. The following line made me almost completely happy:\n:setlocal spell spelllang=en_us After that, typos were highlighted with respect to the alleged error made and suggestions are queried using z= for the word under the cursor or the selection in visual mode. Alternatively, the word can be added to the list of accepted words by pressing zg.\nThat\u0026rsquo;s it, clean, small and simple :)\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/spell_checking_vim/","summary":"","title":"Enable Spell Checking in VIM for Latex, etc."},{"content":"This information is neither new, nor secret, but useful by all means. Gitx, the git GUI for Mac OS X has additional functionality to be invoked from the Terminal right beside your favourite editor!\nSelect Enable Terminal Usage... from the GitX frontmost menu and enter your administrator password. Make sure, that /usr/local/bin is in your PATH variable and try gitx --help from your Terminal.\nIf you want to start gitx from within Terminal inside your git repository in check-in mode, invoke\ngitx -c More details and further information can be found in the user manual on the gitx homepage.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/gitx_terminal/","summary":"","title":"Using gitx from the Terminal"},{"content":"Today I found the issue of a problem, I struggled for quite a while! With my Mac logging into my server and running some GNU Screen session on it, I had problems with backspace. It was either interpreted as delete, or not interpreted at all. Setting the Preferences of Mac\u0026rsquo;s Terminal to Ctrl-H sending was not the solution either, as this disabled all special characters (using option-u for example). Furthermore, I noticed several crashes of my ssh sessions.\nFinally, I recognized, that the ssh client I was using was taken from /opt/local/bin instead of /usr/bin. MacPorts has installed a new ssh client over mine \u0026ldquo;original\u0026rdquo; one. So my solution was simply to change the ssh client by modifying the PATH variable. Maybe this is not a solution for all time, but for today I\u0026rsquo;m fine ;)\n[UPDATE] Finally, I found the actual issue here! When running irssi from screen directly, the TERM environment variable is not set. Thus, I added the following function to my zshrc (bashrc should work the same way) and the problem was gone. No more backspace problems under both irssi and vim!\nSCREENBIN=$(which screen) echo \u0026quot;using screen bin: ${SCREENBIN}\u0026quot; # function to fix screen Delete/Ctrl-H problem function screen() { OLDTERM=${TERM} \u0026amp;\u0026amp; TERM=screen \u0026amp;\u0026amp; ${SCREENBIN} $@ \u0026amp;\u0026amp; TERM=${OLDTERM} } Cheers,\niss\n","permalink":"https://www.nesono.com/blog/osx-ctrl-h-problems-with-gnu-screen/","summary":"","title":"Mac OS X Ctrl-H and/or Delete/Backspace Problems with GNU Screen [UPDATE]"},{"content":"This blog entry is just a reminder for myself, as I frequently forget how to install and load packages under R statistical language. It\u0026rsquo;s simple - e.g. to install and load package plotrix, use the following commands at your R prompt:\ninstall.package( \u0026quot;plotrix\u0026quot; ) library( \u0026quot;plotrix\u0026quot; ) Short a fast this entry is\u0026hellip;\niss\n","permalink":"https://www.nesono.com/blog/installing-and-using-r-packages/","summary":"","title":"Installing and Using R-Packages"},{"content":"Today the command line audio utility sox gave me some head aches while I was working on some sample files for a listening test I prepare for my current research. I actually just needed to convert a stereo 44.1kHz floating point WAV file to 48kHz, split it into single mono files (one for each channel), convert the mono files to raw PCM, process some filter on the raw files, convert them back to mono WAVs, merge the mono files back to stereo again and convert back to 44.1kHz. To accomplish this, I used these commands, which were neither well documented, nor correctly referred to by most of the blogs I\u0026rsquo;ve read today.\nThe following command simply converts the samplerate to 48kHz (nothing special):\nsox infile.wav -r 48k outfile.wav These commands split the stereo file into two mono files (left and right channel):\nsox infile.wav outfile.l.wav remix 1 sox infile.wav outfile.r.wav remix 2 The following commands create a mono mix-down of a stereo file\nsox infile.wav outfile.wav remix 1,2 sox infile.wav outfile.wav remix 1-2 The following command converts a wav file to a raw 16-bit signed integer mono file with 48kHz:\nsox infile.wav -b 16 -s -c 1 -r 48k -t raw outfile.raw The following command converts a raw file back to WAV (option -t raw is mandatory!):\nsox -b 16 -s -c 1 -r 48k -t raw infile.wav outfile.wav The following command merges the two mono files into one stereo WAV file (order: left, right):\nsox -M input.l.wav input.r.wav output.wav This command converts the 48kHz back to 44.1kHz:\nsox input.wav -r 44100 output.wav Another nice command, not too intrusively documented is the following:\nsox audiofile.wav -n stat which allows scripts to read audio signal attributes like overall gain, mean values etc. from audio files and use them afterward e.g. for normalization, dc-offset compensation, etc.\nAnother command for acquiring signal information is soxi:\nsoxi audiofile.wav The main problem for me today was the flag \u0026lsquo;-t raw\u0026rsquo;, which is not stated as mandatory in the sox manpage for raw file, but it actually is! Anyhow, the remaining part is pretty straight forward :)\nCheers,\nis\n","permalink":"https://www.nesono.com/blog/sox-conversions/","summary":"","title":"SOX Conversions, Raw Files, Splitting And Merging Channels"},{"content":"ok then, you clicked on the about menu link. so you might want to know, what this page is all about. simply spoken, this is my personal page containing several things i made over the years. i just needed a nice name, representing all my stuff, while not being my family name ;)\nand, as you clicked on \u0026lsquo;about\u0026rsquo;, you might want to know what\u0026rsquo;s behind the name nesono. the following paragraphs try to give you a small-philosophical glimpse about the name and its origin:\nmusic and arts can be considered as being the orchestration of sounds, colors or any \u0026lsquo;filling\u0026rsquo; media imaginable. within this perspective, a picture would be the composition of brush and pencil strokes with all shapes and colors, forming a painting, becoming the work of art. music is defined by all tones, tunes and rhythms played by the separate instruments to form a more or less homogenic sound.\npeople might forget, that any sound is not as present as it should, if there is no silence. mellow tones gain no presence, if there exists no disharmony in any way and a rhythm can never be produced without the discrete missing sounds in between each rhythm stroke. this point of view of lacking sounds is, what nesono stands for. nesono means \u0026rsquo;no sound\u0026rsquo; in esperanto and stands for the alternate way of the definition of music.\nand now we can discover the meaning of the double slashes (//) to the right of the title. this is the music notation sign for \u0026lsquo;break\u0026rsquo; (ital/esp: cesura, de: zäsur) denoting to play a break in a song.\nbut enough small minds for now. now as you know the idea behind the scenes, feel free to enjoy yourself on this website. it does not always relate to music and not always relate to the the nesono attitude. generally spoken: nesono is just my personal website ;)\n","permalink":"https://www.nesono.com/about/","summary":"\u003cp\u003eok then, you clicked on the \u003cem\u003eabout\u003c/em\u003e menu link. so you might want to know, what this page is all about. simply spoken, \u003cem\u003ethis is my personal page\u003c/em\u003e containing several things i made over the years. i just needed a nice name, representing all my stuff, while not being my family name ;)\u003c/p\u003e\n\u003cp\u003eand, as you clicked on \u0026lsquo;about\u0026rsquo;, you might want to know what\u0026rsquo;s behind the name \u003cstrong\u003enesono\u003c/strong\u003e. the following paragraphs try to give you a small-philosophical glimpse about the name and its origin:\u003c/p\u003e","title":"About"},{"content":"Some days ago, my father asked me if I could record TROY for him, which was broadcasted around Christmas 2009 by a public TV station. As I am a customer of T-Entertainment (the IPTV solution from Deutsche Telekom) I suffer from getting my recordings out of my media receiver box onto a shared medium. Anyhow, I heard from a colleague of mine that you can watch IPTV using the VLC player - as long as you are a customer of T-Entertainemt of course ;) Additionally, the public TV stations had an HDTV showcase during Christmas and years eve and so I thought I should give it a try and record the stream in HDTV.\nSo I started searching for the multicast address of the HDTV stream and found it somewhere in the web. I started VLC and opened File -\u0026gt; Network and entered the multicast RTP information using \u0026lsquo;Open RTP/UDP Stream\u0026rsquo;. After this, I started the Streaming/Exporting Wizard and select the currently active stream as the source. By that, I simply dumped the MPEG-TS stream onto my local hard drive.\nAfter the movie has ended, I could open the transport stream with VLC. The next step now was to convert the HDTV MPEG-TS stream, which contained H.264 video and MPEG Layer 2 audio to a DVD compatible format. I tried several tools, e.g. Toast 10 Titanium, Movie Gate 2, ffmpegX, mencoder and transcode, but none of them produced a satisfying output. The final choice was so simple, that it is almost embarrassing to note. But so what, it was the reason that I started this blog entry and so here it is:\nffmpeg -i troja.ts -target pal-dvd troja.mpg After that, I still had to re-quantize the video stream, but anyhow - it worked at least :)\nThat\u0026rsquo;s it and cheers,\niss\n","permalink":"https://www.nesono.com/blog/recording_telekom_iptv/","summary":"","title":"Recording from Telekom IPTV to DVD"},{"content":"Some days ago, I reported about my freezing Mac while using Logic Pro 8 and upgrading to Logic Pro 9 to avoid the problem. However, in the meanwhile, the same problems occured with Logic Pro 9 and I was almost getting up the wall about all this stuff, but then fortunately, I stumbled over an RME forum thread (beware, it\u0026rsquo;s German!), discussing somewhat similar issues.\nFinally, it seems like that I have to hope for Snow Leopard to fix a problem with Firewire and I hope Apple will do this, as the RME guys claim their drivers to be waterproof :]\nMy workaround for now is to switch on the Fireface beforehand switching on the Mac. That\u0026rsquo;s it so far from freezing Fred :)\n","permalink":"https://www.nesono.com/blog/snow-leopard-logic-pro-issues/","summary":"","title":"Snow Leopard Logic Pro Issues - Update"},{"content":"I just found my good old crontab template, which provides some nice formatting and documentation features. Just for our convenience, I paste it in here.\n# .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * command to be executed # * * * * * command --arg1 --arg2 file1 file2 2\u0026gt;\u0026amp;1 You don\u0026rsquo;t need to care about the artificial line break too much - it\u0026rsquo;s only in the html display, simply select above text and copy it to the start of your crontab file.\nEnjoy and relax, iss!\n","permalink":"https://www.nesono.com/blog/crontab-template/","summary":"\u003cp\u003eI just found my good old crontab template, which provides some nice formatting and documentation features. Just for our convenience, I paste it in here.\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-text\" data-lang=\"text\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# .---------------- minute (0 - 59)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# |  .------------- hour (0 - 23)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# |  |  .---------- day of month (1 - 31)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)  OR sun,mon,tue,wed,thu,fri,sat\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# |  |  |  |  |\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# *  *  *  *  *  command to be executed\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e# *  *  *  *  *  command --arg1 --arg2 file1 file2 2\u0026gt;\u0026amp;1\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eYou don\u0026rsquo;t need to care about the artificial line break too much - it\u0026rsquo;s only in the html display, simply select above text and copy it to the start of your crontab file.\u003c/p\u003e","title":"Crontab Template"},{"content":"While using it for quite a while now and without serious problems, Snow Leopard seems to work together with Logic Pro 8 no longer! It\u0026rsquo;s really suspicious, that it suddenly began to crash almost every time, I wanted to use it and several reports from other users seem to prove the same:\nmacosxhints logic pro help cnet forums The only thing supposing to work is upgrading to Logic Pro 9 - very funny Steve! So, if you need to work with Logic Pro 8, don\u0026rsquo;t upgrade your Leopard!\n[Update] In the following I describe the setup I am using after the shock fade-out. Since I was reluctant towards downgrading and spent time trying different hardware connection orders, I came up with an interesting solution. First of all, I upgraded to Logic Pro 9 (gnn), bad enough, Logic 9 did freeze as well whenever I plugged my Fireface 400 to my mac (took me while to discover). I searched through the archives of RME and they claimed a possible bug in the Firewire driver interface connection handling routine framework (funny by purpose) and the only way I could get my Fireface interface running was connecting it as soon, as the mac was on Power. I am using a switchable power outlet for quite a while, so I simply attached the Fireface using its DC adapter to the same power outlet as the mac and switched the Fireface from bus powered to power supply. Now, everytime I switch on the power outlet, the Fireface switches on automatically and then I boot my mac. Maybe this can work for Logic 8 as well - I did not give it a try. I am happy to have a stable setup now and am cured from hardware trials for quite a while\u0026hellip;\nCheers, iss\n","permalink":"https://www.nesono.com/blog/logic-pro-8-crashing-snow-leopard/","summary":"","title":"Logic Pro 8 crashing frequently under Snow Leopard"},{"content":"Yesterday I stumbled over a problem using XCode 3. I was caused by a library, which was based on plain Makefiles. I tried to use this library in my XCode project, but anyhow, I always got the same error while linking.\nThe object of a global function of the library could not be found, and the argument list showed a strange vector type:\n__gnu_debug_def::vector\u0026lt;...\u0026gt; Anyhow, after loads of investigation ;) I found two defines, set by XCode in debug mode:\n_GLIBCXX_DEBUG=1 _GLIBCXX_DEBUG_PEDANTIC=1 To fix it, I opened the project file inside the xcodeproj directory using a text editor and removed the lines with above defines. Afterwards, everything compiled and linked fine again :)\nCheers, iss\n","permalink":"https://www.nesono.com/blog/xcode-redefined-std-vector/","summary":"\u003cp\u003eYesterday I stumbled over a problem using XCode 3. I was caused by a library, which was based on plain Makefiles. I tried to use this library in my XCode project, but anyhow, I always got the same error while linking.\u003c/p\u003e\n\u003cp\u003eThe object of a global function of the library could not be found, and the argument list showed a strange vector type:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-cpp\" data-lang=\"cpp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e__gnu_debug_def\u003cspan style=\"color:#f92672\"\u003e::\u003c/span\u003evector\u003cspan style=\"color:#f92672\"\u003e\u0026lt;\u003c/span\u003e...\u003cspan style=\"color:#f92672\"\u003e\u0026gt;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eAnyhow, after loads of investigation ;) I found two defines, set by XCode in debug mode:\u003c/p\u003e","title":"XCode redefined std::vector\u003c...\u003e"},{"content":"If you need to or just want to work with R and have no idea how to start, this page should be a good starting point\u0026hellip;\nCheers, iss\n","permalink":"https://www.nesono.com/blog/good_r_tutorial/","summary":"","title":"Good R tutorial page found..."},{"content":"Recently, I found a page describing how to import audio boooks into iTunes. Well, today, I tried it myself using iTunes 9 and it can be much easier now (since iTunes 9?)\nSimply do the following:\nInsert CD Cancel automatic import (since further modifications are necessary) Select all tracks and click on Menu -\u0026gt; Advanced -\u0026gt; Join CD Tracks Keep all tracks selected and press command-i to edit meta-data Fix useless album names (no numbering needed) Change Import Settings to Spoken Podcast if you like to save some disk space Import CD Repeat steps 1 to 7 for all remaining CDs of the Audiobook Go to your Recent Additions Playlist and search for the recent imports Select the tracks of the audio book and press ⌘-i Fix the track number (e.g. 1 from 1) and check the Disk Number field Add an album artwork if you want Go to the options tab and select Media Kind -\u0026gt; Audiobook The only issue left is the index of the single audio book tracks (CDs). They all have 1, instead of 1, 2, 3, \u0026hellip; and hence iTunes orders them after their chronological order - as they have been added to the library. If you have a work around, I\u0026rsquo;ll be glad to add it to the post!\nAnyhow, your audiobooks should occur in the Audiobook library only, iTunes and your pods should remember the playback position and the tracks should not be included for shuffle play - if you encounter any problems, though, I\u0026rsquo;d be glad to know :)\nCheers, iss\n","permalink":"https://www.nesono.com/blog/import_audiobooks_itunes/","summary":"","title":"Importing Audiobooks into iTunes"},{"content":"Today I fixed a problem with a bash-script I was using for quite a while now, which refused to work correctly under Mac OS X 10.5 (maybe other versions as well). The Problem was, that an sed script did not substitute, what it ought to.\nThe core problem simply had to do with extended regular expression under Mac OS X\u0026rsquo;s sed! With Mac OS X, +, | and ? do not mean the same as they do under e.g. Linux! I was using + and my sed script neglected the work :/\nThe fix was simply to substitute all occurences of + by \\{1,\\}, that\u0026rsquo;s all :D\nCheers, iss\n","permalink":"https://www.nesono.com/blog/sed_under_os_x/","summary":"","title":"SED under Mac OS X 10.5"},{"content":"The Mac OS X Terminal is not a terminal, as other *nix users might be used to. Things like history-search-backward/forward, word-wise jumping, terminal window scrolling by page-up/down - all these are disabled by the standard terminal settings.\nToday I had to fight against character codes of an Irssi™ client, in a remote Screen™ session on a Linux™ server. It turned out to be a good idea to dig into the terminal settings and try to configure the terminal, as I was used to on my other *nix machines. For Irssi, had to do some additional ~/.inputrc tweaks and adjust some locale settings I attached at the end of the entry.\nFirst of all, I changed the preferences of the Terminal application, which can be reached by the menu bar or simply pressing the preferences shortcut (⌘+,). The following pictures show all settings I modified or added.\nOr in words:\nSet the history length of the terminal to something decent (or to unlimited) Adjust the Terminal window size by setting the columns and lines Add some Key-Action tupels to the Keyboard section (pics 2,3,4) Make sure, that delete sends Ctrl-H (beware, that this behaves bad under GNU/screen - the only solution I know is zsh for this) Set character coding to UTF-8 In my ~/.inputrc file, I have the following lines:\n# allow the use of the Home/End keys \u0026quot;\\e[1~\u0026quot;: beginning-of-line \u0026quot;\\e[4~\u0026quot;: end-of-line # allow the use of the Delete/Insert keys \u0026quot;\\e[3~\u0026quot;: delete-char \u0026quot;\\e[2~\u0026quot;: quoted-insert # alternate mappings for \u0026quot;page up\u0026quot; and \u0026quot;page down\u0026quot; to search the history \u0026quot;\\e[5~\u0026quot;: history-search-backward \u0026quot;\\e[6~\u0026quot;: history-search-forward # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving \u0026quot;\\e[1;5C\u0026quot;: forward-word \u0026quot;\\e[1;5D\u0026quot;: backward-word \u0026quot;\\e[5C\u0026quot;: forward-word \u0026quot;\\e[5D\u0026quot;: backward-word \u0026quot;\\e\\e[C\u0026quot;: forward-word \u0026quot;\\e\\e[D\u0026quot;: backward-word In my local ~/.profile:\n# for umlauts, etc... export LC_ALL=\u0026quot;en_US.UTF-8\u0026quot; export LANG=\u0026quot;en_US.UTF-8\u0026quot; And on the remote side\u0026rsquo;s (Ubuntu) ~/.bashrc:\nexport LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 Additionally, I added a ~/.screenrc on my remote host with the following line:\nutf8 on on Now, everything should run fine, even with unicode :)\nBut was that really easy?\nCheers, iss\n","permalink":"https://www.nesono.com/blog/snow_leopard_terminal_settings/","summary":"","title":"Refine (Snow) Leopard Terminal Settings"},{"content":"Today I needed to send a mail to a mailing list, which I joined using an old mail address, which turned into an alias only address a while ago. I hence needed to send a single mail to the list with this old address and did not want to add it as an identity to my mail application - it simply wasn\u0026rsquo;t worth the effort.\nLuckily, it is possible to overwrite the mail headers using the command line mail application under *nix and I simply logged into my server and sent the mail using the following command:\necho \u0026#34;your message text\u0026#34; | mail -a \u0026#34;From: other@domain.com\u0026#34; -s \u0026#34;your subject\u0026#34; dest@xxx.com Nice, isn\u0026rsquo;t it? Cheers, iss\n","permalink":"https://www.nesono.com/blog/change_from_address_mail/","summary":"\u003cp\u003eToday I needed to send a mail to a mailing list, which I joined using an old mail address, which turned into an alias only address a while ago. I hence needed to send a single mail to the list with this old address and did not want to add it as an identity to my mail application - it simply wasn\u0026rsquo;t worth the effort.\u003c/p\u003e\n\u003cp\u003eLuckily, it is possible to overwrite the mail headers using the command line mail application under *nix and I simply logged into my server and sent the mail using the following command:\u003c/p\u003e","title":"Changing the From address field in /usr/bin/mail"},{"content":"Today I fixed my ubuntu 8.10 installation, where above error occured, whenever I wanted to upgrade the system. It occured while upgrading the python2.5-minimal package.\nThe failure originated from the python-setuptools and the following (simple) commands fixed it cleanly:\nsudo dpkg -r python-setuptools sudo apt-get install python-setuptools Cheers, iss\n","permalink":"https://www.nesono.com/blog/pycentral_rtinstall_issue/","summary":"","title":"pycentral rtinstall: package python-setuptools: not overwriting local files"},{"content":"Yesterday I found a site called The Bit Twiddler while searching for an algorithm to calculate the bit population of an int in C. To me, it was quite like breaking a butterfly on the wheel, but it was very interesting and good to know for everybody who needs to twiddle with bits\u0026hellip; But check it out yourself!\nCheers, iss.\n","permalink":"https://www.nesono.com/blog/bit_twiddler/","summary":"\u003cp\u003eYesterday I found a site called \u003ca href=\"http://bits.stephan-brumme.com/\" title=\"The Bit Twiddler\"\u003eThe Bit Twiddler\u003c/a\u003e while searching for an algorithm to calculate the bit population of an \u003ccode\u003eint\u003c/code\u003e in \u003ccode\u003eC\u003c/code\u003e. To me, it was quite like breaking a butterfly on the wheel, but it was very interesting and good to know for everybody who needs to twiddle with bits\u0026hellip; But check it out yourself!\u003c/p\u003e\n\u003cp\u003eCheers, iss.\u003c/p\u003e","title":"Bit Twiddler for Programmers"},{"content":"Some weeks ago, I got a new MacBookPro and installed the new system using my Time Machine backup disk - great feature! After installation, it was the very same system, I was working at before - except for some minor changes (like the MAC address, etc). Anyhow, Time Machine did not want to re-use the old Time Machine backups on my new laptop and hence started a new directory. I left the old directory on my disk, even without being usable at all and today, I found a page, which is coping with a very similar problem and adapted it to my situation.\nThe basic steps are summarized in the following. The Time Machine backup disk is assumed to be called Backup. The hostname is MyMac. The old MAC address is 00:f9:e8:d7:c6:b5 and the new MAC address 00:1a:2b:3c:4f:56.\nStart the Terminal Application\nGet the current MAC address using\nifconfig en0 | grep ether\nGet the old MAC address by using\ncd /Volumes/Backup/Backups.backupdb\nxattr -p com.apple.backupd.BackupMachineAddress MyMac\nDisable Time Machine in System Preferences\nDisable ACL (access control list) using\nsudo fsaclctl -p /Volumes/Backup -d\nMove the old MAC address file to the new MAC address by\nsudo mv .00f9e8d7c6b56 .001a2b3c4f56\nDon\u0026rsquo;t forget to change the MAC addresses to yours.\nWrite new MAC address to backup directory using\nsudo xattr -w com.apple.backupd.BackupMachineAddress 00:1a:2b:3c:4f:56 Backups.backupdb/MyMac\nAgain, don\u0026rsquo;t forget to change the MAC addresse to yours.\nMove newly created backups into old directory, by\nsudo mv MyMac\\ 2/* MyMac/\nThe last command will result in a (harmless) error, which can be ignored. You can now delete the old directory \u0026lsquo;MyMac 2\u0026rsquo; in the Finder.\nRe-enable ACL, using\nsudo fsaclctl -p /Volumes/Backup -e\nEject and unplug the Backup disk\nRe-Plug the Backup disk\nRe-Start Time Machine (and possibly re-enable the Time Machine disk in Time Machine Preferences)\nUnfortunately I have to note, that Time Machine will do a full backup after restarting. I tried to follow the comments on above site, but they all seem to be unrelated or even misleading - sorry.\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/repair_time_machine/","summary":"","title":"Repair Time Machine after Computer Upgrade or Logic Board Fix"},{"content":"Today I stumbled over a problem using Views in Drupal. I had two listing Views - one listing all blogs, the other all posts, which muddled up my whole page:\nThe navigation dropped to the bottom and the content was listed kind of hierarchical, but without following an obvious rule. I searched quite a while - made hundreds of queries to google, without success.\nThe problem was caused by a teaser of a node, which opened a table, but did not close it.\nSo be aware to provide self-contained teasers for each of your drupal posts, as they can mess up the whole page inside a view. You can use the button \u0026ldquo;Split summary at cursor\u0026rdquo; to tell drupal where the teaser should end. And don\u0026rsquo;t forget to close any open tags before that ;)\nCheers, iss\n","permalink":"https://www.nesono.com/blog/broken_drupal_view/","summary":"\u003cp\u003eToday I stumbled over a problem using Views in Drupal. I had two listing Views - one listing all blogs, the other all posts, which muddled up my whole page:\u003c/p\u003e\n\u003cp\u003eThe navigation dropped to the bottom and the content was listed kind of hierarchical, but without following an obvious rule. I searched quite a while - made hundreds of queries to google, without success.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eThe problem was caused by a teaser of a node, which opened a table, but did not close it.\u003c/p\u003e","title":"Broken Drupal View"},{"content":"\nI just saw a video from my old band - made by our singer fludid - which reminded me of good old times with my band mcf. It really makes me kind of melancholic and wistful. It includes so many lovely people we met, we played with, we worked with, so many years of traveling, laughing, crazy stuff and so much fun\u0026hellip;\nCheers to my old friends from Würzburg, these times were splendid!\nNow you can check it out :)\n","permalink":"https://www.nesono.com/blog/good_old_times/","summary":"","title":"The good old times..."},{"content":"Today I was searching for an opportunity to move my existing Time Machine backup disk to a RAID system. I wanted to create a RAID 1 by simply adding another drive to my existing backup drive and restore my old Time Machine data on the RAID, afterwards. The following steps were accomplished with standard Mac OS X™ tools and can be performed for non-RAID systems as well.\nCreate a backup of the old Time Machine disk Start Disk Utility. Click on the old Time Machine backup disk. Click on New Image in the tool bar. Save the (compressed) image on another drive. Create the RAIDdevice Go to the RAID tab. Drag the two disks into the RAID area. Name the RAID, I call it Backup RAID. Click on Create. The new RAID disk will appear on the left (restart Disk Utility). Scan Image Restore Backup Data Go to Restore tab Drag your image to source. Drag Backup RAID to destination. Enable Erase Destination. Click on Restore. Verify Backup RAID This should be it. Cheers,\niss\n","permalink":"https://www.nesono.com/blog/move_time_machine/","summary":"","title":"Move the Time Machine Backup Disk to a RAID 1"},{"content":"In my last blog I made a recall on git, linking to a workflow example, presented by the GNOME guys. After some more days using git, I need to re-update ;)\nStarting with the \u0026ldquo;git svn clone\u0026rdquo; command. This command knows the option -s or \u0026ndash;stdlayout, if an svn repository with a so-called standard layout shall be cloned. The standard layout is the directory structure of the repository or project. E.g. the project test_project needs to have the following structure\ntest_project/ trunk/ tags/ branches/ To clone this project and preserve svn\u0026rsquo;s tags and branches, use the following command\ngit svn clone -s http://svn.example.com/test_project Additionally, after some coding, I needed something like a \u0026lsquo;svn revert\u0026rsquo; and searched for it in git. I found this site, and boom, got the solution :) The following line will reset the changes in your working files.\ngit reset --hard HEAD AND NOT\ngit revert HEAD which would revert your last commit - something not even possible with svn!\nIf you want to reset a single file only, you should use the following command:\ngit checkout -- filename You can leave out the \u0026lsquo;\u0026ndash;\u0026rsquo;. They are just in case you have a file, which has the same name as a command or option of git.\nCheers, iss\n","permalink":"https://www.nesono.com/blog/git_svn_std_layout/","summary":"","title":"git svn with standard layout and how to do a 'svn revert' with git"},{"content":"As noted in a previous blog, I am using git to work remotely on my svn repositories. Hence, I am able to commit changes into a git changeset and apply these changes to the svn repository as soon as I am back online again. Anyhow, git is a bit different from centralized source code management systems - at least for me - and so I found another nice resource in the web, describing a git workflow (of GNOME):\nlive.gnome.org\nIt also uses console colors for the diff\u0026rsquo;s etc. (BTW, I did not need to set LESS=-R on my Mac OS X 10.5)\nCheers, iss\n","permalink":"https://www.nesono.com/blog/recall-on-git/","summary":"","title":"Recall on git"},{"content":"With my switch to University, recently, I had to think about the choice of a network simulation application and received some recommendations about OMNeT++. The first sentence on the website did sound promising:\nOMNeT++ is a public-source, component-based, modular and open-architecture simulation environment with strong GUI support and an embeddable simulation kernel.\nSo I downloaded the source from the download site, followed the hints on this site, which helped me in configuration and compiling and invoked omnetpp in my open Terminal. I wanted to follow the steps taken by the screen cast tutorial. Hence, I imported the sample code from within the samples directory and boom, the problems occur. I want to save you (and possibly the future me) a lot of time and give a step-by-step guide for doing everything right with OMNeT++ on Mac OS X with appropriate annotations for why to do it this way:\nDownload the source code using wget or Firefox. Safari 4.0 beta added another .tar to the end of the file and seems to have crashed the file encoding. I wasn\u0026rsquo;t even able to compile the sample code, which came with OMNeT++. Unpack the code into the destination directory, in which you want to have it installed (I used /opt, you might use /usr/local). OMNeT++ will remember its build path and use it later for the DYLD_LIBRARY_PATH. The sample library queueinglib cannot be build on its own. It depends on the aloha library, which must be imported along with the queueinglib code from your installation directory (e.g. /opt/omnetpp-4.0/samples). The funny thing is, that eclipse still builds the queueinglib - although not all object files are available and it looks like everything is alright, until you want to run the code. You will receive an error like this: class queueinglib:Queue not declared using Define_Module(), ... The rest of the tutorial has some ambiguities, as the time specifying fields now must have an s as a suffix. The remaining .ini file should look like the following lines: [General] network = demo cmdenv-status-frequency = 500s eventlog-file = results/demo-${runnumber}.log record-eventlog = true sim-time-limit = 20000s **.source.interArrivalTime = 0 **.source.numJobs = ${jobs=30,60} **.serviceTime = exponential(${serviceMean=1..3 step 1}s) You should particularly notice the additional \u0026rsquo;s\u0026rsquo; characters at the end of each time specification. Now the simulation should run fine and you should get very similar results as the tutorial :)\nCheers, iss\n","permalink":"https://www.nesono.com/blog/omnet-plusplus-tutorial-osx/","summary":"","title":"OMNeT++ 4.0 Tutorial using queuinglib under Mac OS X"},{"content":"Since I am working in very different environments (office, university, home) which do not always share access, especially towards the source code repositories, I searched for a feasible workflow using a distributed source code management like Mercurial or Git for my local work (on my laptop) and the base subversion repositories from the headquarters. I simply needed more history and would like to be able to commit things into a \u0026rsquo;travel\u0026rsquo; intermediate repository while I am on the road and be able to check in the changes as soon as I have access to the base svn again.\nI started believing that mercurial would be the system of choice, but its communication back to subversion seems to be non-mature at the time of this writing. This webpage makes a nice comparison of the different approaches available for mercurial-svn workflows. Anyhow, the book is very nice and interesting. If I would need to start a new project with my source code management system of choice, I would probably choose mercurial. Especially the built-in MQ extension looks really nice and seems to be very handy for people getting crazy with patches - maintainers maybe? ;)\nAfter my short excursion on mercurial, I checked git yet another time, although I am not a big fan of Torvald\u0026rsquo;s polemic aggressions. Fortunately, it seems to do exactly, what I need - how ironic. As this blog about an git-svn workflow describes:\n# clone the remote svn repository git svn clone https://svn.xxx.com/project localdir cd localdir # some available commands git status git diff git log # to visualize the repository's contents gitk --all # checkout of master and git checkout master # 'rebase' (pull changes from svn) git svn rebase # commit changes git commit -a -m'commit message' file.x git svn dcommit That\u0026rsquo;s it! :) It is essential to commit the change into your local git repo first along with the appropriate commit message. After that, the commits can be forwarded to the base svn repository, which seems to work as a glimpse :)\nCheers,\niss\n","permalink":"https://www.nesono.com/blog/subversion-mercurial-git-oversimplified/","summary":"","title":"Subversion, Mercurial and Git"},{"content":"I recently had to make a Matlab™ subplot and wanted to link the axes of the two plots together, so that both graphs show the same range on their x-axis. Of course, there is a simple command for this in Matlab™: linkaxes. Detailed information about the command can be found on the Web-Documentation. The following code shows, how I did it in my script.\nax(1) = subplot( 4,1,1 ); plot(x) % ... ax(2) = subplot( 4,1,[2:4] ); linkaxes(ax,'x'); plot(u) % ... It seems like, that the basic idea is to get the subplot handles (ax in the example) and connect the axes using linkaxes by specifying the subplot handle vector and the type of linkage (x,y,xy or off). As far as I \u0026rsquo;ve seen, there are many ways to accomplish this task, but the above method seems to be the simplest to me.\nCheers, iss\n","permalink":"https://www.nesono.com/blog/matlab_subplot_connected_axes/","summary":"","title":"Matlab Subplot with linked/connected axes"},{"content":"Some days ago, I needed to write an m-file (Matlab™ Function File), which had to run under Octave as well. If you use full Octave compliant stuff, this works quite easily without modification of your code. But if you use e.g. subplot(\u0026hellip;) with a range to make one plot broader or wider, Octave resigns. Therefore, I put in the following statement and wrote this blog message as a reminder :)\nif exist('OCTAVE_VERSION') figure else subplot( 4,1,[2:4] ) end This runs under both, Matlab™ and Octave. Hope, this helped\u0026hellip;\nCheers, iss\n","permalink":"https://www.nesono.com/blog/matlab_octave_compatible/","summary":"","title":"Write m-files for Matlab and Octave"},{"content":" ","permalink":"https://www.nesono.com/blog/timecode4-sourceforge/","summary":"\u003c!-- raw HTML omitted --\u003e","title":"Timecode 4 now on SourceForge"},{"content":"I need to migrate my local svn repository to sourceforge an therefore checked the web for such experiences once again. Recently, I found this site, which has a neat trick for avoiding all these padding revisions from svndumpfilter. But let\u0026rsquo;s keep it chronological. Here are the steps I took:\nExport the repository with svnadmin: svnadmin dump \u0026amp;gt; svn_export.dmp Filter out the paths I don\u0026rsquo;t need in the new repository and drop empty revisions: cat svn_export.dmp | svndumpfilter --drop-empty-revs --renumber-revs include timecode4 \u0026gt; svn_clean_export.dmp Import the dump\u0026rsquo;ed data into the existing SourceForge repository svnadmin load \u0026lt; svn_clean_export.dmp The two command line options for svndumpfilter basically did the job, which do not seem to be documented well. Anyhow, I already migrated the svn repo once I started nesono.com and therefore, lots of empty padding revisions remained, but now you and I should now better. And use the source for the next time ;)\nThe above technique is the best one, but I had no access to the actual file system on the target server, which you need for svnadmin. I did it that way:\nExport the source using svn export (see also svn help export), which simply exports the source without any svn data and imported the clean directory using svn import. This makes revision 1 the starting point Cheers, admin\n","permalink":"https://www.nesono.com/blog/migrate_svn_repo_sourceforge/","summary":"\u003cp\u003eI need to migrate my local svn repository to sourceforge an therefore checked the web for such experiences once again. Recently, I found this \u003ca href=\"http://whynotwiki.com/How_I_moved_my_code_repository_to_Google_Code\" title=\"moving to Google Code\"\u003esite\u003c/a\u003e, which has a neat trick for avoiding all these padding revisions from svndumpfilter. But let\u0026rsquo;s keep it chronological. Here are the steps I took:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eExport the repository with svnadmin:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esvnadmin dump \u0026amp;gt; svn_export.dmp\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003eFilter out the paths I don\u0026rsquo;t need in the new repository and drop empty revisions:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecat svn_export.dmp | svndumpfilter --drop-empty-revs --renumber-revs include timecode4 \u0026gt; svn_clean_export.dmp\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003eImport the dump\u0026rsquo;ed data into the existing SourceForge repository\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esvnadmin load \u0026lt; svn_clean_export.dmp\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThe two command line options for svndumpfilter basically did the job, which do not seem to be documented well.\nAnyhow, I already migrated the svn repo once I started \u003cem\u003enesono.com\u003c/em\u003e and therefore, lots of empty padding revisions remained, but now you and I should now better.\nAnd use the source for the next time ;)\u003c/p\u003e","title":"Migrating an SVN repository or: SourceForge Acknowledged Timecode4"},{"content":"Today, I applied for a sourceforge project for timecode4. For sure, sourceforge is a much better platform for hosting the source-code and maybe it raises more interest and perhaps some collaborators, too? You can stay informed about the application status here:\ntimecode4\n","permalink":"https://www.nesono.com/blog/timecode_4_sourceforge/","summary":"","title":"Timecode 4 Applying on Sourceforge"},{"content":"For nice usage statistics, I installed webalizer on my ubuntu server machine and enjoyed the nice diagrams after the first run. It was a bit suspicious, that the hits were such heavily increasing and so I decided to take a look on logrotate and furthermore crontab.\nMy server hosting provider seems to install anacron per default on his ubuntu standard installations, don\u0026rsquo;t ask me why. Anyway, this disables standard cron usage. The second problem was, that anacron never has been started for weeks and so no logrotate or any other cronjob was cleanly running - yes, I laughed either, but maybe not as much as you.\nAfter I deinstalled anacron (as it is NOT useful for always up and running machines), the reports in the webalizer html pages were very small, as they only covered one week maximum. I was searching some time for things like \u0026lsquo;webalizer logrotate problem\u0026rsquo; or \u0026lsquo;webalizer multiple log files\u0026rsquo;, etc. in the web. Finally, I found a page, which praised the option \u0026lsquo;-p\u0026rsquo; of webalizer, which enables doing incremental updates of the statistics, without dropping the old stuff, so that it is not harmed logrotate.\nFor rebuilding the reports, I needed to concatenate all log files (in reversed order) into a big one, switch on \u0026lsquo;Incremental\u0026rsquo; in the webalizer configuration file, set the big access.log file as the input file, remove the old data from the output directories and run webalizer with the following command on each config:\nwebalizer -c /etc/webalizer/site-webalizer.conf Now the reports are refreshed and you should see positive feedback from webalizers standard output. After the update, you need to modify the LogFile entry in your site\u0026rsquo;s webalizer config file to the first logrotate\u0026rsquo;d file (e.g. access.log.1), to have all webserver access included in the reports. I hope, that\u0026rsquo;s it and if not, I will update this post\u0026hellip; Cheers!\n","permalink":"https://www.nesono.com/blog/logrotate_webalizer_anacron/","summary":"","title":"Logrotate and Webalizer, Anacron"},{"content":" ","permalink":"https://www.nesono.com/blog/itunes_taglib_patch/","summary":"\u003c!-- raw HTML omitted --\u003e","title":"iTunes Taglib Patch"},{"content":"Today, I found a website, which discussed the feature to make a \u0026lt;ul\u0026gt; (unordered list) based menu right aligned. To me, it was a bit confusing and I was not sure, what style items are necessary to get the work done. Now I can tell: Use the following two style declarations in the ul-section of your cascading style sheet.\ndisplay: table; text-align: right; And that\u0026rsquo;s it :) Of course, you need to make sure, that your surrounding \u0026lt;div\u0026gt; etc. is big enough to be able to right align anything (per default, containers are as small, as their content and therefore would not right align it, as you might expect). And maybe, you can use display: inline in your \u0026lt;li\u0026gt; section\u0026hellip; But thats up to you.\n","permalink":"https://www.nesono.com/blog/ul_menu_right_aligned/","summary":"","title":"\u003cUL\u003e Menu Right Aligned"},{"content":" You can now find a drupal upgrade script on github and for drupal modules installation! Beware that this script was written for my site setup and works for me, maybe not for you, as you have other site setups, etc. I wrote it with respect to other setups though, but will never guarantee that :) If you are reluctant, try drush instead - though drush screwed my page up at least :/\nRecently, I needed to upgrade my drupal installation and was quite surprised by the complexity of a drupal system update. Therefore, I sum up the steps necessary here, to simplify the process next time.\nPut site into maintenance mode (switch to garland?) Backup database (mysql) -\u0026gt; use phpmyadmin (save in dedicated directory) with a template like nesono.com_%Y-%m-%d Unpack drupal in /var/ (will be e.g. in directory /var/drupal-6.11) Copy stuff (check settings.php vs default.settings.php first!) cp /var/www/sites/default/settings.php /var/drupal-6.11/sites/default/ cp -r /var/www/tmp /var/drupal-6.11/ cp -r /var/www/sites/default/files /var/drupal-6.11/sites/default/ cp -r /var/www/sites/all/modules /var/drupal-6.11/sites/all/ cp -r /var/www/sites/all/themes /var/drupal-6.11/sites/all/ cp -r /var/www/sites/all/libraries /var/drupal-6.11/sites/all chown -R www-data:www-data /var/drupal-6.11 stop apache Move the new drupal directory to the document root rm -rf www.bup mv www www.bup mv drupal-6.11 /var/www Run update.php within document root start apache http://www.nesono.com/update.php Put site back online (deactivate maintenance mode again) As a shortcut for steps 5 to 7.1, you can copy \u0026amp; paste the following line into your terminal:\n/etc/init.d/apache2 stop \u0026amp;\u0026amp; rm -rf www.bup \u0026amp;\u0026amp; mv www www.bup \u0026amp;\u0026amp; mv drupal-6.11 www \u0026amp;\u0026amp; /etc/init.d/apache2 start And boom! That\u0026rsquo;s it.\nCheers, iss\n","permalink":"https://www.nesono.com/blog/drupal-updates/","summary":"","title":"Drupal Updates"}]