Quite some time ago I started noticing that the mouse in dosbox was starting to “jump” occasionally. But since I don’t get to play games quite often I ignored and filed it under “possibly driver issues”.
Das Thema Datensicherung (Backup) ist ein großes und jeder, der sich ernsthafter mit Computertechnik beschäftigt, sollte damit Berührung gehabt haben. Im Guten wie im Schlechten. ;-)
In dieser kleinen Anleitung möchte ich kurz beschreiben wie man mit wenig Aufwand in die Lage versetzt wird die Snapshots von ZFS zu nutzen, um verschlüsselte Sicherungen auf eine externe Festplatte zu ziehen.
It is possible to simply edit the source files but some configuration and plugins will make your workflow way more productive. This includes using projects like ENSIME, SBT and several plugins for neovim.
If you’re upgrading your FreeBSD installation to 11.2-RELEASE please ensure that you disable custom kernel modules first. The usual suspects are the nvidia driver and the virtualbox kernel module.
In some cases you may need the sources (kernel source) for your FreeBSD installation. However if you did not select the source package in the installer it will not be installed.
If you work with sbt (or activator) and want to restrict the resolvers to the ones that you choose then you might get frustrated that overriding the
resolvers setting does not suffice.
If you ever need to change the author of a commit (or several) within a git repository, you can use the following script:
If you’re using the fabulous wartremover to keep your code cleaner and are using akka too then you might have stumpled upon the following warning from wartremover:
If you upgrade cups on your FreeBSD installation or maybe you install some foomatic packages this may lead to the removal of the
cups-filters package. In some cases this package is needed for your printer to work correctly.
The prompt of
lftp can be configured in the config file via the
set prompt directive. A while ago I found a prompt on the internet but
forgot where, here it is:
The start menu of Windows 10 displays some stuff from the internet by default. If you find this annoying like me then feel free to follow this guide to fix that.
If you want to delete a remote git branch then you can do so using the following command.
Nach einer neuerlichen Umstellung des Onlinebankings hatte ich nach über einem Jahrzehnt reibungslosen Ablaufs Probleme die HBCI-Verbindung neu einzurichten.
Es stellte sich heraus, daß man entgegen der Empfehlung der Bank sowohl den Benutzernamen als auch die Kundennummer angeben mußte. Letztere mußte dabei einem bestimmten Format genügen (siehe unten):
A simple shell script that jumps into a given directory (or a default one) and updates all git repos in there. Additionally it checks if an upstream remote exists. If that is the case it fetches the upstream changes.
From time to time you have to update your SSL keys and certificates. In some cases you may have a mixed infrastructure e.g. “normal” http servers and tomcat or other java based servers. In the latter case you’ll have to import your shiny new certificate and key into your java keystore.
After upgrading my chrome port on FreeBSD 9.3 I got the following error message when I tried to start chrome:
I needed not to chain promises but to resolve a whole bunch of them together. The documentation was sparse so it took me a while to stumble upon the solution (Ember.RSVP.all). In case you need something like that here it is.
If you try to install the nokogiri gem on freebsd you may get the following error message:
If you spin up a 32bit guest system within vagrant using the virtualbox provider, setting the number of cpus is not enough. Meaning that the following won’t do:
If you’re on a java project then you’ll very likely use maven.
Outdated dependencies can simply be shown via the following command:
If you’re not using gnome or xfce but have some gtk apps installed then you could always set your theme preferences via
~/.gtkrc-2.0 like this:
cd - command git also has a shortcut to checkout the last branch.
git checkout - switches to the last checked out branch.
Since some time you probably noticed ugly deprecation warning made by mocha if using rspec and rails. Usually they look like this:
To prevent the log files of a rails application to grow without limit you should setup log rotation. There are several ways to do this. Here is a simple solution using
Sometimes you have to rebuild ports due to a library update. But if there are vulnerabilities known for that ports then
make will bail out with an error message and refuse to build the port. Instead it gives you the advice to update or deinstall the port which is good advice but sometimes just not possible.
If you are using lighttpd to host several php applications via virtual hosts and are using the newrelic php monitoring service then you’ll have noticed that setting the php application name per virtual host does not seem possible at first.
You can move the rails session secret to an environment variable by
config/initializers/secret_token.rb like this:
If you’re running a non web app on the github api you can simply get the auth token for it (if you have configured in your account under applications of course) by running the following curl command.
If you encounter an
too many open files exception you usually edit
/etc/security/limits.conf and increase the value.
But on Ubuntu (10.04 LTS at least) this is ignored!
To mount an iso image under FreeBSD just follow these steps.
If you are not able to get access to a sugarcrm installation you can reset the admin password directly via the sql interface.
Actually you should never do that!
Since some time it seems to be somewhat impossible to install the ruby-debug gem into your rails app. The error message will most likely look similar to this one:
When using Linux it is often helpful to use the following command if an application crashes:
When testing has_and_belongs_to_many models using rspec and factory girl you should setup your factory the following way:
If you run MySQL you probably use the innodb storage engine because it provides a number of advantages over MyIsam.
The official documentation recommends giving 50-80% of your ram to
innodb_buffer_pool_size which can easily go above 10 gb because ram is
The same documentation recommends settings
innodb_log_file_size to 25% of
innodb_buffer_pool_size meaning this can easily be 2 or more gb.
If you are using heroku you probably ran into some issues with
rake assets:precompile. When using active admin
bringing it’s assets into your app can also be quite tricky.
The method of precompiling your assets yourself and adding them to your git repository works for sure but it isn’t really best practice.
Another way to get the needed assets to be compiled is as follows:
Sometimes you’ll want or have to split a git repository into two. This is usually a sign of not thinking forward enough but hey sh.. happens. If your repository is structured in a way that you just need a subdirectory of it into a new repository you can follow the steps below.
If you are using lighttpd as webserver and
host drupal websites you probably have used
some lua script and mod_magnet to get clean urls.
Recent versions of lighttpd (1.4.26+) are able to handle rewrites better
The config for your [virtual] server should look like this:
Usage and configuration instructions for JSTestDriver are available on their website. For integration with TeamCity you’ll have to write an ant build file. But to be able to run browsers on your build agent machine you’ll have to use Xvfb. The test task in your ant file should look like the one below:
Sometimes you’ll want to remove all ruby gems from your system. This is very easy (at least under unix like operating systems). Just issue the following command:
If you want to implement custom scheduler functions for SugarCRM you should create the file
custom/modules/Schedulers/_AddJobsHere.php and implement your functions there:
The zsh contains a very usefull extension called zmv. You can load it via
autoload -U zmv. The man page is located under zshcontrib. A very usefull flag is
-n which does not execute the command but prints the command that would be executed. Use this if you are unsure about your patterns.