Sometime you need or want to move a commit or several of them between different git branches. One possible scenario would involve a created feature branch which runs a bit longer and multiple important fixes have been made on it. Some might argue that this shouldn’t happen but guess what: this happens all the time. ;-)
For some time now the usage of metals for
Scala development is no longer a choice for the brave but could be
considered the “should be default” variant. However the installation for the
neovim plugins has changed from using
coursier bootstrap to something
supposed to be easier. But at least under FreeBSD I ran into some issues.
So here is a workaround to get a clean installation.
Some days ago I ran my regular
pkg upgrade command under FreeBSD and lost
my input devices under X11 (Xorg). :-(
However with help from several people we were able to find a fix for it.
Bereits vor einiger Zeit wurde die Gruppe LambdaHRO von mir mitgegründet. Wir versuchen uns jeweils den zweiten Donnerstag im Monat ab 18:00 Uhr zu treffen.
Die Gruppe LambdaHRO (λHRO) wurde gegründet mit dem Ziel den Austausch zu den Themen Softwareentwicklung und Informatik mit Fokus auf die funktionale Programmierung zu ermöglichen.
Schaut auf der oben verlinkten Webseite vorbei, auf der wir regelmäßig die Termine veröffentlichen.
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”.
Unser Buch “Come out and Play” über Webentwicklung mit Scala, Scala.js, Akka und dem Play Framework ist fertig.
Die finale Version kann bei LeanPub: https://leanpub.com/comeoutandplay erworben werden. Alternativ auch bei Thalia: https://www.thalia.de/shop/home/artikeldetails/ID151410922.html oder Amazon: https://www.amazon.de/dp/B09317XB5J und anderen.
Mit diesem Buch erfolgt ein praxisorientierter Einstieg in die Entwicklung größerer Webanwendungen mit dem Play Framwork, Scala, Akka und Scala.js.
Was lange währt, wird endlich gut - so sagt man jedenfalls. ;-)
Heute haben wir die erste Version unseres Buches “Come out and Play” veröffentlicht: https://leanpub.com/comeoutandplay. Alternativ via Thalia: https://www.thalia.de/shop/home/artikeldetails/ID151410922.html oder Amazon: https://www.amazon.de/dp/B09317XB5J zu haben. Es handelt sich um ein Fachbuch über Webentwicklung mit Scala, Scala.js sowie dem Play Framework und Akka.
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 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.
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:
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.