Planeta Blogów WMI UAM

June 23, 2025

Borkowski Marcin

2025-06-23 Making functions interactive

I have to admit that I probably have a bit of OCD, and when I finish my work, I like to put my Emacs in a sort of “clean slate” state. By that I don’t mean closing it or killing all buffers (although when I leave the office, I do kill all work-related buffers). Instead, I mean going back to displaying just one window with the *GNU Emacs* buffer (the one with the logo and links to the tutorial etc.) The problem is, I sometimes accidentally kill that buffer, and then I have no place to go back to;-).

Well, some time ago it occurred to me that something in Emacs must create that buffer, and I can find that something and learn how to do that whenever I want. Grepping for a few words on that splash screen I quickly found the fancy-startup-screen function which does exactly that. I was a bit surprised that it is not an interactive function (IOW, a command), but – as I learned several years ago – this is easy to fix:

;; warning: this does not work!
(put 'fancy-startup-screen 'interactive-form '(interactive))

Sadly, the interactive-form symbol property no longer works. As Stefan Monnier pointed out in that thread, there is another (perhaps cleaner) way to make a non-interactive function into a command:

(advice-add 'fancy-startup-screen
            :before
            (lambda () (interactive) nil))

This method is a bit more verbose, but is clean, the intent is obvious and – last but not least – it works. What else could you want?

CategoryEnglish, CategoryBlog, CategoryEmacs

June 23, 2025 07:00 AM

June 14, 2025

Borkowski Marcin

2025-06-14 Automatically converting timestamps in Emacs

This is a third post in a short series of posts about code which helps me deal with numerical timestamps in Emacs. Last time I wrote a function which decides if a number is a Unix timestamp or a JavaScript Date and converts it to a human-readable ISO-8601 timestamp. What would be even more useful is to see the ISO representation of the timestamp at point without even doing anything. Emacs already has support for showing stuff related to the thing at point in the modeline – ElDoc. Several years ago I had some thoughts about using the ElDoc machinery to do something for me, but I found it too complicated then.

Well, either they modified ElDoc to make it easier to program, or I matured as a programmer, or both. It turned out that it took me about 15 minutes to come up with a working prototype, which is extremely cool!

One way to use ElDoc in your own Elisp code is to write a function which accepts a single argument callback, decides if whatever is at point “deserves” printing something in the echo area, and if yes, call the callback with suitable arguments. This function is next added to eldoc-documentation-functions. (Check its docstring to learn the exact syntax of the callback I mentioned above.) Let’s use the code from the previous post and add the following.

(defun timestamp-conversion-eldoc-function (callback)
  "An ElDoc-compatible wrapper around `number-to-iso-8601'."
  (when-let* ((number-at-point (thing-at-point 'number))
              (timestamp (number-to-iso-8601 number-at-point)))
    (funcall callback (cdr timestamp)
             :thing (car timestamp)
             :face 'font-lock-keyword-face)))

(define-minor-mode eldoc-timestamp-conversion-mode
  "Toggle ElDoc Timestamp Conversion mode.
When enabled, this mode causes numbers at point to be displayed as
timestamps in the echo area using ElDoc (which must be enabled, too).
Numbers greater than `maximum-unix-timestamp-for-conversion' are treated
as JavaScript `Date's and the rest as Unix timestamps (seconds since
1970-01-01)."
  :init-value nil
  (if eldoc-timestamp-conversion-mode
      (add-hook 'eldoc-documentation-functions
                #'timestamp-conversion-eldoc-function
                nil t)
    (remove-hook 'eldoc-documentation-functions
                 #'timestamp-conversion-eldoc-function
                 t)))

As you can see, I made a somewhat controversial decision to not have a lighter for this mode – my modeline is very crowded and I really don’t need even more noise there. I use diminish for that, but recently Emacs got a new feature which might make it obsolete for me.

That’s it for today! I’m now going to think what other uses for ElDoc I could have…

CategoryEnglish, CategoryBlog, CategoryEmacs

June 14, 2025 02:00 PM

June 07, 2025

Borkowski Marcin

2025-06-07 Promisified setTimeout

For quite a few years, when I needed my Node.js scripts to wait for some time, I used this promisified version of setTimeout:

const sleep = milliseconds =>
        new Promise(resolve => setTimeout(resolve, milliseconds))

Having that function, I can now say await sleep(1000) to make my script wait a second.

Of course, I could also use util.promisify for that:

import {promisify} from 'util'
const sleep = promisify(setTimeout)

which is a bit shorter and has a very similar effect.

Recently, however, I learned that there is an even shorter way of defining an equivalent sleep function:

import {setTimeout as sleep} from 'node:timers/promises'

and that’s it! Go check the docs (linked above) to learn about built-in promisified version of setInterval and a few other utilities in the timers/promises module.

CategoryEnglish, CategoryBlog, CategoryJavaScript

June 07, 2025 06:00 PM

May 31, 2025

Borkowski Marcin

2025-05-31 Converting integers to ISO-8601 timestamps

Two weeks ago I wrote about using defcustom​’s :get and :set keywords, allowing the user to set an option containing a Unix timestamp (that is, a number) using an ISO-8601 timestamp. Today I am going to use such an option.

One of the most problematic things in IT is dealing with time in various aspects. Code whose behavior is time-dependent is often hard to write, test and debug. Timezones and DST are a complete mess. The topic of this post – different representations of time — is not the most difficult problem, but it’s still annoying. While I more or less learned to parse (I mean with my eyes, not in code) the American format of date (M/D/Y), I personally use ISO-8601 (YYYY-MM-DD) even though it’s not the the one in use here in Poland (where DD.MM.YYYY is the most widespread). However, Unix timestamps (as the number of seconds since the “Unix epoch”, that is, 1970-01-01) or JavaScript Date​s (as the number of seconds since the same epoch) still defeat my skills. (Note: it is perhaps more correct to say ECMAScript than JavaScript, but come on – who actually says “ECMAScript”?) I can usually guess that an integer represents a timestamp (from the number of digits and the fact that it begins with 17 for current-ish times), I have no idea whether it’s in the past or in the future, not to mention which day (or even year, for that matter) it is.

Of course, the places I most often see timestamps in are the terminal and Emacs, and of course moving stuff from the former to the latter (or even using Emacs as a terminal) is easy to do. So, why not write some Elisp to help me convert the Unix or JS integer timestamps to a more human-friendly representation?

(defun unix-to-iso-8601 (unix-time &optional time-zone)
  "Convert Unix time to ISO-8601."
  (format-time-string "%FT%T%:z" (seconds-to-time unix-time) time-zone))

(defun jsdate-to-iso-8601 (jsdate &optional time-zone)
  "Convert Unix time to ISO-8601."
  (format-time-string "%FT%T%:z" (seconds-to-time (/ jsdate 1000.0)) time-zone))

Note that by default these functions return the local time, but setting time-zone to t will yield UTC (see the reference for other possible values of time-zone).

Let’s make this even better. How about making Emacs recognize whether a number is a Unix time or a JS Date? I will use he fact that most dates we actually see are more or less near to the current date – for example, 1747884031473 is the time I am writing this as JavaScript Date.now(), and treating it as a Unix time yields 57358-03-29T08:04:33+02 – not a date very probable to be used unless you are a Doctor Who fan. On the other hand, treating 1747884031 as JavaScript Date gives 1970-01-21T06:31:24+01:00 – very close to the Unix epoch (obviously) and supposedly mostly interesting for historians.

So, why not have some “threshold” and treat all numbers higher than it as JS dates, and the rest as Unix timestamps?

(require 'iso8601)
(defcustom maximum-unix-timestamp-for-conversion "2038-01-19T03:14:07Z"
  "Threshold for differentiating between Unix time and JS time.
Integers representing Unix times after this timestamp are treated as JS
times, that is, milliseconds from 1970-01-01."
  :type '(string
          :match (lambda (widget val)
                   (iso8601-valid-p val)))
  :set (lambda (sym val)
         (set sym (float-time (encode-time (decoded-time-set-defaults
                                            (iso8601-parse val))))))
  :get (lambda (sym)
         (format-time-string "%FT%T%:::z"
                             (seconds-to-time (symbol-value sym)))))

(It seemed natural to use 2³¹-1 as the cutoff point, but YMMV.)

Now it only remains to use the defined option.

(defun number-to-iso-8601 (number)
  "Convert NUMBER to ISO-8601.
Treat it as Unix timestamp if less than
`maximum-unix-timestamp-for-conversion' and as JavaScript Date
otherwise."
  (if (< number maximum-unix-timestamp-for-conversion)
      (cons 'unix (unix-to-iso-8601 number))
    (cons 'javascript (jsdate-to-iso-8601 number))))

(defun show-number-at-point-as-timestamp ()
  "Echo the number at point as an ISO-8601 timestamp."
  (interactive)
  (when-let* ((number-at-point (thing-at-point 'number))
              (timestamp (number-to-iso-8601 number-at-point)))
    (message "%s: %s" (car timestamp) (cdr timestamp))))

From now on, I can invoke this command when the point is on a number and see the correct timestamp in the ISO-8601 format for both Unix timestamps and JavaScript Date​s.

CategoryEnglish, CategoryBlog, CategoryEmacs

May 31, 2025 07:00 PM

May 26, 2025

Borkowski Marcin

2025-05-26 Adding directories to EMMS playlist from Dired

Like many of us Emacsers, I do much (if not most) my computering in Emacs. This includes using EMMS as my main media player and Dired as my file manager.

One thing I find myself doing pretty often is adding a bunch of subdirectories in my ~/music directory to my EMMS playlist. I usually used emms-add-directory-tree, but it is not really smooth if I want to apply it to many subdirectories. I thought, “there must be a function which adds the current item – or the marked items – to the playlist”. Lo and behold, I found emms-add-dired, which does exactly that.

Now the issue I have with this command is that it is not bound to any key in Dired mode. That’s fair enough – not everyone uses EMMS – but I’d really prefer to have it on some key. The question is, what key do I bind it to? I don’t want to use RET (and lose dired-open-file) – I still want to be able to enter these directories (they are sometimes nested, so I may want first to get into a directory and then emms-add-dired on some of its subdirectories, for example).

One key binding which seems quite natural is E, normally bound to dired-do-open. By default, it opens the marked files in an external program. While EMMS is hardly an “external program”, my mind associates E with things like “play” (that’s what it does with video files), so I’m going to (slightly) abuse the semantic of dired-do-open and make it add my music directories to the EMMS playlist.

The trouble is, however, that dired-do-open does not support anything like this – it basically opens the marked file(s) with xdg-open (at least on GNU/Linux). But this is Emacs, so I can do whatever I want (and whatever works for me)! I could even rebind E to something completely else. Fortunately, I don’t even have to – I can just advise dired-do-open.

(defcustom dired-emms-music-directory "~/music"
  "The path to the directory with music.")

(defun dired-do-add-to-emms-playlist (dired-do-open &rest args)
  "Add FILES to the EMMS playlist if suitable."
  (if (file-in-directory-p default-directory
                           dired-emms-music-directory)
      (emms-add-dired)
    (apply dired-do-open args)))

(advice-add 'dired-do-open
            :around
            #'dired-do-add-to-emms-playlist)

This code is a bit simplistic – the way it knows whether to call emms-add-dired or dired-do-open is by checking if the current directory is a subdirectory of dired-emms-music-directory, so it can break in a Dired buffer with several directories. Still, calling it with both music directories and some other type of files marked is a rather contrived scenario, so I don’t really care that much.

Of course, there is another way of achieving my goal – creating a shell script calling emacsclient with a snippet of Elisp adding its argument to the playlist, and registering it with xdg-mime. That could work, but it’s faster (and also much more fun) to just use Elisp!

That’s it for today, happy listening to music!

CategoryEnglish, CategoryBlog, CategoryEmacs

May 26, 2025 05:00 PM

May 19, 2025

Borkowski Marcin

2025-05-19 Customization variables which require some computation after being set

Today I’d like to learn – and then show – how to define a user option in Emacs so that setting it will trigger evaluating some Elisp code. Here is my use-case. I want the option to be a timestamp. The most convenient way to store it is as Unix time (number of seconds since the epoch), since the code using it will perform comparisons between that timestamp and other times. On the other hand, the most convenient way to set it is as ISO-8601 timestamp, which is inifinitely more human-readable than the Unix time.

It turns out that reading the relevant portion of the manual is not an easy task. I think I get the main idea, but I’m still not sure I understand the difference between :set and :initialize very well, and the fact that the manual says “You have to really understand the workings of Custom to use ‘:get’ correctly” scares me a bit. My first thought was to use :set to convert the ISO-8601 timestamp to Unix time, and :get to convert back, but I’m not sure if this is “using :get correctly”. Well, I asked on the Emacs mailing list, and soon got an answer from Eli himself. I have to admit that I still do not understand everything here, but at least I feel a bit more confident now that :initialize is not what I need here.

So, here is my code. It turned out that the hard portion is actually parsing ISO-8601. Who would have guessed;-)? Emacs has an in-built library for that, but it lacks a function to just parse a string like 2025-05-09 into a proper Elisp time object. The iso8601-parse does almost that, but instead of filling the missing data (the hour, minute and second) with zeroes, it uses nils. That sort of makes sense, but then encode-time does not like it at all. Good thing is that Elisp has another function which does exactly what I need here, that is, turns those nils into zeros – decoded-time-set-defaults.

(require 'iso8601)
(defcustom timestamp-user-option "1970-01-01T00:00+00"
  "An example of a timestamp user option.
This is stored as a number but set in Customize as ISO-8601 string."
  :type '(string
          :match (lambda (widget val)
                   (iso8601-valid-p val)))
  :set (lambda (sym val)
         (set sym (float-time (encode-time (decoded-time-set-defaults
                                            (iso8601-parse val))))))
  :get (lambda (sym)
         (format-time-string "%FT%T%:::z"
                             (seconds-to-time (symbol-value sym)))))

Now you can use customize-option to set this to (for example) 2025-05-19, and the real value of the variable will be 1747605600.0 (at least in my timezone).

One little disadvantage is that when you enter the Customize UI again, you’ll see the full ISO-8601 timestamp, that is, 2025-05-19T00:00:00+02 (again, in my timezone). This could be remedied by changing this variable into a structure (maybe a plist, maybe an alist, maybe an object) and store both the actual timestamp entered by the user and the result of the conversion to a number, but I don’t think it’s worth the hassle, since then you wouldn’t be able to treat this variable as a number – you’d have to use plist-get or some other accessor function. Another idea could be to use timestamp-user-option to store the exact string the user typed and some other variable, say timestamp-user-option-internal to store its numerical representation. This would probably work, but I think it’s even worse, since then both variables can get out of sync with a setq or something.

Anyway, that’s it for today – but expect a follow-up, where we will actually use a user option like this, in the near future!

CategoryEnglish, CategoryBlog, CategoryEmacs

May 19, 2025 06:00 PM

May 12, 2025

Borkowski Marcin

2025-05-12 Coloring Git output in Magit

Today I have a very short and rather niche tip, but maybe someone will find it useful (as I did). Like many other people, I use Magit on a daily basis. One thing that bothered me a bit was the fact that when I pressed $ to see the output of the Git process, all colors were gone. This was a problem for me, since the pre-commit hook I use calls the TypeScript compiler to tell me about any potential problems with types in my code. By default, the output of tsc is colored with the ANSI color codes. While the coloring can be turned out, the setting to do that is rather crude (it also disables pretty-printing/formatting), and after all, these colors serve a purpose and are genuinely useful. I decided that before I turn the formatting off, it may be a good idea to check if Magit has an option to allow coloring the Git output using ANSI codes.

Well, the answer is yes and no. Indeed, there is a variable which does exactly that, but it is not a user option (that is, it is defined with defvar and not defcustom), and it is not even documented (that is, it has no docstring!). Still, it seems that it does its job, so from now I have

(setq magit-process-finish-apply-ansi-colors t)

in my init file.

I suppose that the reason it is not advertised may have something to do with performance issues. It is known that coloring with ANSI codes comes with a performance hit. For example, here is the docstring of the magit-log-color-graph-limit option:
Number of commits over which log graphs are not colored. When showing more commits than specified, then the ‘--color’ argument is silently dropped. This is necessary because the ‘ansi-color’ library, which is used to turn control sequences into faces, is just too slow.

So if you want to turn magit-process-finish-apply-ansi-colors on, be aware that it might slow down Magit. So far, I haven’t experienced that, but I’ve been only using it for a few days now, so we’ll have to see.

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryGit

May 12, 2025 07:00 AM

May 05, 2025

Borkowski Marcin

2025-05-05 A simple budgeting app for Ledger

Some time ago I mentioned having built a very simple web app to help me with budgeting with Ledger. Let me share it with you right now. It is extremely simple – the whole app resides in just one index.js file which has less than 150 lines of code, and over half of it is boilerplate code or code related to authentication (which is very simplistic anyway).

The code is not something I would be especially proud of, but it doesn’t matter - it is but a simple hack put together in a few hours. It would probably be better to use the csv or xml export of Ledger instead of trying to parse the default format. Part of the config file is the list of Ledger command-line parameters, some of which (like --flat) are essential for the app to even work. This is a terrible practice in “serious software”, since it means that putting legit-looking (but unexpected by the code) things in the config might break the app. It uses the execFileSync function to run Ledger. This is another terrible practice, since it is a blocking function. This means that my app would most probably scale very poorly – Ledger is fast, but might not be fast enough. On the other hand, I knew that this app would be used by two users (possibly twice as much assuming it survives long enough for my kids to grow up and use it on a regular basis). Not “two users simultaneously”, mind you – two users altogether. Hence I decided – in a true situated software approach – that it’s not worth it to deal with any unnecessary complications, and execFileSync is just simpler than dealing with callbacks or promises (even with async/await).

The most important question you could ask, however, is why not use Ledger’s budgeting capabilities? Well, even though I spent some time learning how to use them, I still find them a bit cryptic. More importantly, I wanted something a bit more fancy than what Ledger seems to offer. For each expense account included in my budget, I wanted my app to tell me more than just whether I’m still within the budget or not. For some categories of expenses, it is good to have “two” limits – a “soft” one (which my app calls “safe”) and a hard one. If I spend more than the soft limit, the bar for this category is shown in yellow; if I spend more than the hard limit, the bar is shown in red, which is a nice way of visualizing categories which are still within limits, but which should be treated with more care, so to speak.

Some categories, however, are treated in a yet another special way. There are things you spend money on once per month, like internet bills. For these categories showing the budget and the expenses so far is fine. Many categories, however, are things I spend money on every day (or almost every day), like food. For these ones (denoted in the config by the safe: 'linear' option) the “soft limit” is just the fraction of the “hard” limit corresponding to the fraction of the month that passed to this point. This way I can set a budget for food and see if I’m within the budget every single day, which I find tremendously useful.

As I said, the app is very simplistic. For example, it always shows the budget for today – there is no way to see the budget for any other day (or month, for that matter). I might change it in the future, so that it could show for example the budget for the past month (or maybe even, say, current year) – but for now, it is perfectly enough for me.

Ah, did I mention? The app is in Polish, and all the strings are hardcoded in the view files. Sorry for that if you don’t speak Polish…

Edit: added the link to the app repo.

CategoryEnglish, CategoryBlog, CategoryJavaScript

May 05, 2025 08:00 PM

April 28, 2025

Borkowski Marcin

2025-04-28 Improving my Emacs-Jira integration

Almost three years ago I wrote about a very simple Emacs-Jira integration I have been using since then. As is often the case, I noticed some inconveniences with it, and decided to improve it.

Here is my problem: it’s difficult for me to remember about marking tasks as “done” in Org-mode. I change the status in Jira (since this is what the team expects and needs), but it’s usually not “done”, but “in code review” – when I finish a task, I submit it for review, and it is not “done” yet then. On the other hand, I don’t always even mark my tasks as “done” – in our workflow, this is often done by someone else (the person who deployed the code to production, which might or might not be me).

Of course, having over 700 tasks in the “todo” state is not very nice. My Org-mode file related to my job is pretty large (over 3 MB), and Org-mode can be a bit slow with large files. What I’d like to do is to archive done tasks (that is, move them to another file which is not normally used or manipulated, so it can be really large and it won’t bother me).

Obviously, the first step to achieve that is to mark done tasks as “done”. I don’t want to map all statuses we have in Jira to Org-mode statuses – after all, it’s Jira, not Org which is the “single source of truth” about the status of our tasks, and the reason I use Org-mode for them is not to keep their state, but to be able to clock them and to store personal notes (as opposed to Jira comments which I use for things the team should know about).

So, let’s use jira-terminal again. I can get the status of the task with jira-terminal detail -f status <task number>. The drawback is that jira-terminal prepends the word Status: to its output (which doesn’t make much sense), but that can be remedied very easily with a bit of Elisp.

(defun jira-key-to-status (key)
  "Return the status of Jira task KEY."
  (when key
    (trim-trailing-whitespace
     (with-temp-buffer
       (unless
           (zerop
            (call-process "jira-terminal" nil t nil
                          "detail" "-f" "status" key))
         (error "Could not retrieve task data from Jira"))
       (goto-char (point-min))
       (search-forward "Status: ")
       (buffer-substring-no-properties (point) (point-max))))))

Note how I support the case where key is nil – as we will see, it may happen that this function will be called on a headline with no Jira task key, and I want it to silently do nothing then instead of throwing an error.

Now that we have the Jira status of the task, let’s convert it to Org status. I don’t want to get too fancy here and just map all statuses we have in Jira to TODO and DONE.

(defconst jira-statuses
  '(("Todo" . "TODO")
    ("Blocked" . "TODO")
    ("Done" . "DONE"))
  "Alist of Jira statuses and their Org counterparts.")

(In reality, we have twice as many, but that is irrelevant here.)

Now, getting the Org-compatible status of a Jira task is easy.

(defun jira-key-to-org-status (key)
  "Return the Org status of Jira task KEY."
  (when key
    (let ((jira-status (jira-key-to-status key)))
      (or (alist-get jira-status
                     jira-statuses
                     nil nil
                     #'string=)
          (error "Jira status \"%s\" not found in `jira-statuses'" jira-status)))))

Again, I added (when key ...) to this function, since otherwise it could complain that nil is not a valid Jira status – not what I want. On the other hand, if the status is non-nil and not known to jira-statuses, I explicitly want to be notified that I need to add it there, hence the error.

The next step is updating the status of the task at point.

(defun jira-update-org-task-at-point ()
  "Update the status of the task at point according to Jira."
  (interactive)
  (unless (org-at-heading-p)
    (error "Not at a heading"))
  (let* ((from-state (org-get-todo-state))
         (heading (org-get-heading t t t t))
         (key (when (string-match
                     "\\([A-Z]\\)+-\\([0-9]\\)+"
                     heading)
                (match-string 0 heading)))
         (to-state (jira-key-to-org-status key)))
    (unless (or (null from-state)
                (null to-state)
                (string= from-state to-state))
      (org-todo to-state)
      (org-add-log-note))))

Here again I take care to check for possible error conditions. First of all, for this function to work, the point needs to be on an Org heading. This is actually a bit debatable. On the one hand, when calling jira-update-task-at-point interactively on a large Org entry with a lot of notes, it might happen that the status is not even visible on the screen. Updating something without a clear visual indication does not seem a good idea, and if I bind jira-update-org-task-at-point to some key I could press by accident, this could happen. On the other hand, it seems safe to assume that if the task is marked “Done” on Jira, updating it as DONE in Org is fine even if the user does not see/notice that. Still, I decided to be on the safe side.

The next thing here is that the status is only updated if both from-state and to-state are non-nil and not equal. If from-state is nil, it means that the current headline does not even have a TODO status, so it probably does not correspond to a Jira task. (All my headlines which do correspond to Jira tasks have a TODO status.) If to-state is nil, it means that the Jira task could not be found – this may happen for example if there is no task key (string of the form LT-1337) in the headline. If both from-state and to-state are non-nil, we compare them and if they are equal, we don’t do anything, and we update the Org TODO state otherwise.

Finally, I run org-add-log-note. The reason I want to do this is that this is how Org mode puts a note saying that the state was changed from TODO to DONE when configured to do so. This is one of the darker corners of Org mode: without this invocation, the note was stored, too, but if I ran jira-update-org-task-at-point in a loop (I’ll show how in a minute), only the last task had the note. The reason is clear – there is some hackery involving post-command-hook here. I would very much prefer if there was some argument to org-todo telling Emacs to add a note about the state change, but it is what it is. Note: I’m not complaining too much, Org mode is a very complicated piece of software and it’s quite probable that the complexity is there for a reason – but it would be much simpler if org-todo could insert that note itself.

Now the next thing I want to do is to update all TODO tasks in my Org file automatically. What I want to do is to iterate over all not-DONE headlines and run jira-update-org-task-at-point on them. Of course, the go-to solution when you want to iterate over headlines in an Org file is org-map-entries:

(org-map-entries #'jira-update-org-task-at-point "TODO<>*\"DONE\"" nil 'archive 'comment)

As you can see, I skip headlines which have no TODO state (that’s what the star does); I also skip archived and commented out subtrees. Of course, I don’t want to run this manually, so let’s make it into a command.

(defun jira-update-all-todos ()
  "Update the status of all tasks in the region or buffer."
  (interactive)
  (save-restriction
    (when (region-active-p)
      (narrow-to-region (region-beginning) (region-end)))
    (let ((inhibit-message t)
          (message-log-max nil))
      (org-map-entries #'jira-update-org-task-at-point "TODO<>*\"DONE\"" nil 'archive 'comment))))

Since I don’t want to see the “Note stored” message repeated as many times as many headline states were updated, I suppress both displaying it in the echo area and in the **Messages** buffer.

And that’s it for today! As usual, Emacs (and Org mode) turn out to be ideal for users like me who like to mould them into exactly what they need.

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryOrgMode

April 28, 2025 07:00 PM

January 08, 2015

Hromada Mateusz

Warka 9 – American India Pale Ale

Zasyp:

  • pale ale 4kg
  • pszeniczny 0,8kg
  • carapils 0,5kg

Zacieranie w 18l wody, słód dodany w 55°C:

  • 68°C – 65 minut przerwy (po 30 minutach podgrzanie z 65°C do 68°C)

Po filtracji i wysładzaniu wyszło 21,5 litra brzeczki o BLG 11,1.

Chmielenie:

  • 60 minut – 40g Simcoe
  • 20 minut – 30g Simcoe
  • 5 minut – 30g Simcoe
  • 0 minut – 30g Amarillo
  • dry hopping – 30g Simcoe (6 dni), 30g Simcoe (3 dni)

Po schłodzeniu i filtracji wyszło 19 litrów o BLG 16.

Fermentacja (drożdże US-05):

  • 11 dni burzliwej
  • 23 dni cichej

Do refermentacji użyłem 140g cukru i 735g wody.

ABV: ok. 6.2%

by ruanda at January 08, 2015 09:38 PM

Warka 8 – Cydr

Składniki:

  • sok jabłkowy Riviva 22l

Sok ma BLG 12.

Fermentacja (drożdże US-05):

  • 7 dni burzliwej
  • 38 dni cichej

Do refermentacji użyłem 155g cukru i 1135g wody.

ABV: ok. 6.3%

by ruanda at January 08, 2015 09:34 PM

Warka 7 – American Wheat

Zasyp:

  • pszeniczny 2kg
  • pilzneński 2kg

Zacieranie w 16l wody, słód dodany w 45°C:

  • 45°C – 15 minut przerwy
  • 53°C – 15 minut przerwy
  • 68°C – 75 minut przerwy (po 30 minutach podgrzanie z 64°C do 70°C)

Po filtracji i wysładzaniu wyszło 21 litry brzeczki o BLG 7.

Chmielenie:

  • 60 minut – 10g Chinook
  • 20 minut – 20g Palisade
  • 5 minut – 20g Cascade
  • 0 minut – 20g Amarillo
  • dry hopping – 30g Amarillo, 10g Cascade, 10g Palisade

Po schłodzeniu i filtracji wyszło 18 litrów o BLG 12.

Fermentacja (drożdże US-05):

  • 8 dni burzliwej
  • 35 dni cichej

Do refermentacji użyłem 120g cukru i 880g wody.

ABV: ok. 5.5%

by ruanda at January 08, 2015 09:28 PM

November 11, 2014

Girl, lost in IT

Nowy wpis, nowe miejsce

W poprzednim wpisie uprzedzałam, że muszę wprowadzić duże zmiany. Nie jestem już w stanie pisać każdego tekstu w dwóch językach. Dodatkowo czuję, że zmieniłam się przez ostatnie kilka lat – czuję, że „wyrosłam” trochę z tego bloga. Właśnie napisałam pierwszy tekst w nowym miejscu. Blog nazywa się Na miękko - serdecznie zapraszam.

by ynka at November 11, 2014 09:02 PM

October 13, 2014

Krzysztof Szarzyński

Zawieszenie publikacji

Jeśli dobrze liczę, to od 402 dni nic tu nie napisałem. Ponieważ zazwyczaj nie mam niczego interesującego do powiedzenie/napisania, dlatego przerzuciłem się na inne platformy, które lepiej pasują do “beztekstowej” formuły. Nadal robię zdjęcia – więcej niż kiedyś, ale publikuje je w mniejszych porcjach. Zapraszam na mój profil 500px, gdzie wrzucam rożne zdjęcia z całego […]

by Quati at October 13, 2014 06:41 PM

June 12, 2014

Hromada Mateusz

Warka 6 – Żytni Stout

Zasyp:

  • pale ale 2kg
  • żytni 2kg
  • żytni czekoladowy 0,25kg
  • Carafa typ III special 0,25kg

Zacieranie w 16l wody, słód dodany w 55°C:

  • 55°C – 10 minut przerwy
  • 70°C – 60 minut przerwy (po 60 minutach podgrzanie z 62°C do 68°C)
  • 68°C – dodanie ciemnych słodów, 40 minut przerwy

Po filtracji i wysładzaniu wyszło 20,5 litra brzeczki.

Chmielenie:

  • 60 minut – 10g Tomahawk
  • 15 minut – 30g Tomahawk
  • 5 minut – 30g Tomahawk
  • dry hopping – 30g Tomahawk

Po schłodzeniu i filtracji wyszło 18 litrów o BLG 13.

Fermentacja (drożdże S-04):

  • 22 dni burzliwej

Do refermentacji użyłem 125g cukru i 835g wody.

ABV: ok. 4,4%

by ruanda at June 12, 2014 08:38 PM

April 27, 2014

Girl, lost in IT

W planie zmiany + jak tu trafiłam (w obrazkach)

Kolega wyraził ostatnio zaniepokojenie działaniem swojego czytnika RSS. To przecież niemożliwe, żebym tak długo nie napisała nic na swoim blogu! Niestety, możliwe. Do tego powód jest dość absurdalny: piszę mniej, ponieważ piszę więcej. Naprawdę. Pamiętacie, jak przeżywałam swoje 10000. urodziny? Postanowiłam wtedy na poważnie wziąć się za rzeczy, o których zawsze myślałam, że zrobię je […]

by ynka at April 27, 2014 06:28 AM

March 22, 2014

Hromada Mateusz

Warka 5 – Imperial India Pale Ale

Zasyp:

  • pale ale 5kg
  • wiedeński 1kg
  • carapils 0,5kg
  • pszeniczny 0,2kg

Zacieranie w 21l wody, słód dodany w 55°C:

  • 55°C – 10 minut przerwy
  • 65°C – 90 minut przerwy (po 60 minutach podgrzanie z 61°C do 65°C)

Po filtracji i wysładzaniu wyszło 23 litry brzeczki o BLG 14.

Chmielenie:

  • 60 minut – 40g Chinook
  • 10 minut – 20g Citra, 20g Simcoe
  • 5 minut – 30g Citra, 30g Simcoe
  • 0 minut – 15g Cascade, 15g Palisade
  • dry hopping – 15g Cascade, 15g Palisade

Po schłodzeniu i filtracji wyszło 21 litrów o BLG 17.

Fermentacja (drożdże US-05):

  • 9 dni burzliwej
  • 10 dni cichej

Do refermentacji użyłem 130g cukru i 630g wody.

ABV: ok. 7,6%

by ruanda at March 22, 2014 07:44 PM

March 12, 2014

Hromada Mateusz

Warka 4 – American Wheat

Zasyp:

  • pszeniczny 2kg
  • pilzneński 2kg

Zacieranie w 15l wody, słód dodany w 55°C:

  • 55°C – 10 minut przerwy
  • 68°C – 70 minut przerwy (po 50 minutach podgrzanie z 62°C do 67°C)

Po filtracji i wysładzaniu wyszło 21 litry brzeczki o BLG 9,5.

Chmielenie:

  • 60 minut – 10g Chinook
  • 20 minut – 20g Palisade
  • 5 minut – 20g Cascade
  • 0 minut – 20g Amarillo
  • dry hopping – 30g Amarillo

Po schłodzeniu i filtracji wyszło 18 litrów o BLG 13.

Fermentacja (drożdże US-05):

  • 8 dni burzliwej
  • 11 dni cichej

Do refermentacji użyłem 120g cukru i 800g wody.

ABV: ok. 5.3%

by ruanda at March 12, 2014 06:14 PM

February 23, 2014

Girl, lost in IT

Oddam za darmo!

Raz na jakiś czas znajduję w domu coś, co dawno już przestało mi być potrzebne, ale co mogłoby jeszcze przydać się komuś innemu. Niektóre takie rzeczy wystawiam na Allegro (zwłaszcza, jeśli są warte więcej niż kilkadziesiąt złotych), jednak do Allegro często zniechęca mnie konieczność oszacowania kosztów przesyłki. Jeśli chcę pozbyć się czegoś szybko, tanio i […]

by ynka at February 23, 2014 05:23 PM

February 15, 2014

Hromada Mateusz

Instalacja Raspbian przez debootstrap

IMG_20140214_203617

Wymagania

Potrzebny jest Linux, w miarę świeży debootstrap i qemu-arm-static. Oczywiście potrzebny też jest dostęp do użytkownika root.

Partycjonowanie i formatowanie karty SD

Kartę należy podzielić na dwie partycje. Pierwsza, sformatowana w FAT będzie zamontowana jako /boot. Druga partycja będzie zamontowana jako /, można ją sformatować np. w ext4:

root@lol:/mnt# fdisk /dev/sdh
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1021, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1021, default 1021): +64M

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (10-1021, default 10):
Using default value 10
Last cylinder, +cylinders or +size{K,M,G} (10-1021, default 1021):
Using default value 1021

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
root@lol:/mnt# mkfs.vfat /dev/sdh1
[...]
root@lol:/mnt# mkfs.ext4 /dev/sdh2
[...]
root@lol:/mnt# mkdir rpi
root@lol:/mnt# mount /dev/sdh2 rpi/
root@lol:/mnt# mkdir rpi/boot
root@lol:/mnt# mount /dev/sdh1 rpi/boot/

Instalacja i konfiguracja

Debootstrap należy przeprowadzić w dwóch etapach, gdyż binarki przeznaczone są na inną architekturę.

root@lol:/mnt# debootstrap --foreign --arch armhf wheezy rpi/ http://archive.raspbian.org/raspbian
[...]
root@lol:/mnt# cp /usr/bin/qemu-arm-static rpi/usr/bin/
root@lol:/mnt# LANG=C chroot rpi/ /debootstrap/debootstrap --second-stage

Następnie można chrootować się na budowany system:

root@lol:/mnt# LANG=C chroot rpi/ /bin/bash

Potrzebne są repozytoria w sources.list:

deb http://archive.raspbian.org/raspbian wheezy main contrib non-free
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free

W pliku /boot/cmdline.txt należy dodać parametry do kernela:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

/etc/fstab:

proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 0

Różne sieciowe ustawienia są w plikach /etc/hostname, /etc/resolv.conf i /etc/network/interfaces.

W chroocie należy doinstalować paczki git, binutils i ca-certificates.

Potrzebne jest narzędzie rpi-update:

root@lol:/# wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
root@lol:/# chmod +x /usr/bin/rpi-update
root@lol:/# mkdir /lib/modules
root@lol:/# rpi-update
[...]

Aby dostać się do RPi po restarcie potrzebne jest ssh i hasło na roota:

root@lol:/# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@lol:/# apt-get install ssh
[...]

Po wyjściu z chroota, odmontowaniu obu filesystemów i przełożeniu karty do RPi powinien zabootwać się Raspbian dostępny przez ssh:

root@trololo:~# uname -a
Linux trololo 3.10.30+ #640 PREEMPT Fri Feb 14 19:09:14 GMT 2014 armv6l GNU/Linux

Linki

by ruanda at February 15, 2014 01:20 PM

February 02, 2014

Hromada Mateusz

Warka 3 – American Stout

Zasyp:

  • pilzneński 3kg
  • monachijski 1kg
  • jęczmień palony 0,3kg
  • barwiący 0,2kg

Zacieranie w 15l wody, słód dodany w 55°C:

  • 55°C – 10 minut przerwy
  • 68°C – 70 minut przerwy (po 35 minutach podgrzanie z 64°C do 66°C)
  • 66°C – dodanie ciemnych słodów i 15 minut przerwy

Po filtracji i wysładzaniu wyszło 22 litry brzeczki o BLG 11.

Chmielenie:

  • 60 minut – 15g Centennial
  • 15 minut – 15g Centennial
  • 5 minut – 15g Centennial
  • 0 minut – 25g Centennial
  • dry hopping – 30g Centennial

Po schłodzeniu i filtracji wyszło 19,5 litra o BLG 15. Dodałem 1,5l wody.

Fermentacja (drożdże S-04):

  • 8 dni burzliwej
  • 12 dni cichej

Do refermentacji użyłem 140g cukru i 860g wody.

by ruanda at February 02, 2014 09:54 PM

Girl, lost in IT

10000* lat

Parę (naście) dni temu skończyłam 32 lata. Ta magiczna liczba nie doskwiera mi za bardzo i nie ona jest bezpośrednią przyczyną powstania tego tekstu. Do rozmyślań skłoniły mnie życzenia, które składano mi z tej okazji. Kilkoro (młodszych) znajomych, niezależnie od siebie, obdarowało mnie życzeniami brzmiącymi mniej więcej tak: „Wszystkiego najlepszego. Żebyś miała wspaniały rok. I […]

by ynka at February 02, 2014 06:17 PM

January 27, 2014

Hromada Mateusz

Warka 2 – American Pale Ale

Zasyp:

  • pilzneński 2,5kg
  • monachijski 1,3kg
  • karmelowy jasny 0,2kg

Zacieranie w 12l wody, słód dodany w 55°C:

  • 55°C – 10 minut przerwy
  • 69°C – 60 minut przerwy (z podgrzaniem w 40 minucie)

Po filtracji i wysładzaniu BLG 10.

Chmielenie:

  • 60 minut – 15g Simcoe
  • 15 minut – 15g Simcoe
  • 5 minut – 15g Simcoe
  • 0 minut – 25g Simcoe
  • dry hopping – 30g Simcoe

Po schłodzeniu i filtracji wyszło 16,5 litra o BLG 13.

Fermentacja (drożdże US-05):

  • 8 dni burzliwej
  • 10 dni cichej

Do refermentacji użyłem 110g cukru i 740g wody.

ABV: ok. 5%

by ruanda at January 27, 2014 06:25 PM

January 26, 2014

Hromada Mateusz

Warka 1 – American India Pale Ale

Pierwszą warkę uwarzyłem z przygotowanego zestawu surowców.

Zasyp:

  • pale ale 5,5kg
  • Cara Gold 0,5kg
  • pszeniczny 0,2kg

Zacieranie w 18l wody, słód dodany w 55°C:

  • 55°C – 10 minut
  • 69°C – 60 minut (bez podgrzewania, końcowa 62°C)
  • 76°C – mashout

Po filtracji i wysładzaniu wyszło 23 litry brzeczki o BLG 15.

Chmielenie:

  • 60 minut – 25g Warrior
  • 20 minut – 20g Simcoe
  • 10 minut – 10g Amarillo
  • 5 minut – 10g Amarillo
  • dry hopping – 30g Amarillo

Po schłodzeniu i filtracji wyszło 20,5 litra o BLG 17.

Fermentacja (drożdże US-05):

  • 10 dni burzliwej
  • 11 dni fermentacji cichej

Do refermentacji użyłem 135g cukru i 660g wody.

ABV: ok. 7%.

by ruanda at January 26, 2014 07:03 PM

December 15, 2013

Girl, lost in IT

O zmianie (pracy)

Kilka dni temu kolega z poprzedniej pracy spytał, czy przeniosłam blog w nowe miejsce – nie napisałam prawie nic od czasu, gdy zmieniłam pracę. Babcia przy każdym spotkaniu pyta, czy „korporacja” zdążyła już przeżuć mnie i wypluć. Odpowiem krótko: nie i nie! To prawda, że w ciągu ostatnich kilku miesięcy nie napisałam zbyt wiele. Miało […]

by ynka at December 15, 2013 07:46 PM

September 08, 2013

Krzysztof Szarzyński

Warszawa 2013 – Quati w stolicy.

Zanim zaproszę na ostatnią odsłonę zdjęć z mojego krótkiego pobytu w Warszawie, chwila luźnych wywodów. Nocowałem w hotelu przy placu Konstytucji, który oferował dwa rodzaje pokoi: ciche i z widokiem na miasto. Mi się trafiło oglądanie miasta, ale ponieważ ze mną na szkolenie przyjechało kilka innych osób z Poznania, to zdecydowaliśmy się z Adamem iść […]

by Quati at September 08, 2013 06:19 PM

September 04, 2013

Krzysztof Szarzyński

Warszawa 2013 – część druga

Dziś druga porcja obrazków z Warszawy. Hasłem przewodnim miało być “ludzie w Warszawie”, ale chyba troszkę bardziej pasuje “życie w Warszawie”. Chyba nigdy nie byłem dobry w nadawaniu tytułów i nazw. 🙂 Część trzecia zostanie opatrzona moimi przemyśleniami i komentarzem co do samego miasta. Zdjęcia również będą bardziej dotyczyć tego co widziałem i przeżyłem 🙂

by Quati at September 04, 2013 05:27 PM

September 01, 2013

Krzysztof Szarzyński

Warszawa 2013 – część pierwsza

W tym roku wakacje były podzielone na dwie cześći. Najpierw pojechaliśmy z Olą do Zwierzyńca, gdzie odpoczywaliśmy aktywnie zwiedzając Zamojszczyznę i korzystając z dobrodziejstwa krętych rzek i kajaków turystycznych. Ciągle czekam na chwilę weny żeby wybrać kilka zdjęć i je opublikować 🙂  Drugim etapem moich wakacji było… skończenie życia jako student i rozpoczęcie “dorosłości” w […]

by Quati at September 01, 2013 08:07 PM

Girl, lost in IT

Cicho sza!

Wcale nie zarzuciłam pisania tego bloga. Krótko o tym, co ostatnio dzieje się u mnie: Kupiliśmy dom. Trwa remont. Kompletnie nie doszacowałam nakładów czasowych (o finansowych nie będziemy tu rozmawiać) niezbędnych do realizacji takiego przedsięwzięcia. Tłumaczę książkę o C++ i Qt (Dlaczego? Patrz wyżej). Jest gruba. Zamiast tłumaczyć, spędzam godziny na rozmowach z fachowcami. Pół […]

by ynka at September 01, 2013 07:36 PM

July 13, 2013

Girl, lost in IT

Open’er, czyli wieczne poszukiwania

Heineken Open’er to co roku ta sama historia. Wiele tygodni przed festiwalem niecierpliwie zaczynam śledzić lineup i planować, co będę chciała zobaczyć. Bliżej terminu okazuje się, że z pięciu wymarzonych koncertów dwa odbywają się naraz, a trzy inne jeden po drugim – na scenach oddalonych od siebie o kilometr. Planuję także, z kim pojadę i […]

by ynka at July 13, 2013 08:00 AM

June 26, 2013

Krzysztof Szarzyński

Nowe zabawki i noc kupały

Obiecanki – cacanki. Czyli tradycyjnie, jak Quati mówi, że coś napisze, to znaczy, że mówi. 🙂 Dziś mam kilka zdjęć zrobionych za pomocą nowej zabawki, która oprócz tego, że jest świetnym gadżetem, to spełnia też czasami funkcję obiektywu. Otóż moim nabytkiem jest Sigma 50 mm F1.4 DG EX HSM, czyli typowa portretowa “stałka” z dość jasnym […]

by Quati at June 26, 2013 09:43 PM

May 30, 2013

Girl, lost in IT

Feminiści kontra statystyka

Uczestniczyłam ostatnio w konferencji, w której programie znalazł się panel dyskusyjny poświęcony mniejszościom w środowisku informatyków. Podczas panelu miałam okazję porozmawiać z inspirującymi i pełnymi dobrej woli ludźmi, jednak doszło tam również do pewnego zderzenia opinii, które wspominam do tej pory. Był sobie facet. Doświadczony lider, blogger, walczący o zwiększenie liczby kobiet w IT. Osoba, […]

by ynka at May 30, 2013 04:54 PM

April 20, 2013

Girl, lost in IT

Kup swojemu dziecku sobie robota Lego Mindstorms

Pierwszy raz klocki Lego widziałam, będąc małym dzieckiem, nie pamiętam nawet, czy było to Peweksie, „u prywaciarza”, czy może u kolegi, którego tata był kapitanem na statku handlowym, przez co w ich domu zawsze można było trafić na skarby niedostępne w normalnych sklepach (począwszy od mandarynek). Pamiętam, że zachwyciły mnie czyste kolory, przemyślane projekty oraz możliwości, jakie […]

by ynka at April 20, 2013 04:05 PM

March 16, 2013

Girl, lost in IT

Na słodko-gorzko o skutkach asertywności

Minęło już półtora miesiąca od kiedy zmieniłam pracę. Czas… biegnie szybko. Decyzja ciągle wydaje się dobra. Uczę się bardzo dużo. W trakcie ostatnich tygodni dwa razy odwiedziłam Warszawę, po raz pierwszy spróbowałam koreańskiej kuchni (z wyjątkiem zupy kimchi w Art Sushi, którą polecam, ale tylko ludziom o żołądkach ze stali), a także zapisałam się na […]

by ynka at March 16, 2013 12:37 PM

February 24, 2012

Dopierała Andrzej

2011-05-27 Darmowe fotoradary dla nissan connect

Może kogoś zainteresuje - nie znalazłem nigdzie opisu jak to łatwo zrobić “za friko”.

1. Ściągamy listę fotoradarów z http://ump.waw.pl/ plik z mapą fotoradarów (http://ump.waw.pl/update/Jacek.zip).
2. Rozkompresowujemy go
3. Łączymy to co nas interesuje do jednego pliku csv:

undefine@uml:~/tmp$ cat Kontrole\ Drogowe/*.csv Niebezpieczne\ Miejsca/*.csv Przejazdy\ Kolejowe/*.csv >x.csv
undefine@uml:~/tmp$ 

4. Usuwamy polskie znaczki (zapewne można jakoś przekodować, ale nie chciało mi się metodą prób i błędów szukać kodowania):

iconv -f cp1250 -t ascii//TRANSLIT  < x.csv > jacek.csv

5. Plik jacek.csv umieszczamy w katalogu myPOIs/myPOIWarnings na pendrive
6. Pendrive wkładamy do nissan connect i ładujemy POI użytkownika z menu(Setup → Navigation → Download my POIs)
7. Przestrzegamy ograniczeń ;)

February 24, 2012 08:24 AM

December 23, 2011

Dopierała Andrzej

2011-12-23 Ankieta Polskiego Badania Czytelnictwa: Przyszła do mnie prośba o wypełnienie ankiety. Z Polskiego Badania Czytelnictwa, sp. z o.o. Niby nic dziwnego, ale.. przyszła "smailem". A sama ankieta, po podaniu "pinu" z listu do wypełnienia na stronie http://www.ankieta.pbc.pl/ W zamian za wypełnienie ankiety oferują m.in. kupony sodexo na kwotę 20zł. I w sumie... Podszedłem do tematu trochę z mieszanymi uczuciami. Jak? Skąd? Po co? Z tego co znalazłem dane osobowe otrzymali z bazy PESEL na podstawie Dz.U. 2006 nr 139 poz. 993, 44h ust 2 par 2. List - był zaadresowany do mnie (imię, nazwisko, adres). Natomiast w samej ankiecie na stronie zwrot był przez "Pani". Pomyłka? Koniec końców zmarnowałem kwadrans i wypełniłem. Co prawda niezbyt wartościowo, bo z proponowanych czasopism to tylko sporadycznie Metro przeglądam jak akurat mi w korku wcisną, natomiast Fantastyki w ankiecie nie było, ale - jak to badanie statystyczne, to.. czemu nie.

Przyszła do mnie prośba o wypełnienie ankiety.
Z Polskiego Badania Czytelnictwa, sp. z o.o.

Niby nic dziwnego, ale.. przyszła “smailem”. A sama ankieta, po podaniu “pinu” z listu do wypełnienia na stronie http://www.ankieta.pbc.pl/

W zamian za wypełnienie ankiety oferują m.in. kupony sodexo na kwotę 20zł.

I w sumie… Podszedłem do tematu trochę z mieszanymi uczuciami. Jak? Skąd? Po co? Z tego co znalazłem dane osobowe otrzymali z bazy PESEL na podstawie Dz.U. 2006 nr 139 poz. 993, 44h ust 2 par 2.

List - był zaadresowany do mnie (imię, nazwisko, adres). Natomiast w samej ankiecie na stronie zwrot był przez “Pani”. Pomyłka?

Koniec końców zmarnowałem kwadrans i wypełniłem. Co prawda niezbyt wartościowo, bo z proponowanych czasopism to tylko sporadycznie Metro przeglądam jak akurat mi w korku wcisną, natomiast Fantastyki w ankiecie nie było, ale - jak to badanie statystyczne, to.. czemu nie.

December 23, 2011 09:04 PM

November 07, 2011

Dopierała Andrzej

2011-11-07 brother mfc5490CN: drukarka brother mfc 5490cn pod linuksem i.. ipv6.

Stara drukareczka HP 6540 się popsuła (uchwyt od czarnego tuszu przestał kontaktować), naprawa oczywiście nieopłacalna, a mi by się w domu przydał skaner, wiec… Nabyłem nową drukareczkę. Po przejrzeniu dostępnych opcji wybór padł na Brother MFC 5490CN
I - jak na razie nie mam co narzekać.
Drukowanie spod linuksa - ruszyło praktycznie od razu.
Skanowanie spod linuksa - również. Mimo iż po raz pierwszy w życiu konfigurowałem skaner pod linuksem.

A na dokładkę - drukarka działa również po ipv6…

Local> show ip v6

IPv6 is Enabled
IPv6 Static Address is Enabled
IPv6 Addresses are 2A02:848:A::XXXX:XXXX:XXXX:XXXX/64 (via Router)
                   FE80::XXXX:XXXX:XXXX:XXXX/64 (link-local)

The priority IP version of name resolving is IPv4

Będę musiał chyba firewalla wyklikać dla ipv6 :/

November 07, 2011 10:56 PM

September 09, 2011

Ogrodowczyk Wojciech

Koniec tej zabawy

Jak co bystrzejsi czytelnicy mogli zauważyć, nie pisuję już tu praktycznie nic, a zdjęcia tu umieszczane to jedynie opóźnione „przedruki” względem mojego konta na flickr. Kierując się więc brzytwą Okhama i zwykłym lenistwem...

September 09, 2011 08:12 AM

August 22, 2011

Dopierała Andrzej

2011-08-22 Lekko przerobiony multi router looking glass w php: Skrypt do przedstawiania na routerach.

Już kilka osób się mnie pytało jak zrobiłem http://lg.maverick.com.pl/.

Bazuję na lekko zmodyfikowanej wersji MRLG (Multi Router Looking Glass for PHP). Obecnie jego strona niestety nie działa - i oryginału nie mam do pobrania.

Moją zmodyfikowaną wersję umieściłem na mrlg-20091215.tgz, natomiast plik konfiguracyjny do niej na mrlg-config.php. Na pytania nie odpowiadam, w konfiguracji nie pomagam (bo nie mam czasu) - ale może komuś się przyda :).
Licencja - zgodnie z licencja oryginału - GPL.

Ale jak masz jakieś poprawki - podsyłaj :)

Wiem że brzydko zrobione, ale - było potrzebne na szybko i w parę godzin tylko na tyle mnie było stać.

Jak dodasz w swojej sieci kopię - zgłoś na traceroute.org - widoczność swojego miejsca w sieci się często przydaje :).

August 22, 2011 07:55 PM

August 21, 2011

Ogrodowczyk Wojciech

August 11, 2011

Ogrodowczyk Wojciech

August 05, 2011

Dopierała Andrzej

2011-08-05 Problematyczne ipv6 - dziwny resolver: problem z domenami z dodanym rekordem AAAA.

undefine@uml:~$ host aramin.net
aramin.net has address 42.1.94.0
;; Warning: Message parser reports malformed message packet.
;; connection timed out; no servers could be reached

i tak dla sporej części, o ile nie wszystkich adresów z dualstackiem - taki dziwny feature AP DSL-G604T w hotelu.

Do tej pory myślałem że dodanie rekordu AAAA nic nie psuje, teraz - sam się przekonałem że nie jest tak różowo, jak sie okazało że nie mogę się dostać na strony/serwery z dodanym AAAA. Na szczęście - można skorzystać z własnych albo googlowych dnsów.

Oczywiście prawidłowa odpowiedź to

undefine@uml:~$ host aramin.net
aramin.net has address 195.110.48.48
aramin.net has IPv6 address 2a01:5e00:2:52::30
aramin.net mail is handled by 0 mx.aramin.net.

August 05, 2011 04:55 PM

July 29, 2011

Ogrodowczyk Wojciech

July 27, 2011

Ogrodowczyk Wojciech

July 21, 2011

Ogrodowczyk Wojciech

July 14, 2011

Ogrodowczyk Wojciech

June 26, 2011

Dopierała Andrzej

2011-06-26 IPv6 na stronie: ipv6 na stronie

Co prawda po IPv6 day, ale.. wreszcie dołożyłem AAAA do mojej strony(i stron firmowych). Ciekawe co wybuchnie ;)

June 26, 2011 07:24 PM

June 17, 2011

Ogrodowczyk Wojciech

May 31, 2011

Ogrodowczyk Wojciech

Planet shot

Bcn planet shot

Eksperymentale ujęcie wychodka na szczycie świata, krok po...

May 31, 2011 11:44 AM

May 29, 2011

Ogrodowczyk Wojciech

March 12, 2011

Dopierała Andrzej

2011-03-12 IPv6-garsc-statystyk: kilka słów podsumowania o ruchu ipv6

Kilka statystyk z pewnego routerka. Zbierane ip6tables, w dłuższym okresie czasu. Wykresów nie daję, bo za mała próbka by ładnie wyglądało ;)

Dane z pewnej sieci osiedlowej w Poznaniu. IPv6 udostępnione klientom przez radvd. Głównie klienci “prywatni”.

Wejście:
2% - 6to4
pomijalne - PIX
24% - PLIX
3% - natywne IPv6 od Crowleya
69% - tunel z HE

Wyjście:
51% - 6to4(!)
6% - PIX
36% - PLIX
1% - Crowley
6% - tunel z HE.

Wnioski:
- podobnie jak w przypadku ipv4 duża część ruchu przypada na PLIX
- upload to głównie ruch kierowany do 6to4 - jak sądzę ruch p2p.
- bardzo duży download na tunelu z HE. Co prawda miałem trochę wątpliwości czy należy się w to bawić - to jednak obserwując ruch przy włączonym i przy wyłączonym tunelu widać że opóźnienia przez HE są często niższe. Pozatym - alternatywa to pchanie ruchu przez Crowleya, który.. również sporą część ruchu ma przez HE. HAWE jak na razie ipv6 nie dostarcza.

March 12, 2011 11:49 PM

February 22, 2011

Dopierała Andrzej

2011-02-22 IPv6 a 6to4: ipv6 6to4 sit0 routing ruch siec

Powolutku bawię się w wdrożenie IPv6 u pewnego ISP.

Na peeringach (w PIX i PLIX) ipv6 śmiga “natywnie”. Świata niestety jak na razie nikt nie dostarczył, więc leci tunelem z HE.

Do tego rozgłoszenie prefiksów do kilku testowych sieci - i troszkę ruchu widać.

W którymś momencie zauważyłem, że trochę ruchu leci do 6to4. Postawiłem więc bezpośredniego relaya(opis z http://wiki.debian.org/DebianIPv6) i…

mav-ipv6

Wniosek? Wbrew pozorom bardzo dużo (tak na oko 1/3) ruchu to ruch z relayami 6to4. Stąd zapewnienie dobrej komunikacji z nimi powinno być dosyć istotne przy udostępnianiu ipv6. Do testowego ip z którym obserwowałem ruch po ustawieniu bezpośredniego tunelowania 6to4 na moim routerze opóźnienia spadły z ok 80 do 50ms - a ruch wzrósł o kilkanaście procent.

(na wykresie jest widoczny wyłącznie ruch na tunelach - peeringi/polska leci natywnie, stąd nie mam prostej możliwości wyróżnienia go od ipv4)

February 22, 2011 11:06 PM

February 17, 2011

Dopierała Andrzej

2011-02-17 Rozkład ruchu na łączach: rozkład ruchu plix hawe tp pix

Taka mała ciekawostka.

Jest sobie mały operator. Świadczący głównie usługę dostępu do internetu dla “ludzi”. Pakiety - dosyć duże, po kilka/kilkadziesiąt megabitów, upload ciut mniejszy - po 2-3 megabity.
Ogólnie - zazwyczaj mało kto dociera do limitu w którąkolwiek ze stron.

Do tego jest troszkę hostingu i łącz biznesowych… Ale większośc to klienci indywidualni.

Łącza:
- peering w PIX-ie (http://www.pix.net.pl)
- peering w PLIX-ie (http://www.plix.pl)
- PBT HAWE (http://www.pbthawe.eu)
- Transmisję CDP Global od crowleya (http://www.crowley.pl)

i w którymś momencie na parę chwil pojawiła się testowa transmisja do TPSA - normalnie leci przez HAWE (i dalej styk z crowleyem).

Ruch - puszczony przez bgp prawie “samopas”. Lekkie preferencje by sterować ruchem na łączach zagranicznych (hawe/cdp), gdzieniegdzie unikanie problematycznych ścieżek - ale - można powiedzieć że rozkład jest prawie naturalny.

I teraz - procentowy wykres ruchu:
rozklad-lacz

Interesuje nas głównie download - uploadu jest niewiele - ok połowy downloadu, więc zazwyczaj mieści się w ramach kontraktu.

Co jest ciekawe… ok 30% ruchu zamyka się w plixie. Nawet trochę więcej.

PIX - jest malutki. poniżej 3% ruchu. Gdyby nie skala oraz fakt że jest prawie za darmo - nie było by go sensu trzymać.

HAWE i crowley - utrzymują się mniej więcej na zbliżonym poziomie - przerzucanie to głównie zmiany na ich upstreamach oraz “rzucanie” nimi (prepend przez community) by przerzucić na łącze gdzie dalej od kontraktu.

Przez jakiś czas była testowana tpsa. I tutaj niespodzianka - download był ledwo w okolicach 5% sumarycznego ruchu. Czyli - biorąc pod uwagę cenę - malutko. Z koleji upload to ok 20% ruchu - co w tej sytuacji oznaczało że było to jedyne łącze gdzie upload przekraczał download! I przypominam że to nie hosting, tylko głównie klienci indywidualni. Cóż - P2P rządzi.

February 17, 2011 11:59 AM

January 06, 2011

Dopierała Andrzej

2011-01-06 Konto w aliorbank: zakładanie konta w aliorbanku cz.1

Stwierdziłem że w mojej małej firemce przyda się kolejne konto. Obecne mam w mBanku, bo.. wiadomo - za darmo. No - prawie. 1zł za każdy przelew “na zewnątrz” - to już trochę w miesiącu wychodzi.

A Aliorbank ciągle kusi darmowym kontem, 5-cioma darmowymi przelewami w miesiącu i “premią” 50zł przy stanie konta 9k. Czyli więcej niż na lokacie w mbanku.

Z nowym rokiem - próbuję więc założyć konto.
Pierwsze wrażenia po przebrnięciu przez formularz?

  • Nie pozwala mi na wpisywanie polskich znaczków. Przeglądarka chrome. Po wklejeniu tekstu z polskimi znaczkami - ogonki znikają.
  • Do wybrania klasyfikacja usług… Ja w GUS-ie mam zgłoszoną 6202Z(działalność związana z doradztwem w zakresie informatyki - wg klasyfikacji z 2007 roku). A na stronie pozwalają na wybór pomiędzy.. 6201 a 6203.

Ale przebrnąłem - polskie znaczki jak sądzę poprawią mi w oddziale. O efektach pewnie poinformuję…

January 06, 2011 08:40 PM

October 16, 2010

Nawrot Andrzej

Rozmowy ze specjalistą ds. wdrożeń

Taki kwiatek.
Pytanie dotyczące odpowiedzialności za wykonywanie backupów pewnego systemu i odpowiedź konsultanta.

IT: Kto wykonuje backupy?

Specjalista:Backupy wykonuje MS SQL z automatu codziennie, raz na okres np. miesiąc kwartał baza powinna być nagrywana na trwały nośnik i to w zależności od firmy albo my albo dział IT
Danych nie powinniśmy stracić żadnych tylko w przypadku kataklizmu kiedy to stracimy serwer oraz kopie dyskowe – pozostaną nam tylko kopie na trwałych nośnikach, ale to sytuacje bardzo sporadyczna
Kopie na serwerze służą przede wszystkim do ewentualnych porównań w przypadku uszkodzenia – stąd codzienne kopie .

by jendras (noreply@blogger.com) at October 16, 2010 08:34 PM

June 08, 2010

Nawrot Andrzej

PowerShell via GPO

Aby zmienić ustawienia wykonywania skryptów potrzebujemy tego template'a.

http://www.microsoft.com/downloads/details.aspx?familyid=2917a564-dbbc-4da7-82c8-fe08b3ef4e6d&displaylang=en

by jendras (noreply@blogger.com) at June 08, 2010 08:29 AM

March 04, 2010

Nawrot Andrzej

Limit połączeń RDP

Ku pamięci

query session /server:servername


reset session [ID] /server:servername

by jendras (noreply@blogger.com) at March 04, 2010 02:17 PM

October 28, 2009

Nawrot Andrzej

Rodzinka w komplecie

 

Rodzinka w komplecie, brakuje tylko zniewiescialego SL :)
Posted by Picasa

by jendras (noreply@blogger.com) at October 28, 2009 10:08 PM

October 07, 2009

Najtkowski Marcin Jan

Dua Tonight

W trakcie nieustających muzycznych wojaży trafiłem znów na kawałek, którego słucham po kilkanaście-kilkadziesiąt razy dziennie. Kobiecy wokal – oczywiście, fajny, “chwytliwy” rytm oraz ogólna “sympatyczość” sprawiły, że Tonight zespołu Dua stał się moim numerem jeden ostatniego tygodnia.

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" height="265" width="320"><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="src" value="http://www.youtube-nocookie.com/v/YIfJvPm9-rg&amp;hl=pl&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"/><param name="allowfullscreen" value="true"/><embed allowfullscreen="true" allowscriptaccess="always" height="265" src="http://www.youtube-nocookie.com/v/YIfJvPm9-rg&amp;hl=pl&amp;fs=1&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" width="320"></embed></object>

Utwór można znaleźć na A Lounge Supreme vol. 5.

by naytec at October 07, 2009 11:40 AM